private void BuildMenu(NavigationItemBuilder menu)
        {
            menu.Add(T("New Feature Group"), "1.01",
                     item =>
                     item.Action("Create", "Admin", new { area = "Contents", id = "FeaturedItemGroup" }));

            menu.Add(T("New Feature Group"), "1.05",
                     item =>
                     item.Action("Create", "Admin", new { area = "Contents", id = "FeaturedItemGroup" }));

            if (FeaturedItemGroupExists())
            {
                menu.Add(T("Manage Feature Groups"), "1.1",
                         item =>
                         item.Action("Groups", "Admin", new { area = "Sunkist.FeaturedItemSlider" }));

                menu.Add(T("New Feature"), "1.2",
                         item =>
                         item.Action("Create", "Admin", new { area = "Contents", id = "FeaturedItem" }));
            }

            if (FeaturedItemExists())
            {
                menu.Add(T("Manage Features"), "1.3",
                         item =>
                         item.Action("Items", "Admin", new { area = "Sunkist.FeaturedItemSlider" }));
            }
        }
        private void BuildMenu(NavigationItemBuilder menu)
        {
            var blogs      = _blogService.Get().Where(x => _authorizationService.TryCheckAccess(Permissions.MetaListBlogs, _workContextAccessor.GetContext().CurrentUser, x)).ToArray();
            var blogCount  = blogs.Count();
            var singleBlog = blogCount == 1 ? blogs.ElementAt(0) : null;

            if (blogCount > 0 && singleBlog == null)
            {
                menu.Add(T("Manage Blogs"), "3",
                         item => item.Action("List", "BlogAdmin", new { area = "Orchard.Blogs" }).Permission(Permissions.MetaListOwnBlogs));
            }
            else if (singleBlog != null)
            {
                menu.Add(T("Manage Blog"), "1.0",
                         item => item.Action("Item", "BlogAdmin", new { area = "Orchard.Blogs", blogId = singleBlog.Id }).Permission(Permissions.MetaListOwnBlogs));
            }

            if (singleBlog != null)
            {
                menu.Add(T("New Post"), "1.1",
                         item =>
                         item.Action("Create", "BlogPostAdmin", new { area = "Orchard.Blogs", blogId = singleBlog.Id }).Permission(Permissions.MetaListOwnBlogs));
            }

            menu.Add(T("New Blog"), "1.2",
                     item =>
                     item.Action("Create", "BlogAdmin", new { area = "Orchard.Blogs" }).Permission(Permissions.ManageBlogs));
        }
        private void BuildMenu(NavigationItemBuilder menu)
        {
            menu.Add(T("New Slider Group"), "1",
                     item =>
                     item.Action("Create", "Admin", new { area = "Contents", id = "FlexSliderGroup" }).Permission(Permissions.CreateSlider));

            menu.Add(T("New Slider Group"), "1",
                     item =>
                     item.Action("Create", "Admin", new { area = "Contents", id = "FlexSliderGroup" }).Permission(Permissions.CreateSlider));

            if (SliderGroupItemExists())
            {
                menu.Add(T("Manage Slider Groups"), "1.1",
                         item =>
                         item.Action("Groups", "Admin", new { area = "Tekno.FlexSlider" }));

                menu.Add(T("New Slider Item"), "1.2",
                         item =>
                         item.Action("Create", "Admin", new { area = "Contents", id = "FlexSlider" }));
            }

            if (SliderGroupItemExists() && SliderItemExists())
            {
                menu.Add(T("Manage Slider Items"), "1.1",
                         item =>
                         item.Action("Items", "Admin", new { area = "Tekno.FlexSlider" }).Permission(Permissions.ManageSlider));
            }
        }
