Пример #1
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));
 }
Пример #2
0
        private void BuildMenu(NavigationItemBuilder menu)
        {
            var documents = _documentService.Get();
            var docCount = documents.Count();
            var singleBlog = docCount == 1 ? documents.ElementAt(0) : null;

            if (docCount > 0 && singleBlog == null)
            {
                menu.Add(T("Manage Documents"), "3",
                         item => item.Action("List", "DocumentAdmin", new { area = "Infusion.Documents" }).Permission(Permissions.MetaListDocuments));
            }
            else if (singleBlog != null)
                menu.Add(T("Manage Document"), "1.0",
                    item => item.Action("Item", "DocumentAdmin", new { area = "Infusion.Documents", documentId = singleBlog.Id }).Permission(Permissions.MetaListDocuments));

            if (singleBlog != null)
                menu.Add(T("New Content"), "1.1",
                         item =>
                         item.Action("Create", "DocumentContentAdmin", new { area = "Infusion.Documents", documentId = singleBlog.Id }).Permission(Permissions.MetaListDocuments));

            menu.Add(T("New Document"), "1.2",
                     item =>
                     item.Action("Create", "DocumentAdmin", new { area = "Infusion.Documents" }).Permission(Permissions.ManageDocuments));

        }
Пример #3
0
 private void BuildMenu(NavigationItemBuilder menu)
 {
     menu.Add(T("List"), "1.1", item => item.Action("List", "Admin", new { area = "Contents", id = "Movie" }));
     menu.Add(T("New Movie"), "1.2", item => item.Action("Create", "Admin", new { area = "Contents", id = "Movie" }));
     menu.Add(T("Movie Lookup"), "1.3", item => item.Action("Index", "MovieLookup", new { area = "Demo.Movies" }).Permission(Permissions.LookupMovie));
     menu.Add(T("Actors"), "2.0", item => item.Action("Index", "ActorsAdmin", new { area = "Demo.Movies" }));
 }
Пример #4
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" }));
        }
Пример #5
0
 private void BuildMenu(NavigationItemBuilder menu) {
     menu.Add(T("Manage Features"), "3",
                  item => item.Action("List", "FeatureAdmin", new { area = "Liveo.Platform" }).Permission(Permissions.ManageFeatures));
     menu.Add(T("Manage Affiliates"), "4",
                  item => item.Action("List", "AffiliateAdmin", new { area = "Liveo.Platform" }).Permission(Permissions.ManageAffiliates));
     menu.Add(T("Manage Surveys"), "5",
                  item => item.Action("List", "SurveyAdmin", new { area = "Liveo.Platform" }).Permission(Permissions.ManageSurveys));
 }
Пример #6
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"));
        }
Пример #7
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" }));
        }
Пример #8
0
        private void BuildMenu(NavigationItemBuilder menu) {
            if (_pageService.GetCount() > 0)
                menu.Add("Manage Pages", "1.0",
                         item =>
                         item.Action("List", "Admin", new {area = "Orchard.Pages"}).Permission(Permissions.MetaListPages));

            menu.Add("Add New Page", "1.1",
                     item =>
                     item.Action("Create", "Admin", new {area = "Orchard.Pages"}).Permission(Permissions.EditPages));
        }
Пример #9
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)
     );
 }
Пример #10
0
        private void BuildMenu(NavigationItemBuilder menu)
        {
            var taxonomy = _taxonomyService.GetTaxonomyByName("Package Types");
            var terms = _taxonomyService.GetTerms(taxonomy.Id).Where(t => t.GetLevels() == 0);

            foreach (var term in terms) {
                var routeValues = new { area = "Orchard.Gallery", packageType = term.Slug };
                menu.Add(T(term.Slug), "2", item => item.Action("List", "Packages", routeValues));
            }

            menu.Add(T("Contribute"), "3", item => item.Action("Index", "Contribute", new {area = "Orchard.Gallery"}));
        }
