Ejemplo n.º 1
0
 public void GetNavigation(NavigationBuilder builder) {
     builder.Add(T("Themes"), menu => menu.Add(T("Syntax Highlighter"), "100",
              item => item.Action("ChangeTheme", "Admin", 
                  new {
                      area = "Heikura.SyntaxHighlighter"
                  }).LocalNav().Permission(Permissions.ApplyTheme)));
 }
Ejemplo n.º 2
0
 public void GetNavigation(NavigationBuilder builder)
 {
     builder.Add(T("Membership"), "5", BuildMembershipMenu);
 }
Ejemplo n.º 3
0
 public void GetNavigation(NavigationBuilder builder)
 {
     builder.Add(T("Staff Directory"), "1", BuildMenu);
 }
Ejemplo n.º 4
0
 public void GetNavigation(NavigationBuilder builder)
 {
     builder
     .Add(T("Product"), "1.5", BuildMenu);
 }
Ejemplo n.º 5
0
 public void GetNavigation(NavigationBuilder builder)
 {
     builder.Add(T("Media"), "6", item => item.Add(T("Profiles"), "5", i => i.Action("Index", "Admin", new { area = "Orchard.MediaProcessing" }).Permission(StandardPermissions.SiteOwner)));
 }
Ejemplo n.º 6
0
 public void GetNavigation(NavigationBuilder builder)
 {
     builder.Add(T("Competition"), "5", BuildMenu);
 }
Ejemplo n.º 7
0
 public void GetNavigation(NavigationBuilder builder)
 {
     builder.Add(T("Settings"), settings => settings
                 .Add(T("Enjoy"), "17", dashboard => dashboard
                      .Action("Index", "Admin", new { area = "Enjoy.Core" })));
 }
Ejemplo n.º 8
0
        public Task BuildNavigationAsync(string name, NavigationBuilder builder)
        {
            if (!String.Equals(name, "admin", StringComparison.OrdinalIgnoreCase))
            {
                return(Task.CompletedTask);
            }

            builder.Add(S["Security"], security => security
                        .Add(S["OpenID Connect"], "15", category =>
            {
                category.AddClass("openid").Id("openid");

                var features = _shellDescriptor.Features.Select(feature => feature.Id).ToImmutableArray();
                if (features.Contains(OpenIdConstants.Features.Client) ||
                    features.Contains(OpenIdConstants.Features.Server) ||
                    features.Contains(OpenIdConstants.Features.Validation))
                {
                    category.Add(S["Settings"], "1", settings =>
                    {
                        if (features.Contains(OpenIdConstants.Features.Client))
                        {
                            settings.Add(S["Authentication client"], "1", client => client
                                         .Action("Index", "Admin", new { area = "OrchardCore.Settings", groupId = "OrchardCore.OpenId.Client" })
                                         .Permission(Permissions.ManageClientSettings)
                                         .LocalNav());
                        }

                        if (features.Contains(OpenIdConstants.Features.Server))
                        {
                            settings.Add(S["Authorization server"], "2", server => server
                                         .Action("Index", "ServerConfiguration", "OrchardCore.OpenId")
                                         .Permission(Permissions.ManageServerSettings)
                                         .LocalNav());
                        }

                        if (features.Contains(OpenIdConstants.Features.Validation))
                        {
                            settings.Add(S["Token validation"], "3", validation => validation
                                         .Action("Index", "ValidationConfiguration", "OrchardCore.OpenId")
                                         .Permission(Permissions.ManageValidationSettings)
                                         .LocalNav());
                        }
                    });
                }

                if (features.Contains(OpenIdConstants.Features.Management))
                {
                    category.Add(S["Management"], "2", management =>
                    {
                        management.Add(S["Applications"], "1", applications => applications
                                       .Action("Index", "Application", "OrchardCore.OpenId")
                                       .Permission(Permissions.ManageApplications)
                                       .LocalNav());

                        management.Add(S["Scopes"], "2", applications => applications
                                       .Action("Index", "Scope", "OrchardCore.OpenId")
                                       .Permission(Permissions.ManageScopes)
                                       .LocalNav());
                    });
                }
            }));

            return(Task.CompletedTask);
        }
Ejemplo n.º 9
0
 public void GetNavigation(NavigationBuilder builder)
 {
     builder.Add("Users",
                 menu => menu.Add("Roles", "2.0", item => item.Action("Index", "Admin", new { area = "Orchard.Roles" })
                                  .LocalNav().Permission(Permissions.ManageRoles)));
 }