Beispiel #4
0
        private void BuildMenu(NavigationItemBuilder menu)
        {
            var blogs      = _blogService.Get();
            var blogCount  = blogs.Count();
            var singleBlog = blogCount == 1 ? blogs.ElementAt(0) : null;

            if (blogCount > 0 && singleBlog == null)
            {
                menu.Add(T("Manage Blogs"), "3",
                         item => item.Action("List", "BlogAdmin", new { area = "Orchard.Blogs" }).Permission(Permissions.MetaListBlogs));
            }
            else if (singleBlog != null)
            {
                menu.Add(T("Manage Blog"), "1.0",
                         item => item.Action("Item", "BlogAdmin", new { area = "Orchard.Blogs", blogId = singleBlog.Id }).Permission(Permissions.MetaListBlogs));
            }

            if (singleBlog != null)
            {
                menu.Add(T("New Post"), "1.1",
                         item =>
                         item.Action("Create", "BlogPostAdmin", new { area = "Orchard.Blogs", blogId = singleBlog.Id }).Permission(Permissions.PublishBlogPost));
            }

            menu.Add(T("New Blog"), "1.2",
                     item =>
                     item.Action("Create", "BlogAdmin", new { area = "Orchard.Blogs" }).Permission(Permissions.ManageBlogs));
        }
Beispiel #5
0
 private void BuildMenu(NavigationItemBuilder menu)
 {
     menu.Add(T("账号设置"), "1.1",
              item => item.Action("WeiXin", "Admin", new { Area = "Settings" }).Permission(Permissions.ManageWeiXin));
     menu.Add(T("菜单设置"), "1.2",
              item => item.Action("SetMenu", "WeiXinAdmin", new { Area = "Juqian.Winxin" }).Permission(Permissions.ManageWeiXin));
 }
Beispiel #6
0
        private void BuildMenu(NavigationItemBuilder menu)
        {
            var requestContext = _requestContextAccessor.Value;
            var idValue        = (string)requestContext.RouteData.Values["id"];
            var id             = 0;

            if (!string.IsNullOrEmpty(idValue))
            {
                int.TryParse(idValue, out id);
            }

            menu.Add(T("Orders"), "2.0",
                     item =>
                     item.Action("Index", "OrderAdmin", new { area = "MyWebShop" }));

            menu.Add(T("Customers"), "2.1",
                     item =>
                     item.Action("Index", "CustomerAdmin", new { area = "MyWebShop" }));
            menu.Add(T("Orders"), "2.1",
                     item =>
                     item.Action("Index", "OrderAdmin", new { area = "MyWebShop" })
                     )
            .Add(T("Details"), i => i.Action("Edit", "CustomerAdmin", new { id }).LocalNav())
            .Add(T("Addresses"), i => i.Action("ListAddresses", "CustomerAdmin", new { id }).LocalNav())
            .Add(T("Orders"), i => i.Action("ListOrders", "CustomerAdmin", new { id }).LocalNav());
        }
 private void BuildConfigurationMenu(NavigationItemBuilder builder)
 {
     builder.IconCssClass("fa-cog");
     builder.Add(T("Modules"), "1", b => b.Action("Features", "Module", new { area = Constants.Areas.Dashboard }).IconCssClass("fa-th").Permission(DashboardPermissions.ManageModules));
     builder.Add(T("Themes"), "2", b => b.Action("Index", "Theme", new { area = Constants.Areas.Dashboard }).IconCssClass("fa-tachometer").Permission(DashboardPermissions.ManageThemes));
     builder.Add(T("Extension Modules"), "3", b => b.Action("Index", "ModuleSettings", new { area = Constants.Areas.Dashboard }).IconCssClass("fa-tachometer").Permission(DashboardPermissions.ManageModuleSettings));
 }