Пример #11
0
 private void BuildMenu(NavigationItemBuilder menu) {
     menu.Add(T("foo"), "10.0",
         item => item
             .Action("Index", "Admin", new { area = Constants.ROUTES_AREA_NAME })
             .Permission(Bootstrap.Permissions.ManageThemeSettings)
     );
     menu.Add(T("Choose Options"), "10.1",
         item => item
             .Action("Index", "Admin", new { area = Constants.ROUTES_AREA_NAME })
             .Permission(Bootstrap.Permissions.ManageThemeSettings)
     );
 }
Пример #12
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" }));
		}
Пример #13
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)
     );
 }
Пример #14
0
 private void BuildMenu(NavigationItemBuilder menu)
 {
     menu.Add(T(""), "10.1",
         item => item
             .Action("Index", "Admin", new { area = Constants.RoutesAreaName })
             .Permission(Bootstrap.Permissions.ManageThemeSettings)
     );
     menu.Add(T("Choose Options"), "10.2",
         item => item
             .Action("Index", "Admin", new { area = Constants.RoutesAreaName })
             .Permission(Bootstrap.Permissions.ManageThemeSettings)
     );
 }
Пример #15
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"));
		}
Пример #16
0
 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)
     );
 }
Пример #17
0
        private void BuildMenu(NavigationItemBuilder menu)
        {
            var forums = _forumService.Get();
            var forumCount = forums.Count();

            if (forumCount > 0) {
                menu.Add(T("Manage Forums"), "3",
                         item => item.Action("List", "ForumAdmin", new { area = Constants.LocalArea }).Permission(Permissions.ManageForums));
            }

            menu.Add(T("New Forum"), "1.0",
                     item =>
                     item.Action("Create", "ForumAdmin", new { area = Constants.LocalArea }).Permission(Permissions.ManageForums));
        }
Пример #18
0
        private void BuildMenu(NavigationItemBuilder menu)
        {
          
            menu.Add(subItem => subItem
                                    .Caption(T("All Orders"))
                                    .Position("2.0")
                                    .Action("List", "OrderAdmin", new {area = "Richinoz.Paypal"}));

            menu.Add(subItem => subItem
                                    .Caption(T("Orders"))
                                    .Position("3.0")
                                    .Action("ListOrder", "OrderAdmin", new { area = "Richinoz.Paypal" }));
            
        }
Пример #19
0
        private void BuildMenu(NavigationItemBuilder menu)
        {
            menu.LinkToFirstChild(false);
            menu.Add(T("Category"), "1.1", item =>
                item.Action("List", "Admin", new { area = "Contents", id = "Category" }));

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

            //menu.Add(T("Movie Lookup"), "1.2", item =>
            //    item.Action("Index", "MovieLookup", new { area = "Pluralsight.Movies" }).Permission(Permissions.LookupMovie));

            //menu.Add(T("Actors"), "2.0", item =>
            //    item.Action("Index", "ActorsAdmin", new { area = "Pluralsight.Movies" }));
        }
Пример #20
0
        private void BuildMenu(NavigationItemBuilder menu) {
            var forums = _forumService.Get(VersionOptions.AllVersions);
            var forumCount = forums.Count();
            var singleForum = forumCount == 1 ? forums.ElementAt(0) : null;

            if (forumCount > 0 && singleForum == null) {
                menu.Add(T("Manage Forums"), "3",
                         item => item.Action("List", "ForumAdmin", new { area = Constants.LocalArea }).Permission(Permissions.ManageForums));
            }
            else if (singleForum != null)
                menu.Add(T("Manage Forum"), "1.0",
                        item => item.Action("Item", "ForumAdmin", new { area = Constants.LocalArea, forumId = singleForum.Id }).Permission(Permissions.ManageOwnForums));
            
            menu.Add(T("New Forum"), "1.1",
                    item =>
                    item.Action("Create", "ForumAdmin", new { area = Constants.LocalArea }).Permission(Permissions.ManageForums));
        }