Ejemplo n.º 10
0
 public void GetNavigation(NavigationBuilder builder)
 {
     builder.Add(T("Settings"),
                 menu => menu.Add(T("ContentType Permission"), "1", item => item.Action("Settings", "Admin", new { area = "Laser.Orchard.ContentExtension" })
                                  .Permission(StandardPermissions.SiteOwner)));
 }
Ejemplo n.º 11
0
 public void GetNavigation(NavigationBuilder builder)
 {
     builder.Add(T("Home"), "1", menu => menu.Url("~/"), new [] { "icon-home" });
 }
Ejemplo n.º 12
0
 public void GetNavigation(NavigationBuilder builder)
 {
     builder
     .Add(T("Advertise"), "1.5", BuildMenu);
 }
Ejemplo n.º 13
0
 public void GetNavigation(NavigationBuilder builder)
 {
     builder.Add(T("Contact"), "5", BuildMenu);
 }
Ejemplo n.º 14
0
        public void BuildNavigation(string name, NavigationBuilder builder)
        {
            if (!String.Equals(name, "admin", StringComparison.OrdinalIgnoreCase))
            {
                return;
            }

            var AdminMenu = _session.Query <ContentItem>().ListAsync().Result.Where(x => x.ContentType == "Menu" && x.Latest && x.As <TitlePart>().Title == "AdminMenu");

            if (AdminMenu.Count() == 1)
            {
                ContentItem AdminMenuItem = AdminMenu.First();
                var         Menu          = AdminMenuItem.As <MenuItemsListPart>().MenuItems;
                foreach (var MenuItem in Menu)
                {
                    string AAA  = MenuItem.Content.ToString();
                    var    Name = MenuItem.As <LinkMenuItemPart>().Name;
                    var    Url  = MenuItem.As <LinkMenuItemPart>().Url;
                    builder
                    .Add(T[Name], "2", contentParts => contentParts
                         .Action("List", "Admin", new { area = "NewsManage", ModelName = Url })
                         .Permission(Permissions.NewManage)
                         .LocalNav()
                         );
                    if (AAA.Contains("MenuItemsListPart") && MenuItem.As <MenuItemsListPart>().MenuItems.Count != 0)
                    {
                        var MenuChildren = MenuItem.As <MenuItemsListPart>().MenuItems;
                        foreach (var MenuItem1 in MenuChildren)
                        {
                            string AAA1  = MenuItem1.Content.ToString();
                            var    Name2 = MenuItem1.As <LinkMenuItemPart>().Name;
                            var    Url2  = MenuItem1.As <LinkMenuItemPart>().Url;
                            builder
                            .Add(T[Name], "2", contentParts => contentParts
                                 .Action("List", "Admin", new { area = "NewsManage", ModelName = Url })
                                 .Permission(Permissions.NewManage)
                                 .Add(T[Name2], "2", conParts => conParts
                                      .Action("List", "Admin", new { area = "NewsManage", ModelName = Url2 })
                                      .Permission(Permissions.NewManage)
                                      ));
                            if (AAA1.Contains("MenuItemsListPart") && MenuItem1.As <MenuItemsListPart>().MenuItems.Count != 0)
                            {
                                var MenuChildren1 = MenuItem.As <MenuItemsListPart>().MenuItems;
                                foreach (var MenuItem2 in MenuChildren1)
                                {
                                    string AAA2  = MenuItem2.Content.ToString();
                                    var    Name3 = MenuItem2.As <LinkMenuItemPart>().Name;
                                    var    Url3  = MenuItem2.As <LinkMenuItemPart>().Url;
                                    builder
                                    .Add(T[Name], "2", contentParts => contentParts
                                         .Action("List", "Admin", new { area = "NewsManage", ModelName = Url })
                                         .Permission(Permissions.NewManage)
                                         .Add(T[Name2], "2", conParts => conParts
                                              .Action("List", "Admin", new { area = "NewsManage", ModelName = Url2 })
                                              .Permission(Permissions.NewManage)
                                              .Add(T[Name3], "2", conarts => conarts
                                                   .Action("List", "Admin", new { area = "NewsManage", ModelName = Url3 })
                                                   .Permission(Permissions.NewManage)
                                                   )));
                                    if (AAA2.Contains("MenuItemsListPart") && MenuItem2.As <MenuItemsListPart>().MenuItems.Count != 0)
                                    {
                                        builder
                                        .Add(T["导航添加出错"], "5", contentParts => contentParts
                                             .Action("AdminMenuError", "Admin", new { area = "NewsManage" })
                                             .Permission(Permissions.NewManage)
                                             .LocalNav()
                                             );
                                    }
                                    else
                                    {
                                    }
                                }
                            }
                            else
                            {
                            }
                        }
                    }
                    else
                    {
                    }
                }
            }
            else
            {
                var contentItem = _session.Query <ContentItem>().ListAsync().Result.Where(x => x.ContentType == "新闻组管理" && x.Latest);
                if (contentItem.Count() != 0)
                {
                    foreach (var item in contentItem)
                    {
                        var NewDisplayName = item.As <NewPart>().NewDisplayName;
                        var Name           = item.As <NewPart>().Name;
                        builder.Add(T["新闻组管理"], index => index
                                    .Add(T[NewDisplayName], "3", contentParts => contentParts
                                         .Permission(Permissions.NewManage)
                                         .Action("List", "Admin", new { area = "NewsManage", ModelName = Name }))
                                    );
                        builder
                        .Add(T["编辑管理"], index => index
                             .Add(T[NewDisplayName], "3", contentParts => contentParts
                                  .Permission(Permissions.NewEditor)
                                  .Action("List", "Admin", new { area = "NewsManage", ModelName = Name }))
                             );
                    }
                }
            }

            builder
            .Add(T["新闻组管理"], index => index
                 .Add(T["添加新闻类型"], "1", Top => Top
                      .Permission(Permissions.NewManage)
                      .Action("NewManage", "Admin", new { area = "NewsManage" }))
                 );
            builder
            .Add(T["查看新闻"], index => index
                 .Permission(Permissions.NewManage)
                 .Action("ReleaseManage", "Admin", new { area = "NewsManage" })
                 );
            //builder.
            //    Add(T["新闻模块初始化"], initialSetup => initialSetup
            //        .Permission(Permissions.NewManage)
            //        .Action("NewSetup", "InitialSetup", new { area = "NewsManage" })
            //);
        }