Beispiel #8
0
        private void BuildMenu(NavigationItemBuilder menu)
        {
            //For
            var cAses = _cAseService.Get().ToArray();


            // var cAses = _cAseService.Get().Where(x => _authorizationService.TryCheckAccess(Permissions.MetaListCases, _workContextAccessor.GetContext().CurrentUser, x)).ToArray();
            var cAseCount  = cAses.Count();
            var singleCase = cAseCount == 1 ? cAses.ElementAt(0) : null;

            if (cAseCount > 0 && singleCase == null)
            {
                menu.Add(T("Manage Cases"), "3",
                         item => item.Action("List", "CaseAdmin", new { area = "LawBookCases.Module" }).Permission(Permissions.MetaListOwnCases));
            }
            else if (singleCase != null)
            {
                menu.Add(T("Manage Case"), "1.0",
                         item => item.Action("Item", "CaseAdmin", new { area = "LawBookCases.Module", cAseId = singleCase.Id }).Permission(Permissions.MetaListOwnCases));
            }

            if (singleCase != null)
            {
                menu.Add(T("New Post"), "1.1",
                         item =>
                         item.Action("Create", "CasePostAdmin", new { area = "LawBookCases.Module", cAseId = singleCase.Id }).Permission(Permissions.MetaListOwnCases));
            }

            menu.Add(T("New Case"), "1.2",
                     item =>
                     item.Action("Create", "CaseAdmin", new { area = "LawBookCases.Module" }).Permission(Permissions.ManageCases));
        }
        private void BuildMembershipMenu(NavigationItemBuilder builder)
        {
            builder.IconCssClass("fa-user");
            builder.Permission(StandardPermissions.FullAccess);

            builder.Add(T("Users"), "1", item => item.Action("Index", "User", new { area = Constants.Areas.Security }).IconCssClass("fa-user-md ").Permission(StandardPermissions.FullAccess));
            builder.Add(T("Roles"), "2", item => item.Action("Index", "Role", new { area = Constants.Areas.Security }).IconCssClass("fa-male").Permission(StandardPermissions.FullAccess));
        }
Beispiel #10
0
        private void BuildMenu(NavigationItemBuilder menu)
        {
            menu.Add(T("List"), "1.0", item =>
                     item.Action("List", "Admin", new { area = "Contents", id = "Ad" }));

            menu.Add(T("New Ad"), "1.1", item =>
                     item.Action("Create", "Admin", new { area = "Contents", id = "Ad" }));
        }
Beispiel #11
0
        private void BuildManager(NavigationItemBuilder builder)
        {
            builder.IconCssClass("fa-th");

            builder.Add(T("Chuyên mục"), "0", b => b.Action("Index", "AdminCategories", new { area = "" })
                        .Permission(CategoriesPermissions.ManagerCategories));

            builder.Add(T("Banners"), "1", b => b.Action("Index", "AdminBanners", new { area = "" })
                        .Permission(BannersPermissions.ManagerBanners));

            builder.Add(T("Dòng sản phẩm"), "2", b => b.Action("Index", "AdminProductsGroup", new { area = "" })
                        .Permission(ProductsGroupPermissions.ManagerProductsGroup));

            builder.Add(T("Thể tích chai"), "3", b => b.Action("Index", "AdminProductVolume", new { area = "" })
                        .Permission(ProductsGroupPermissions.ManagerProductsGroup));

            builder.Add(T("Sản phẩm"), "4", b => b.Action("Index", "AdminProducts", new { area = "" })
                        .Permission(ProductsPermissions.ManagerProducts));

            builder.Add(T("Tin tức"), "5", b => b.Action("Index", "AdminArticles", new { area = "" })
                        .Permission(ArticlesPermissions.ManagerArticles));

            builder.Add(T("Cửa hàng"), "6", b => b.Action("Index", "AdminStoreBranch", new { area = "" })
                        .Permission(StoreBranchPermissions.ManagerStoreBranch));

            builder.Add(T("Liên hệ"), "7", b => b.Action("Index", "AdminEmails", new { area = "" })
                        .Permission(EmailsPermissions.ManagerEmails));

            builder.Add(T("Cấu hình trang"), "8", b => b.Url("/admin/settings/edit/CMSSolutions.Websites.Controllers.CommonSettings"));
        }
Beispiel #12
0
        private void BuildMenu(NavigationItemBuilder menu)
        {
            menu.Add(T("Manage Pages"), "1.1", item =>
                     item.Action("List", "Admin", new { area = "Contents", id = "Page" }));

            if (authorizer.Authorize(Orchard.Core.Contents.Permissions.EditContent))
            {
                menu.Add(T("New Page"), "1.2", item =>
                         item.Action("Create", "Admin", new { area = "Contents", id = "Page" }));
            }
        }