Пример #21
0
        private void BuildMenu(NavigationItemBuilder menu) {
            var values = new { area = "Orchard.Gallery" };
            const string packageAdminControllerName = "PackageAdmin";

            if (_packageService.CountOfPackages() > 0) {
                menu.Add(T("List Packages"), "1.1", item => item.Action("List", packageAdminControllerName, values));
            }
        }
Пример #22
0
        private void BuildMenu(NavigationItemBuilder menu) {
            //want to sequence the showing of the menus from start up
            //first require a forum root to be made via the create forum root menu 
            //then the manage forum root menu can be shown
            //once a root exists, then allow a category to be made via the create category menu
            //once a category is made, show the manage 
            //once a categor exists, then allow a forum to be made  before showing the categ

            var forums = _forumService.Get(VersionOptions.Latest); //TODO: this with VersionOptions.AllVersions ... should it be? Latest would be more appropriate?
            var forumCount = forums.Count();

            var singleForum = forumCount == 1 ? forums.ElementAt(0) : null;

            var forumsHomePages = _forumForumsHomePageService.Get(VersionOptions.Latest);
            var forumsHomePagesCount = forumsHomePages.Count();

            var forumCategories = _forumCategoryService.Get(VersionOptions.Latest);
           // var forumCategoriesCount = forumCategories.Count();

            menu.Add(T("blah"), "1.0",
                item => item.Action("ListForumsHomePages", "ForumAdmin", new { area = Constants.LocalArea }).Permission(Permissions.ManageForums).Permission(Permissions.ManageOwnForums));
            //by default this menu will also be shown.  It is the starting point for creating forums
            menu.Add(T("Manage Forums"), "1.1",
                 item => item.Action("ListForumsHomePages", "ForumAdmin", new { area = Constants.LocalArea }).Permission(Permissions.ManageForums).Permission(Permissions.ManageOwnForums));


            /*
            if (forumsHomePagesCount > 0)
            {
                menu.Add(T("Manage Forum Categories"), "1.2",
                     item => item.Action("ListForumCategories", "ForumAdmin", new { area = Constants.LocalArea }).Permission(Permissions.ManageForumCategories));
            }

            if (forumCategoriesCount > 0)
            {
                menu.Add(T("Manage Forum Topics"), "1.3",
                    item => item.Action("ListForums", "ForumAdmin", new { area = Constants.LocalArea }).Permission(Permissions.ManageForums));
            }
            */
            menu.Add(T("Reported Posts"), "1.4",
                    item => item.Action("ListPostReports", "ReportPostAdmin", new { area = Constants.LocalArea }).Permission(Permissions.ModerateInappropriatePosts).Permission(Permissions.ModerateOwnInappropriatePosts));
            menu.Add(T("Subscription Translations"), "1.5",
                    item => item.Action("EditSubscriptionEmailTemplate", "SubscriptionEmailTemplateAdmin", new { area = Constants.LocalArea }).Permission(Permissions.ManageForums));
        }
Пример #23
0
        private void BuildMenu(NavigationItemBuilder menu)
        {
           // Admin/Contents/List/Movie
            menu.Add(T("List"), "1.0", item =>
                item.Action("List", "Admin", new { area = "Contents", id = "Movie" }));

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

            menu.Add(T("Movie Lookup"), "1.2", item =>
                item.Action("Index", "MovieLookup", new { area = "Pluralsight.Movies" }).Permission(Permissions.LookupMovie));

            menu.Add(T("Actors"), "2.0", item =>
                item.Action("Index", "ActorsAdmin", new { area = "Pluralsight.Movies" }));

            //Admin/Contents/List/PrettyGallery
             menu.Add(T("Image Gallery"), "3.0", item =>
                item.Action("List", "Admin", new { area = "Contents", id = "PrettyGallery" }));
        }