Ejemplo n.º 15
0
 public void GetNavigation(NavigationBuilder builder)
 {
     builder.Add(T("Home"), "0", BuildHomeMenu);
     builder.Add(T("Quản lý"), "1", BuildManager);
     builder.Add(T("Đơn hàng"), "2", BuildOrders);
 }
Ejemplo n.º 16
0
 public void GetNavigation(NavigationBuilder builder)
 {
     builder.Add(T("Membership"),
                 menu => menu.Add(T("OAuth Providers"), "5", item => item
                                  .Action("Index", "OAuthProvider", new { area = Constants.Areas.OAuth })));
 }
Ejemplo n.º 17
0
 public void GetNavigation(NavigationBuilder builder)
 {
     builder.Add(T("Events Management"), "4", BuildMenu);
 }
 public void GetNavigation(NavigationBuilder builder)
 {
     builder.Add(T("Settings"),
                 menu => menu.Add(T("User Reactions Types"), "10", item => item.Action("Settings", "Admin", new { area = "Laser.Orchard.UserReactions" })
                                  .Permission(StandardPermissions.SiteOwner)));
 }
Ejemplo n.º 19
0
 public void GetNavigation(NavigationBuilder builder)
 {
     builder.Add(T("Featured Items"), "2.5", BuildMenu);
 }
Ejemplo n.º 20
0
 public void GetNavigation(NavigationBuilder builder)
 {
     builder.Add(T("CMS"), "10", b => b.IconCssClass("fa-windows"));
 }
Ejemplo n.º 21
0
 private void CreateListManagementMenuItem(NavigationBuilder builder)
 {
     builder.Add(T("Lists"), "11", item => item
                 .Action("Index", "Admin", new { area = "Orchard.Lists" })
                 );
 }
Ejemplo n.º 22
0
 public void GetNavigation(NavigationBuilder builder)
 {
     builder//.AddImageSet("weixin")
     .Add(T("微信设置"), "1.1", BuildMenu);
 }
Ejemplo n.º 23
0
 public void GetNavigation(NavigationBuilder builder)
 {
     builder.Add(SystemMessageModule.Key, SystemMessageModule.DisplayName, SystemMessageModule.Position.ToString(), BuildMenu, new List <string> {
         "icon-comment-alt"
     });
 }
Ejemplo n.º 24
0
 public void GetNavigation(NavigationBuilder builder)
 {
     builder.Add(T("Blog Post Picker"),
                 menu => menu
                 .Add(T("Recent Blog Post"), "5", item => item.Action("Index", "Admin", new { area = "Arana.FeaturedPosts" }).LocalNav()));
 }