Beispiel #13
0
        private void BuildEventsMenu(NavigationItemBuilder menu)
        {
            menu.Add(T("Manage Events"), "1.2", item =>
                     item.Url("~/Admin/Contents/List/Event?Options.OrderBy=Created"));

            if (authorizer.Authorize(Orchard.Core.Contents.Permissions.EditContent))
            {
                menu.Add(T("New Event"), "1.2", item =>
                         item.Url("~/Admin/Contents/Create/Event"));
            }
        }
Beispiel #14
0
        private void BuildCmsMenu(NavigationItemBuilder builder)
        {
            builder.IconCssClass("fa fa-edit");

            // Blog
            builder.Add(T(KoreCmsLocalizableStrings.Blog.Title), "5", item => item
                        .Url("#blog")
                        .IconCssClass("fa fa-newspaper-o")
                        .Permission(CmsPermissions.BlogRead));

            // Content Blocks
            builder.Add(T(KoreCmsLocalizableStrings.ContentBlocks.Title), "5", item => item
                        .Url("#blocks/content-blocks")
                        .IconCssClass("fa fa-cubes")
                        .Permission(CmsPermissions.ContentBlocksRead));

            // Media
            builder.Add(T(KoreCmsLocalizableStrings.Media.Title), "5", item => item
                        .Url("#media")
                        .IconCssClass("fa fa-picture-o")
                        .Permission(CmsPermissions.MediaRead));

            // Menus
            builder.Add(T(KoreCmsLocalizableStrings.Menus.Title), "5", item => item
                        .Url("#menus")
                        .IconCssClass("fa fa-bars")
                        .Permission(CmsPermissions.MenusRead));

            // Messaging
            builder.Add(T(KoreCmsLocalizableStrings.Messaging.MessageTemplates), "5", item => item
                        .Url("#messaging/templates")
                        .IconCssClass("fa fa-crop")
                        .Permission(CmsPermissions.MessageTemplatesRead));

            // Pages
            builder.Add(T(KoreCmsLocalizableStrings.Pages.Title), "5", item => item
                        .Url("#pages")
                        .IconCssClass("fa fa-file-o")
                        .Permission(CmsPermissions.PagesRead));

            // Queued Emails
            builder.Add(T(KoreCmsLocalizableStrings.Messaging.QueuedEmails), "5", item => item
                        .Url("#messaging/queued-email")
                        .IconCssClass("fa fa-envelope-o")
                        .Permission(CmsPermissions.QueuedEmailsRead));

            // Subscribers
            builder.Add(T(KoreCmsLocalizableStrings.Newsletters.Subscribers), "5", item => item
                        .Url("#newsletters/subscribers")
                        .IconCssClass("fa fa-users")
                        .Permission(CmsPermissions.NewsletterRead));

            // XML Sitemap
            builder.Add(T(KoreCmsLocalizableStrings.Sitemap.XMLSitemap), "5", item => item
                        .Url("#sitemap/xml-sitemap")
                        .IconCssClass("fa fa-sitemap")
                        .Permission(CmsPermissions.SitemapRead));
        }
Beispiel #15
0
 private void BuildMenu(NavigationItemBuilder menu)
 {
     menu.Add(T("foo"), "10.0",
              item => item
              .Action("Index", "Admin", new { area = Constants.ROUTES_AREA_NAME })
              .Permission(Raptor.Ericka.Permissions.ManageThemeSettings)
              );
     menu.Add(T("Accent Color"), "10.1",
              item => item
              .Action("Index", "Admin", new { area = Constants.ROUTES_AREA_NAME })
              .Permission(Raptor.Ericka.Permissions.ManageThemeSettings)
              );
 }