Пример #24
0
        private void BuildMenu(NavigationItemBuilder menu) {
            var seasons = _seasonService.Get();
            var seasonCount = seasons.Count();
            var singleSeason = seasonCount == 1 ? seasons.ElementAt(0) : null;

            if (seasonCount > 0 && singleSeason == null)
            {
                menu.Add(T("Manage Seasons"), "1",
                         item => item.Action("List", "SeasonAdmin", new { area = "ObalRoku.Entries" }));
            }
            else if (singleSeason != null) {
                menu.Add(T("Manage Season"), "1.0",
                         item => item.Action("Item", "SeasonAdmin", new {area = "ObalRoku.Entries", seasonId = singleSeason.Id}));
            }

            menu.Add(T("New Season"), "1.2",
                     item =>
                     item.Action("Create", "SeasonAdmin", new { area = "ObalRoku.Entries" }));

        }
Пример #25
0
        private void BuildMenu(NavigationItemBuilder menu)
        {

            menu
                .Add(T("Events"), "1.0",
                    item => item.Action("Events", "Admin", new { area = "Orchard.CalendarEvents" })
                        .Permission(Permissions.ManageEvents));
            menu
                .Add(T("Calendars"), "1.1",
                    item => item.Action("Calendars", "Admin", new { area = "Orchard.CalendarEvents" })
                        .Permission(Permissions.ManageCalendars));
            menu
                .Add(T("Events"), "1.2",
                    item => item.Action("Events", "Admin", new { area = "Orchard.CalendarEvents" })
                        .Permission(Permissions.ManageEvents));
            menu
                .Add(T("Event Categories"), "1.4",
                    item => item.Action("EventCategories", "Admin", new { area = "Orchard.CalendarEvents" })
                        .Permission(Permissions.ManageEventTypes));

        }
Пример #26
0
        private void BuildMenu(NavigationItemBuilder menu)
        {
            menu.Add(T("New Feature Group"), "1.01",
                     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 = "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 = "FeaturedItemSlider" }));
            }
        }
Пример #27
0
        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));

        }
Пример #28
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.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));

        }
Пример #29
0
        private void BuildMenu(NavigationItemBuilder menu) {
            var destinations = this.destinationService.Get();
            var destinationCount = destinations.Count();
            var singleDestination = destinationCount == 1 ? destinations.ElementAt(0) : null;

            if (destinationCount > 0 && singleDestination == null) {
                menu.Add(T("Manage Destinations"), "3",
                         item => item.Action("List", "DestinationAdmin", new { area = "Summit.Core" }).Permission(Permissions.MetaListDestinations));
            }
            else if (singleDestination != null)
                menu.Add(T("Manage Destination"), "1.0",
                    item => item.Action("Item", "DestinationAdmin", new { area = "Summit.Core", destinationId = singleDestination.Id }).Permission(Permissions.MetaListOwnDestinations));

            if (singleDestination != null)
                menu.Add(T("New Hotel"), "1.1",
                         item =>
                         item.Action("Create", "HotelAdmin", new { area = "Summit.Core", destinationId = singleDestination.Id }).Permission(Permissions.MetaListOwnDestinations));

            menu.Add(T("New Destination"), "1.2",
                     item =>
                     item.Action("Create", "DestinationAdmin", new { area = "Summit.Core" }).Permission(Permissions.ManageDestinations));

        }
Пример #30
0
        private void BuildMenu(NavigationItemBuilder menu)
        {
            menu.LinkToFirstChild(false); // See: https://github.com/OrchardCMS/Orchard/issues/2634
            menu.Action("Index", "Admin", new { area = "Associativy.Administration" }).Permission(Permissions.ManageAssociativyGraphs);

            var graphs = _graphManager.FindGraphs(GraphContext.Empty).OrderBy(descriptor => descriptor.DisplayName.Text);

            int i = 0;
            foreach (var graph in graphs)
            {
                menu.Add(graph.DisplayName, i.ToString(),
                     item => item.Action("ManageGraph", "Admin", new { area = "Associativy.Administration", GraphName = graph.Name }).Permission(Permissions.ManageAssociativyGraphs));
                i++;
            }
        }