Beispiel #16
0
 private void BuildMenu(NavigationItemBuilder menu)
 {
     menu.Add(T(""), "10.0",
              item => item
              .Action("Index", "Admin", new { area = "Orchard.Themes" })
              .Permission(Orchard.Themes.Permissions.ApplyTheme)
              );
     menu.Add(T("Choose Options"), "10.1",
              item => item
              .Action("Index", "Admin", new { area = Constants.RoutesAreaName })
              .Permission(Permissions.ManageThemeSettings)
              );
 }
 private void BuildMenu(NavigationItemBuilder menu)
 {
     menu.Add(T("foo"), "10.0",
              item => item
              .Action("Index", "Admin", new { area = Constants.RoutesAreaName })
              .Permission(Bootstrap.Permissions.ManageThemeSettings)
              );
     menu.Add(T("Choose Options"), "10.1",
              item => item
              .Action("Index", "Admin", new { area = Constants.RoutesAreaName })
              .Permission(Bootstrap.Permissions.ManageThemeSettings)
              );
 }
 private void BuildMenu(NavigationItemBuilder menu)
 {
     menu.Add(T("Base Settings"), "10.1",
              item => item
              .Action("Index", "Admin", new { area = Constants.ROUTES_AREA_NAME })
              .Permission(TheMetroTheme.Permissions.ManageThemeSettings)
              );
     menu.Add(T("Custom CSS"), "10.2",
              item => item
              .Action("CustomCss", "Admin", new { area = Constants.ROUTES_AREA_NAME })
              .Permission(TheMetroTheme.Permissions.ManageThemeSettings)
              );
 }
Beispiel #19
0
        private void BuildMenu(NavigationItemBuilder menu)
        {
            menu.Add(LogisticsModule.Key + "-ShippingList", "配送方式", "10",
                     item => item
                     .Action("List", "Shipping", new { area = LogisticsModule.Area })
                     .Permission(Permissions.ViewShipping)
                     );

            menu.Add(LogisticsModule.Key + "-ShippingAreaList", "配送区域", "20",
                     item => item
                     .Action("List", "ShippingArea", new { area = LogisticsModule.Area })
                     .Permission(Permissions.ViewShipping)
                     );
        }
Beispiel #20
0
        private void BuildMenu(NavigationItemBuilder menu)
        {
            menu.Add(T("Staff Profiles"), "1.1", item =>
                     item.Action("List", "Admin", new { area = "Contents", id = "StaffProfile" }));

            menu.Add(T("Staff Groups"), "1.2", item =>
                     item.Action("List", "Admin", new { area = "Contents", id = "StaffGroup" }));

            if (authorizer.Authorize(Orchard.Core.Contents.Permissions.EditContent))
            {
                menu.Add(T("New Staff Profile"), "1.3", item =>
                         item.Action("Create", "Admin", new { area = "Contents", id = "StaffProfile" }));
            }
        }
Beispiel #21
0
        private void BuildMaintenanceMenu(NavigationItemBuilder builder)
        {
            builder.IconCssClass("fa fa-wrench");

            builder.Add(T(KoreWebLocalizableStrings.Log.Title), "5", item => item
                        .Url("#log")
                        .IconCssClass("fa fa-warning")
                        .Permission(KoreWebPermissions.LogRead));

            // Scheduled Tasks
            builder.Add(T(KoreWebLocalizableStrings.ScheduledTasks.Title), "5", item => item
                        .Url("#scheduledtasks")
                        .IconCssClass("fa fa-clock-o")
                        .Permission(KoreWebPermissions.ScheduledTasksRead));
        }
Beispiel #22
0
 private void BuildMenu(NavigationItemBuilder menu)
 {
     if (_services.Authorizer.Authorize(Permissions.MergeTerms) || _services.Authorizer.Authorize(Permissions.EditTerm) || _services.Authorizer.Authorize(Permissions.CreateTerm) || _services.Authorizer.Authorize(Permissions.DeleteTerm))
     {
         menu.Add(T("Manage Taxonomies"), "1.0", item => item.Action("Index", "Admin", new { area = "Orchard.Taxonomies" }));
     }
 }
Beispiel #23
0
        public static void RunThroughRewriters(NavigationItemBuilder menu, Action <Rewriter, NavigationItemBuilder> itemBuilder)
        {
            var rewriters = new List <Rewriter> {
                new Rewriter {
                    DisplayName = new LocalizedString("Title Tag Rewriter"), Type = "TitleRewriter"
                },
                new Rewriter {
                    DisplayName = new LocalizedString("Description Tag Rewriter"), Type = "DescriptionRewriter"
                },
                new Rewriter {
                    DisplayName = new LocalizedString("Keywords Tag Rewriter"), Type = "KeywordsRewriter"
                },
                new Rewriter {
                    DisplayName = new LocalizedString("Canonical Tag Rewriter"), Type = "CanonicalRewriter"
                },
                new Rewriter {
                    DisplayName = new LocalizedString("HTMLCard Rewriter"), Type = "HTMLCardRewriter"
                }
            };

            int i = 1;

            foreach (var rewriter in rewriters)
            {
                menu.Add(rewriter.DisplayName, i.ToString(), builder => itemBuilder(rewriter, builder));
                i++;
            }
        }
Beispiel #24
0
 public void BuildMenu(NavigationItemBuilder menu)
 {
     menu.Add(T("Contact Info"), "1.1", item =>
              item.Action("Edit", "ContactAdmin", new { area = "Gilde" }))
     .Add(T("Reacties ({0})", _contactFormService.GetEntries().Count()), "1.2", item =>
          item.Action("List", "ContactAdmin", new { area = "Gilde" }));
 }
        private void BuildMenu(NavigationItemBuilder menu)
        {
            //menu.Add(T("Manage Orientation"), "1.0", item =>
            //item.Action("Item", "OrientationAdmin", new { area = "DeSjoerd.Intro", }).LocalNav());

            //menu.Add(T("Games"), "1.1", item =>
            //    item.Action("List", "GameAdmin", new { area = "DeSjoerd.Intro", orientationId = orientationPart.Id }).LocalNav());

            menu.Add(T("Teams"), "1.1", item => item
                     .Action("List", "TeamAdmin", new { area = "DeSjoerd.Competition" }).LocalNav());

            menu.Add(T("Games"), "1.2", item => item
                     .Action("List", "GameAdmin", new { area = "DeSjoerd.Competition" }).LocalNav());

            menu.Add(T("Objectives"), "1.2", item => item
                     .Action("List", "ObjectiveAdmin", new { area = "DeSjoerd.Competition" }).LocalNav());
        }
Beispiel #26
0
 private void BuildMenu(NavigationItemBuilder menu)
 {
     menu.Add(PaymentProcessModule.Key + "-PaymentsList", "支付方式", "10",
              item => item
              .Action("List", "Admin", new { area = PaymentProcessModule.Area })
              .Permission(Permissions.ConfigPayment)
              );
 }
Beispiel #27
0
 private void BuildMenu(NavigationItemBuilder menu)
 {
     menu.Add(DiscoveryModule.Key + "-List", "发现列表", "20",
              item => item
              .Action("List", "Admin", new { area = DiscoveryModule.Area })
              .Permission(Permissions.ViewDiscovery)
              );
 }
Beispiel #28
0
 private void BuildMenu(NavigationItemBuilder menu)
 {
     menu.Add(CarouselModule.Key + "-CarouselsList", "轮播列表", "20",
              item => item
              .Action("GroupList", "Admin", new { area = CarouselModule.Area })
              .Permission(Permissions.ViewCarousel)
              );
 }
Beispiel #29
0
 private void BuildMenu(NavigationItemBuilder menu)
 {
     menu.Add(MemberCenterModule.Key + "-MembersList", "会员列表", "20",
              item => item
              .Action("List", "Admin", new { area = MemberCenterModule.Area })
              .Permission(Permissions.ViewMember)
              );
 }
Beispiel #30
0
        private void BuildMenu(NavigationItemBuilder menu)
        {
            menu.Add(T("Manage Content"), "1.1", item =>
                     item.Url("~/Admin/Widgets?layerId=9"));

            if (authorizer.Authorize(Orchard.Widgets.Permissions.ManageWidgets))
            {
                menu.Add(T("New Slide"), "1.2", item =>
                         item.Url("~/Admin/Widgets/AddWidget?layerId=9&widgetType=HomepageSlide&zone=Slides&returnUrl=%2FAdmin%2FWidgets%3FlayerId%3D9"));
            }

            if (authorizer.Authorize(Orchard.Widgets.Permissions.ManageWidgets))
            {
                menu.Add(T("New Link"), "1.3", item =>
                         item.Url("~/Admin/Widgets/AddWidget?layerId=9&widgetType=HomepageLink&zone=Links&returnUrl=%2FAdmin%2FWidgets%3FlayerId%3D9"));
            }
        }