Example #1
0
        /// <summary>
        /// 添加子菜单
        /// </summary>
        /// <param name="menu"></param>
        /// <param name="ParentId"></param>
        /// <param name="modules"></param>
        // 递归算法
        private void FillMenu(MenuItemDefinition menu, int ParentId, List <Module> modules)
        {
            List <Module> drs = modules.Where(x => x.ParentId == ParentId).ToList();

            if (drs == null || drs.Count <= 0)
            {
                return;
            }
            else
            {
                for (int i = 0; i < drs.Count; i++)
                {
                    Module             dr       = drs[i];
                    MenuItemDefinition nodeName = new MenuItemDefinition(
                        dr.Name,
                        L(dr.DisplayName),
                        url: dr.Url,
                        icon: "business",
                        requiredPermissionName: dr.RequiredPermissionName,
                        customData: i
                        );
                    menu.AddItem(nodeName);
                    FillMenu(nodeName, dr.Id, modules);
                }
            }
        }
Example #2
0
        private MenuItemDefinition LoadMenuFromModules()
        {
            if (!AbpSession.TenantId.HasValue)
            {
                return(null);
            }

            var rootMenuItem = new MenuItemDefinition("CustomModules", L("自定义模块"));

            rootMenuItem.Icon = "layui-icon layui-icon-app";

            using (var moduleInfoManagerWrapper = IocManager.Instance.ResolveAsDisposable <IModuleInfoManager>())
            {
                var modules = moduleInfoManagerWrapper.Object.GetAll().Where(o => !o.IsInterModule).ToList();
                foreach (var module in modules)
                {
                    var menuItem = new MenuItemDefinition($"Module.Tenancy.{module.ModuleKey}",
                                                          L(module.ModuleName),
                                                          requiresAuthentication: true,
                                                          url: $"/ModuleData?moduleKey={module.ModuleKey}",
                                                          icon: "layui-icon layui-icon-zlayers"
                                                          );
                    menuItem.PermissionDependency = new SimplePermissionDependency($"Menu.Module.Tenancy.{module.ModuleKey}");
                    rootMenuItem.AddItem(menuItem);
                }

                if (modules.Count > 0)
                {
                    return(rootMenuItem);
                }
                return(null);
            }
        }
Example #3
0
        public virtual List <MenuItemDefinition> GetMenuItemDefinitions(Guid?partantId)
        {
            List <MenuItemDefinition> menus = new List <MenuItemDefinition>();
            //todo 一次性取出,并添加缓存
            var list = _menuRepository.GetAll().Where(p => p.ParentId == partantId).ToList();

            foreach (var item in list)
            {
                var menuItemDefinition = new MenuItemDefinition(
                    name: item.Name,
                    displayName: L(item.DisplayName),
                    url: item.Url,
                    icon: item.IconClass,
                    order: item.Order,
                    permissionDependency: new SimplePermissionDependency(item.PermissionName),
                    customData: new
                {
                    item.Id,
                    item.PermissionName,
                    item.Group,
                    item.IsHome,
                    item.Default,
                    item.NotClose
                }
                    );
                var items = GetMenuItemDefinitions(item.Id);
                foreach (var itemChild in items)
                {
                    menuItemDefinition.AddItem(itemChild);
                }
                menus.Add(menuItemDefinition);
            }
            return(menus);
        }
Example #4
0
        public override void SetNavigation(INavigationProviderContext context)
        {
            var contentManageMenu = new MenuItemDefinition(
                "ContentManage",
                new LocalizableString("ContentManage", CarFactoryConsts.LocalizationSourceName),
                "icon-layers",
                requiresAuthentication: true,
                order: 0
                );

            var settingsManageMenu = new MenuItemDefinition(
                "Settings",
                new LocalizableString("Settings", CarFactoryConsts.LocalizationSourceName),
                "icon-layers",
                requiresAuthentication: true,
                order: 1);



            var product = new MenuItemDefinition(
                ProductAppPermissions.Product,
                L("Product"),
                url: "admin/ProductManage",
                icon: "icon-grid"//,
                //requiredPermissionName: ProductAppPermissions.Product
                );

            contentManageMenu.AddItem(product);

            context.Manager.MainMenu.AddItem(contentManageMenu).AddItem(settingsManageMenu);
        }
 protected virtual MenuItemDefinition AddItems(MenuItemDefinition definition, params MenuItemDefinition[] items)
 {
     foreach (var item in items)
     {
         definition = definition.AddItem(item);
     }
     return(definition);
 }
Example #6
0
        public override void SetNavigation(INavigationProviderContext context)
        {
            Assembly _assembly = Assembly.GetExecutingAssembly();
            string   xmlName   = _assembly.GetManifestResourceNames().Where(e => e.EndsWith(".Navigation.xml")).FirstOrDefault();

            if (string.IsNullOrEmpty(xmlName))
            {
                return;
            }
            Stream      stream = _assembly.GetManifestResourceStream(xmlName);
            XmlDocument xmlDoc = null;

            xmlDoc = new XmlDocument();
            xmlDoc.Load(stream);
            foreach (XmlNode node1 in xmlDoc.SelectNodes("/items/menu"))
            {
                var level1Name                   = node1.Attributes["name"]?.Value;
                var level1DisplayName            = node1.Attributes["displayName"]?.Value;
                var level1Icon                   = node1.Attributes["icon"]?.Value;
                var level1Url                    = node1.Attributes["url"]?.Value;
                var level1RequiredPermissionName = node1.Attributes["requiredPermissionName"]?.Value;
                var level1Target                 = node1.Attributes["target"]?.Value;
                var menu1 = new MenuItemDefinition(level1Name, L(level1DisplayName), level1Icon, level1Url, true, level1RequiredPermissionName, target: level1Target);
                foreach (XmlNode node2 in node1.SelectNodes("descendant::subTitle/menu"))
                {
                    var level2Name                   = node2.Attributes["name"]?.Value;
                    var level2DisplayName            = node2.Attributes["displayName"]?.Value;
                    var level2Icon                   = node2.Attributes["icon"]?.Value;
                    var level2Url                    = node2.Attributes["url"]?.Value;
                    var level2RequiredPermissionName = node2.Attributes["requiredPermissionName"]?.Value;
                    var menu2 = new MenuItemDefinition(level2Name, L(level2DisplayName), level2Icon, level2Url, true, level2RequiredPermissionName);
                    foreach (XmlNode node3 in node2.SelectNodes("descendant::subItems/menu"))
                    {
                        var level3Name = node3.Attributes["name"]?.Value;
                        Debug.WriteLine(level3Name);
                        var level3DisplayName            = node3.Attributes["displayName"]?.Value;
                        var level3Icon                   = node3.Attributes["icon"]?.Value;
                        var level3Url                    = node3.Attributes["url"]?.Value;
                        var level3RequiredPermissionName = node3.Attributes["requiredPermissionName"]?.Value;
                        var menu3 = new MenuItemDefinition(level3Name, L(level3DisplayName), level3Icon, level3Url, true, level3RequiredPermissionName);
                        List <MenuItemDefinition> menuItemDefinitions = new List <MenuItemDefinition>();
                        foreach (XmlNode node4 in node3.SelectNodes("descendant::rightItems/menu"))
                        {
                            var level4Name                   = node4.Attributes["name"]?.Value;
                            var level4DisplayName            = node4.Attributes["displayName"]?.Value;
                            var level4Icon                   = node4.Attributes["icon"]?.Value;
                            var level4Url                    = node4.Attributes["url"]?.Value;
                            var level4RequiredPermissionName = node4.Attributes["requiredPermissionName"]?.Value;
                            menuItemDefinitions.Add(new MenuItemDefinition(level4Name, L(level4DisplayName), level4Icon, level4Url, true, level4RequiredPermissionName, 0, level4DisplayName));
                        }
                        menu3.CustomData = menuItemDefinitions;
                        menu2.AddItem(menu3);
                    }
                    menu1.AddItem(menu2);
                }
                context.Manager.MainMenu.AddItem(menu1);
            }
        }
        public MenuItemDefinition InitNav(MenuItemDefinition menuItemDefinition)
        {
            var zcgl = new MenuItemDefinition(GeneralTreeConsts.GeneralTreeMenuName,
                                              "数据字典".L1(),
                                              icon: "generalTree",
                                              requiredPermissionName: GeneralTreeConsts.GeneralTreeGetPermissionName);

            menuItemDefinition.AddItem(zcgl);
            return(zcgl);
        }
Example #8
0
        public MenuItemDefinition InitNav(MenuItemDefinition menuItemDefinition)
        {
            var zcgl = new MenuItemDefinition(GeneralTreeConsts.GeneralTreeMenuName,
                                              "数据字典".GeneralTreeLI(),
                                              icon: "generalTree",
                                              permissionDependency: new SimplePermissionDependency(GeneralTreeConsts.GeneralTreeGetPermissionName));

            menuItemDefinition.AddItem(zcgl);
            return(zcgl);
        }
        private void GetChildMenus(MenuItemDefinition menuItem)
        {
            var childs = _menuRepository.GetAllList(p => p.ParentMenuName == menuItem.Name && p.IsEnabled == true && p.IsVisible == true && p.Name != menuItem.Name).OrderBy(p => p.Order);

            foreach (var item in childs)
            {
                menuItem.AddItem(new MenuItemDefinition(item.Name, L(item.LocalizationName), icon: item.Icon, url: item.Url,
                                                        requiresAuthentication: item.RequiresAuthentication, requiredPermissionName: item.RequiredPermissionName, order: item.Order,
                                                        isEnabled: item.IsEnabled, isVisible: item.IsVisible));
                var currentItem = menuItem.Items.Find(p => p.Name == item.Name);
                GetChildMenus(currentItem);
            }
        }
Example #10
0
        public override void SetNavigation(INavigationProviderContext context)
        {
            var administrationMenu = new MenuDefinition("AdministrationMenu", new FixedLocalizableString("后台管理"));

            var pagees = new MenuItemDefinition(
                Permissions.Pages_Administration,
                new LocalizableString("PagesAdministration", LyuAdminConsts.PermissionsSourceName),
                "fa fa-wrench",
                "/admin/dashboard",
                true,
                Permissions.Pages_Administration
                );

            var role = new MenuItemDefinition(
                RolesPermissions.Role,
                new LocalizableString("Role", LyuAdminConsts.PermissionsSourceName),
                "fa fa-circle-o",
                "/admin/role",
                true,
                RolesPermissions.Role
                );

            var user = new MenuItemDefinition(
                UsersPermissions.User,
                new LocalizableString("User", LyuAdminConsts.PermissionsSourceName),
                "fa fa-circle-o",
                "/admin/user",
                true,
                UsersPermissions.User
                );

            pagees.AddItem(user);
            pagees.AddItem(role);

            administrationMenu
            .AddItem(pagees);
            context.Manager.Menus.Add("AdministrationMenu", administrationMenu);
        }
Example #11
0
        public override void SetNavigation(INavigationProviderContext context)
        {
            var menu = context.Manager.Menus[MenuName] = new MenuDefinition(MenuName, new FixedLocalizableString("Main Menu"));

            var administration = new MenuItemDefinition(
                PageNames.Common.Administration,
                L(PageNames.Common.Administration),
                "fa fa-cogs",
                requiredPermissionName: LmsPermissions.Pages_Administration
                );

            var user = new MenuItemDefinition(
                PageNames.Common.Users,
                L(PageNames.Common.Users),
                "fa fa-users",
                NavigationUrls.Users,
                requiredPermissionName: UserPermissions.User
                );

            var role = new MenuItemDefinition(
                PageNames.Common.Roles,
                L(PageNames.Common.Roles),
                "fa fa-users",
                NavigationUrls.Roles,
                requiredPermissionName: RolePermissions.Role
                );
            var job = new MenuItemDefinition(
                PageNames.Common.Jobs,
                L(PageNames.Common.Jobs),
                "fa fa-support",
                NavigationUrls.Jobs,
                requiredPermissionName: PostPermissions.Post
                );

            var team = new MenuItemDefinition(
                PageNames.Common.Teams,
                L(PageNames.Common.Teams),
                "fa fa-user-circle",
                NavigationUrls.Teams,
                requiredPermissionName: TeamPermissions.Team
                );

            menu.AddItem(
                administration.AddItem(user).AddItem(role)
                ).AddItem(
                job
                ).AddItem(
                team
                );
        }
Example #12
0
 private void SetNavigation(MenuItemDefinition menuItemDefinition, List <MenuItem> menuItems, int parentId)
 {
     foreach (MenuItem menuItem in menuItems.Where(m => m.Parent?.Id == parentId))
     {
         menuItemDefinition.AddItem(new MenuItemDefinition(
                                        menuItem.Name,
                                        L(menuItem.Name),
                                        url: menuItem.Route,
                                        icon: menuItem.Icon,
                                        target: "tab_" + menuItem.Id,
                                        requiredPermissionName: menuItem.PermissionName,
                                        order: menuItem.Sort
                                        ));
     }
 }
Example #13
0
        public void SetMenusWithDown(List <AbpMenuBaseDto> source, AbpMenuBaseDto menuNode, MenuItemDefinition menu)
        {
            var items = source.Where(r => r.ParentId == menuNode.Id);

            if (items.Count() > 0)
            {
                foreach (var item in items)
                {
                    var node = menu.AddItem(new MenuItemDefinition(item.Code, L(item.DisplayName),
                                                                   item.Icon, item.Url, item.RequiresAuthentication, item.RequiredPermissionName, item.Order, item.CustomData,
                                                                   null, item.Target, item.IsEnabled, item.IsVisible, null)
                    {
                    });
                    SetMenusWithDown(source, item, node);
                }
            }
        }
Example #14
0
        public override void SetNavigation(INavigationProviderContext context)
        {
            XmlDocument NavigationXml = new XmlDocument();
            // string currentDirectory = Path.GetFullPath("../../Domain/Localization/XmlData/Navigation.xml");
            //string currentDirectory = Path.GetFullPath(_HostingEnvironment.WebRootPath + "/Navigation.xml");
            //string[] name = Assembly.GetExecutingAssembly().GetManifestResourceNames();
            Stream            sm       = Assembly.Load("UnionMall.Core").GetManifestResourceStream("UnionMall.Localization.XmlData.Navigation.xml");
            XmlReaderSettings settings = new XmlReaderSettings();

            settings.IgnoreComments = true; //忽略注释
            XmlReader reader = XmlReader.Create(sm, settings);

            NavigationXml.Load(reader);
            XmlNodeList List = NavigationXml.SelectNodes("//Navigation//First");

            if (List != null)
            {
                foreach (XmlNode item in List)
                {
                    MenuItemDefinition first = new MenuItemDefinition(
                        item.Attributes["Name"].Value,
                        L(item.Attributes["Name"].Value),
                        url: "",
                        icon: item.Attributes["Icon"].Value,
                        requiredPermissionName: item.Attributes["Name"].Value,
                        requiresAuthentication: true
                        );

                    if (item.ChildNodes != null && item.ChildNodes.Count > 0)
                    {
                        foreach (XmlNode subItem in item.ChildNodes)
                        {
                            MenuItemDefinition second = new MenuItemDefinition(
                                subItem.Attributes["Name"].Value,
                                L(subItem.Attributes["Name"].Value),
                                url: subItem.Attributes["Url"].Value,
                                icon: "",
                                requiredPermissionName: item.Attributes["Name"].Value + "." + subItem.Attributes["Name"].Value
                                );
                            first.AddItem(second);
                        }
                    }
                    context.Manager.MainMenu.AddItem(first);
                }
            }
        }
Example #15
0
        private void BuildTree(MenuItemDefinition menuItem, MenuItemDefine item, List <MenuItemDefine> data)
        {
            //找当前项的子项
            var subMenuList = data.FindAll(c => c.ParentMenuGuid == item.MenuGuid).OrderBy(c => c.Order).ToList();

            foreach (var subItem in subMenuList)
            {
                var subMenuItem = new MenuItemDefinition(
                    subItem.Name,
                    L(subItem.DisplayName),
                    url: subItem.Url + "/index?menuGuid=" + subItem.MenuGuid,
                    icon: subItem.Icon
                    );
                menuItem.AddItem(subMenuItem);
                BuildTree(subMenuItem, subItem, subMenuList);
            }
        }
Example #16
0
        public void SetMenu(MenuItemDefinition mainMenu, IEnumerable <MenuDto> menues)
        {
            foreach (var menu in menues)
            {
                var menuitem = new MenuItemDefinition(
                    menu.Name,
                    new LocalizableString(menu.DisplayName, IdentityConsts.LocalizationSourceName),
                    url: menu.Url,
                    icon: menu.Icon
                    );
                mainMenu.AddItem(menuitem);

                if (menu.Items.Count > 0)
                {
                    SetMenu(menuitem, menu.Items);
                }
            }
        }
Example #17
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="context"></param>
        private void SetChildrenMenusNavigation(MenuItemDefinition subMenuItemDefinition, SysMenus model)
        {
            foreach (var item in model.ChildrenMenus)
            {
                MenuItemDefinition menuItemDefinition = new MenuItemDefinition(
                    name: item.MenuName,
                    displayName: new FixedLocalizableString(item.MenuDisplayName),
                    icon: item.Icon,
                    url: item.Url,
                    requiresAuthentication: item.IsRequiresAuth,
                    requiredPermissionName: item.PermissionName,
                    customData: null,
                    order: Convert.ToInt32(item.OrderBy)
                    );

                subMenuItemDefinition.AddItem(menuItemDefinition);

                SetChildrenMenusNavigation(menuItemDefinition, item);
            }
        }
        public void BuildSubMenu(MenuItemDefinition menu, int parentId, List <MenuDto> list)
        {
            var nList = list.Where(x => x.ParentId == parentId).ToList();

            if (nList != null && nList.Count > 0)
            {
                nList.ForEach(g =>
                {
                    var subMenu = new MenuItemDefinition(
                        g.PageName,
                        MenuL(g.MenuName),
                        g.Icon,
                        g.Url,
                        false,
                        g.Orders
                        );
                    menu.AddItem(subMenu);
                    BuildSubMenu(subMenu, g.Id, list);
                });
            }
        }
        public override void SetNavigation(INavigationProviderContext context)
        {
            var menu = context.Manager.Menus[MpaNavigationProvider.MenuName];

            if (menu != null)
            {
                #region 报表导航
                var reports = new MenuItemDefinition(
                    UbpMenu.Reports,
                    L("Reports"),
                    icon: "icon-docs",
                    requiredPermissionName: AppPermissions_ReportManager.Pages_Reports
                    );

                var categories = _reportCategoryManager.GetAllCategoriesAsync().Result;

                categories.ForEach(category =>
                {
                    reports.AddItem(new MenuItemDefinition(
                                        UbpMenu.Reports + "." + category.CategoryName,
                                        L(category.CategoryName),
                                        url: "ReportManager/Previewer/ReportList?categoryId=" + category.Id,
                                        icon: "icon-doc",
                                        requiredPermissionName: "Pages.ReportManager.Reports." + category.CategoryName
                                        ));
                });

                reports.AddItem(new MenuItemDefinition(
                                    UbpMenu.ReportsPBIReports,
                                    L("PBIReports"),
                                    url: "ReportManager/Previewer/PBIReportList",
                                    icon: "icon-doc",
                                    requiredPermissionName: AppPermissions_ReportManager.Pages_ReportManager_Reports_PBIReports
                                    ));

                menu.AddItem(reports);
                #endregion

                #region 报表管理导航
                menu.AddItem(new MenuItemDefinition(
                                 UbpMenu.ReportManager,
                                 L("ReportManager"),
                                 icon: "icon-graph",
                                 requiredPermissionName: AppPermissions_ReportManager.Pages_ReportManager
                                 ).AddItem(new MenuItemDefinition(
                                               UbpMenu.ReportManagerCategories,
                                               L("ReportManagerCategories"),
                                               url: "ReportManager/Category",
                                               icon: "icon-grid",
                                               requiredPermissionName: AppPermissions_ReportManager.Pages_ReportManager_Categories
                                               )
                                           ).AddItem(new MenuItemDefinition(
                                                         UbpMenu.ReportManagerTemplates,
                                                         L("ReportManagerTemplates"),
                                                         url: "ReportManager/Template",
                                                         icon: "icon-grid",
                                                         requiredPermissionName: AppPermissions_ReportManager.Pages_ReportManager_Templates
                                                         )
                                                     )
                             );
                #endregion

                #region 后台任务管理导航
                menu.AddItem(new MenuItemDefinition(
                                 UbpMenu.BackgroundJobManager,
                                 L("BackgroundJobManager"),
                                 icon: "icon-calendar",
                                 requiredPermissionName: AppPermissions_BackgroundJobManager.Pages_BackgroundJobManager
                                 ).AddItem(new MenuItemDefinition(
                                               UbpMenu.BackgroundJobManagerJobGroups,
                                               L("JobGroupManager"),
                                               url: "BackgroundJobManager/JobGroup",
                                               icon: "icon-film",
                                               requiredPermissionName: AppPermissions_BackgroundJobManager.Pages_BackgroundJobManager_JobGroups
                                               )
                                           ).AddItem(new MenuItemDefinition(
                                                         UbpMenu.BackgroundJobManagerJob_RPTEmails,
                                                         L("Job_RPTEmailManager"),
                                                         url: "BackgroundJobManager/Job_RPTEmail",
                                                         icon: "icon-directions",
                                                         requiredPermissionName: AppPermissions_BackgroundJobManager.Pages_BackgroundJobManager_Job_RPTEmails
                                                         )
                                                     ).AddItem(new MenuItemDefinition(
                                                                   UbpMenu.BackgroundJobManagerJob_Sql,
                                                                   L("Job_SqlManager"),
                                                                   url: "BackgroundJobManager/Job_Sql",
                                                                   icon: "icon-bag",
                                                                   requiredPermissionName: AppPermissions_BackgroundJobManager.Pages_BackgroundJobManager_Job_Sql
                                                                   )
                                                               ).AddItem(new MenuItemDefinition(
                                                                             UbpMenu.BackgroundJobManagerSchedulers,
                                                                             L("ScheduleManager"),
                                                                             url: "BackgroundJobManager/Scheduler",
                                                                             icon: "icon-bell",
                                                                             requiredPermissionName: AppPermissions_BackgroundJobManager.Pages_BackgroundJobManager_Schedulers
                                                                             )
                                                                         ).AddItem(new MenuItemDefinition(
                                                                                       UbpMenu.BackgroundJobManagerTriggers,
                                                                                       L("TriggerManager"),
                                                                                       url: "BackgroundJobManager/Trigger",
                                                                                       icon: "icon-clock",
                                                                                       requiredPermissionName: AppPermissions_BackgroundJobManager.Pages_BackgroundJobManager_Triggers
                                                                                       )
                                                                                   ).AddItem(new MenuItemDefinition(
                                                                                                 UbpMenu.BackgroundJobManagerLoggers,
                                                                                                 L("LoggerManager"),
                                                                                                 url: "BackgroundJobManager/Logger",
                                                                                                 icon: "icon-note",
                                                                                                 requiredPermissionName: AppPermissions_BackgroundJobManager.Pages_BackgroundJobManager_Loggers
                                                                                                 )
                                                                                             )
                             );
                #endregion

                #region 企业微信管理导航
                //icon-share
                menu.AddItem(new MenuItemDefinition(
                                 UbpMenu.WeiXinManager,
                                 L("WeiXinManager"),
                                 icon: "icon-bubble",
                                 requiredPermissionName: AppPermissions_WeiXinManager.Pages_WeiXinManager
                                 ).AddItem(new MenuItemDefinition(
                                               UbpMenu.WeiXinManager_WeiXinConfigs,
                                               L("WeiXinManager_Config"),
                                               url: "WeiXinManager/WeiXinConfig",
                                               icon: "icon-wrench",
                                               requiredPermissionName: AppPermissions_WeiXinManager.Pages_WeiXinManager_WeiXinConfigs
                                               )
                                           ).AddItem(new MenuItemDefinition(
                                                         UbpMenu.WeiXinAppManager,
                                                         L("WeiXinManager_App"),
                                                         url: "WeiXinManager/WeiXinApp",
                                                         icon: "icon-social-dropbox",
                                                         requiredPermissionName: AppPermissions_WeiXinManager.Pages_WeiXinManager_WeiXinApps
                                                         )
                                                     )
                             );

                #endregion
            }
        }
        public override void SetNavigation(INavigationProviderContext context)
        {
            var homeMenu = new MenuItemDefinition(
                "Home",
                L("HomePage"),
                "icon-layers",
                "/",
                requiresAuthentication: true,
                order: 0
                );

            var contentManageMenu = new MenuItemDefinition(
                "ContentManage",
                new LocalizableString("ContentManage", CarFactoryConsts.LocalizationSourceName),
                "icon-layers",
                requiresAuthentication: true,
                order: 1
                );

            var settingsManageMenu = new MenuItemDefinition(
                "Settings",
                new LocalizableString("Settings", CarFactoryConsts.LocalizationSourceName),
                "icon-layers",
                requiresAuthentication: true,
                order: 2);



            var product = new MenuItemDefinition(
                PageNames.Products,
                L(PageNames.Products),
                url: "/admin/ProductManage",
                icon: "icon-grid",
                requiredPermissionName: ProductAppPermissions.Product
                );

            var productCategory = new MenuItemDefinition(
                PageNames.ProductCategory,
                L(PageNames.ProductCategory),
                url: "/admin/CategoryManage",
                icon: "icon-grid",
                requiredPermissionName: CategoryAppPermissions.Category
                );

            var report = new MenuItemDefinition(
                PageNames.Reports,
                L(PageNames.Reports),
                url: "/admin/ReportManage",
                icon: "icon-grid",
                requiredPermissionName: ReportAppPermissions.Report
                );

            var company = new MenuItemDefinition(
                PageNames.Company,
                L(PageNames.Company),
                url: "/admin/company",
                icon: "icon-grid",
                requiredPermissionName: CompanyAppPermissions.Company
                );

            var banner = new MenuItemDefinition(
                PageNames.Banner,
                L(PageNames.Banner),
                url: "/admin/BannerManage",
                icon: "icon-grid",
                requiredPermissionName: BannerAppPermissions.Banner
                );

            var role = new MenuItemDefinition(
                PageNames.Roles,
                L(PageNames.Roles),
                url: "/admin/RoleManage",
                icon: "icon-grid",
                requiredPermissionName: PermissionNames.Pages_Roles
                );

            var user = new MenuItemDefinition(
                PageNames.Users,
                L(PageNames.Users),
                url: "/admin/UserManage",
                icon: "icon-grid",
                requiredPermissionName: PermissionNames.Pages_Users);

            var seo = new MenuItemDefinition(
                PageNames.Seo,
                L(PageNames.Seo),
                url: "/admin/Seo",
                icon: "icon-grid");


            contentManageMenu.AddItem(product).AddItem(productCategory).AddItem(report).AddItem(company).AddItem(banner);
            settingsManageMenu.AddItem(role).AddItem(user).AddItem(seo);

            context.Manager.MainMenu.AddItem(homeMenu).AddItem(contentManageMenu).AddItem(settingsManageMenu);
        }
Example #21
0
        public override void SetNavigation(INavigationProviderContext context)
        {
            context.Manager.MainMenu.DisplayName = L("MainMenu");


            var administration = new MenuItemDefinition(
                "Administration",
                L("Administration"),
                "fa fa-info"
                );

            var user = new MenuItemDefinition(
                "User",
                L("User"),
                url: "users",
                icon: "fa fa-info"
                //  requiredPermissionName: UserAppPermissions.User
                );

            var dashboard = new MenuItemDefinition(
                "Dashboard",
                new FixedLocalizableString("工作台"),
                url: "dashboard",
                icon: "fa fa-tachometer"
                );
            var about = new MenuItemDefinition(
                "About",
                new FixedLocalizableString("About"),
                url: "about",
                icon: "fa fa-tachometer"
                );
            var notifications = new MenuItemDefinition(
                "Notifications",
                L("Notifications"),
                url: "notifications",
                icon: "fa fa-tachometer"
                );
            var smsmanage = new MenuItemDefinition(
                "SmsManage",
                L("SmsManage"),
                url: "smsmanage",
                icon: "fa fa-mobile"
                );
            var orgManage = new MenuItemDefinition(
                "OrgManage",
                L("OrgManage"),
                url: "orgmanage",
                icon: "fa fa-share-alt"
                );
            var roleManage = new MenuItemDefinition(
                "RoleManage",
                L("RoleManage"),
                url: "rolemanage",
                icon: "fa fa-id-card-o"
                );
            var auditLog = new MenuItemDefinition(
                "AuditLog",
                L("AuditLog"),
                url: "auditlog",
                icon: "fa fa-briefcase"
                );

            administration
            .AddItem(user)
            .AddItem(notifications)
            .AddItem(smsmanage)
            .AddItem(orgManage)
            .AddItem(roleManage)
            .AddItem(auditLog);

            context.Manager.MainMenu.AddItem(dashboard)
            .AddItem(administration)
            .AddItem(about);



            #region 测试菜单栏


            //.AddItem(new MenuItemDefinition("Multilevel", new FixedLocalizableString("多级菜单测试"), "fa fa-beer")
            //    .AddItem(
            //        new MenuItemDefinition(
            //            "Home",
            //            new LocalizableString("HomePage", CmsConsts.LocalizationSourceName),
            //            url: "home",
            //            icon: "fa fa-home",
            //            requiresAuthentication: true
            //        ).AddItem(bankCard).AddItem(new MenuItemDefinition(
            //            "Users",
            //            L("Users"),
            //            url: "users",
            //            icon: "fa fa-users",
            //            requiredPermissionName: PermissionNames.Pages_Users)).AddItem(resourceAdministrator)
            //    ).AddItem(
            //        new MenuItemDefinition(
            //            "Tenants",
            //            L("Tenants"),
            //            url: "tenants",
            //            icon: "fa fa-globe",
            //            requiredPermissionName: PermissionNames.Pages_Tenants
            //        )
            //    ).AddItem(
            //        new MenuItemDefinition(
            //            "Users",
            //            L("Users"),
            //            url: "users",
            //            icon: "fa fa-users",
            //            requiredPermissionName: PermissionNames.Pages_Users
            //        )
            //    ).AddItem(
            //        new MenuItemDefinition(
            //            "About",
            //            new LocalizableString("About", CmsConsts.LocalizationSourceName),
            //            url: "about",
            //            icon: "fa fa-info"
            //        ))
            //).AddItem(resourceAdministrator);



            #endregion
        }
Example #22
0
        public override void SetNavigation(INavigationProviderContext context)
        {
            var t_Dep = new MenuItemDefinition(
                T_DepAppPermissions.T_Dep,
                L("基本信息维护"),
                icon: "icon-grid",
                requiresAuthentication: true
                );

            //    t_Dep.AddItem(
            //new MenuItemDefinition(
            //T_DepAppPermissions.T_Dep,
            //L("T_Dep"),
            //"icon-star",
            //url: "T_Dep"));

            t_Dep.AddItem(
                new MenuItemDefinition(
                    T_GroupAppPermissions.T_Group,
                    L("T_Group"),
                    "icon-star",
                    url: "T_Group"
                    ));
            t_Dep.AddItem(
                new MenuItemDefinition(
                    T_ContentAppPermissions.T_Content,
                    L("T_Content"),
                    "icon-star",
                    url: "T_Content"));

            t_Dep.AddItem(
                new MenuItemDefinition(
                    T_GradeAppPermissions.T_Grade,
                    L("T_Grade"),
                    "icon-star",
                    url: "T_Grade"));
            t_Dep.AddItem(
                new MenuItemDefinition(
                    T_StaffAppPermissions.T_Staff,
                    L("T_Staff"),
                    "icon-star",
                    url: "T_Staff"));
            //var t_User = new MenuItemDefinition(
            //  T_UserAppPermissions.T_User,
            //  L("T_User"),
            //  icon: "icon-grid"
            //  );

            //    t_Dep.AddItem(
            //new MenuItemDefinition(
            //T_UserAppPermissions.T_User,
            //L("T_User"),
            //"icon-star",
            //url: "T_User"));


            var t_Item = new MenuItemDefinition(
                T_ItemAppPermissions.T_Item,
                L("T_Item"),
                icon: "icon-grid",
                requiresAuthentication: true
                );

            t_Item.AddItem(
                new MenuItemDefinition(
                    T_ItemAppPermissions.T_Item,
                    L("T_Item"),
                    "icon-star",
                    url: "T_Item"));

            //     t_Item.AddItem(
            //new MenuItemDefinition(
            //T_KPointAppPermissions.T_KPoint,
            //L("T_KPoint"),
            //"icon-star",
            //url: "T_KPoint"));

            //     t_Item.AddItem(
            // new MenuItemDefinition(
            // T_CInfoAppPermissions.T_CInfo,
            // L("T_CInfo"),
            // "icon-star",
            // url: "T_CInfo"));
            //     t_Item.AddItem(
            //    new MenuItemDefinition(
            //    T_RequireAppPermissions.T_Require,
            //    L("T_Require"),
            //    "icon-star",
            //    url: "T_Require"));

            t_Item.AddItem(
                new MenuItemDefinition(
                    T_ClassAppPermissions.T_Class,
                    L("T_Class"),
                    "icon-star",
                    url: "T_Class"));



            //    t_Item.AddItem(
            //new MenuItemDefinition(
            //T_HClassAppPermissions.T_HClass,
            //L("T_HClass"),
            //"icon-star",
            //url: "T_HClass"));

            context.Manager.MainMenu
            .AddItem(
                new MenuItemDefinition(
                    "Home",
                    L("HomePage"),
                    url: "",
                    icon: "fa fa-home",
                    requiresAuthentication: true
                    )
                ).AddItem(
                new MenuItemDefinition(
                    "Tenants",
                    L("Tenants"),
                    url: "Tenants",
                    icon: "fa fa-globe",
                    requiredPermissionName: PermissionNames.Pages_Tenants
                    )
                ).AddItem(
                new MenuItemDefinition(
                    "Users",
                    L("用户管理"),
                    url: "Users",
                    icon: "fa fa-users",
                    requiredPermissionName: PermissionNames.Pages_Users
                    )).AddItem(t_Dep).AddItem(t_Item);
        }
Example #23
0
        public override void SetNavigation(INavigationProviderContext context)
        {
            var menu = context.Manager.Menus[MpaNavigationProvider.MenuName];

            if (menu != null)
            {
                var reports = new MenuItemDefinition(
                    UbpMenu.Reports,
                    L("Reports"),
                    icon: "icon-docs",
                    requiredPermissionName: AppPermissions_ReportManager.Pages_Reports
                    );

                var categories = _reportCategoryManager.GetAllCategoriesAsync().Result;

                categories.ForEach(category =>
                {
                    reports.AddItem(new MenuItemDefinition(
                                        UbpMenu.Reports + "." + category.CategoryName,
                                        L(category.CategoryName),
                                        url: "ReportManager/Previewer/ReportList?categoryId=" + category.Id,
                                        icon: "icon-doc",
                                        requiredPermissionName: "Pages.ReportManager.Reports." + category.CategoryName
                                        ));
                });

                menu.AddItem(reports);

                menu.AddItem(new MenuItemDefinition(
                                 UbpMenu.ReportManager,
                                 L("ReportManager"),
                                 icon: "icon-graph",
                                 requiredPermissionName: AppPermissions_ReportManager.Pages_ReportManager
                                 ).AddItem(new MenuItemDefinition(
                                               UbpMenu.ReportManagerCategories,
                                               L("ReportManagerCategories"),
                                               url: "ReportManager/Category",
                                               icon: "icon-grid",
                                               requiredPermissionName: AppPermissions_ReportManager.Pages_ReportManager_Categories
                                               )
                                           ).AddItem(new MenuItemDefinition(
                                                         UbpMenu.ReportManagerTemplates,
                                                         L("ReportManagerTemplates"),
                                                         url: "ReportManager/Template",
                                                         icon: "icon-grid",
                                                         requiredPermissionName: AppPermissions_ReportManager.Pages_ReportManager_Templates
                                                         )
                                                     )
                             //.AddItem(new MenuItemDefinition(
                             //     UbpMenu.ReportManagerDesigner,
                             //     L("ReportManagerDesigner"),
                             //     url: "ReportManager/Designer",
                             //     icon: "icon-layers",
                             //     requiredPermissionName: AppPermissions_ReportManager.Pages_ReportManager_Designer
                             //     )
                             //)
                             );

                menu.AddItem(new MenuItemDefinition(
                                 UbpMenu.BackgroundJobManager,
                                 L("BackgroundJobManager"),
                                 icon: "icon-calendar",
                                 requiredPermissionName: AppPermissions_BackgroundJobManager.Pages_BackgroundJobManager
                                 ).AddItem(new MenuItemDefinition(
                                               UbpMenu.BackgroundJobManagerJobGroups,
                                               L("JobGroupManager"),
                                               url: "BackgroundJobManager/JobGroup",
                                               icon: "icon-film",
                                               requiredPermissionName: AppPermissions_BackgroundJobManager.Pages_BackgroundJobManager_JobGroups
                                               )
                                           ).AddItem(new MenuItemDefinition(
                                                         UbpMenu.BackgroundJobManagerJob_RPTEmails,
                                                         L("Job_RPTEmailManager"),
                                                         url: "BackgroundJobManager/Job_RPTEmail",
                                                         icon: "icon-directions",
                                                         requiredPermissionName: AppPermissions_BackgroundJobManager.Pages_BackgroundJobManager_Job_RPTEmails
                                                         )
                                                     ).AddItem(new MenuItemDefinition(
                                                                   UbpMenu.BackgroundJobManagerSchedulers,
                                                                   L("ScheduleManager"),
                                                                   url: "BackgroundJobManager/Scheduler",
                                                                   icon: "icon-bell",
                                                                   requiredPermissionName: AppPermissions_BackgroundJobManager.Pages_BackgroundJobManager_Schedulers
                                                                   )
                                                               ).AddItem(new MenuItemDefinition(
                                                                             UbpMenu.BackgroundJobManagerTriggers,
                                                                             L("TriggerManager"),
                                                                             url: "BackgroundJobManager/Trigger",
                                                                             icon: "icon-clock",
                                                                             requiredPermissionName: AppPermissions_BackgroundJobManager.Pages_BackgroundJobManager_Triggers
                                                                             )
                                                                         )
                             );
            }
        }
        public override void SetNavigation(INavigationProviderContext context)
        {
            var homeMenu = new MenuItemDefinition("Home", new FixedLocalizableString("首页"), url: "", icon: "fa fa-home", requiresAuthentication: true);

            var baseMenu = new MenuItemDefinition("Base", new FixedLocalizableString("基础数据"), url: "", icon: "fa  fa-puzzle-piece", requiresAuthentication: true);

            baseMenu.AddItem(new MenuItemDefinition("Projects", new FixedLocalizableString("小区数据"), url: "Projects", icon: "fa fa-building-o", requiredPermissionName: LesoftWuye2.Core.Authorization.PermissionNames.Pages_Projects));
            //baseMenu.AddItem(new MenuItemDefinition("LifeInfoTypes", new FixedLocalizableString("生活信息分类"), url: "LifeInfoTypes", icon: "fa  fa-inbox", requiredPermissionName: LesoftWuye2.Core.Authorization.PermissionNames.Pages_LifeInfoTypes));
            //baseMenu.AddItem(new MenuItemDefinition("PropertyCitys", new FixedLocalizableString("项目城市"), url: "PropertyCitys", icon: "fa fa-flag", requiredPermissionName: LesoftWuye2.Core.Authorization.PermissionNames.Pages_PropertyCitys));
            //baseMenu.AddItem(new MenuItemDefinition("PropertyTypes", new FixedLocalizableString("项目分类"), url: "PropertyTypes", icon: "fa fa-flag-checkered", requiredPermissionName: LesoftWuye2.Core.Authorization.PermissionNames.Pages_PropertyTypes));
            baseMenu.AddItem(new MenuItemDefinition("SlideImages", new FixedLocalizableString("轮播图"), url: "SlideImages", icon: "fa fa-picture-o", requiredPermissionName: LesoftWuye2.Core.Authorization.PermissionNames.Pages_SlideImages));
            //baseMenu.AddItem(new MenuItemDefinition("ServiceTels", new FixedLocalizableString("服务电话"), url: "ServiceTels", icon: "fa fa-phone", requiredPermissionName: LesoftWuye2.Core.Authorization.PermissionNames.Pages_ServiceTels));
            baseMenu.AddItem(new MenuItemDefinition("EstateinfoTypes", new FixedLocalizableString("跳蚤信息分类"), url: "EstateinfoTypes", icon: "fa  fa-inbox", requiredPermissionName: LesoftWuye2.Core.Authorization.PermissionNames.Pages_EstateinfoTypes));
            baseMenu.AddItem(new MenuItemDefinition("RentsaleinfoTypes", new FixedLocalizableString("租售信息分类"), url: "RentsaleinfoTypes", icon: "fa  fa-suitcase", requiredPermissionName: LesoftWuye2.Core.Authorization.PermissionNames.Pages_RentsaleinfoTypes));
            baseMenu.AddItem(new MenuItemDefinition("FeeServices", new FixedLocalizableString("有偿服务"), url: "FeeServices", icon: "fa fa-volume-up", requiredPermissionName: LesoftWuye2.Core.Authorization.PermissionNames.Pages_FeeServices));
            baseMenu.AddItem(new MenuItemDefinition("WeixinSubscribes", new FixedLocalizableString("关注回复"), url: "WeixinSubscribes", icon: "fa  fa-suitcase", requiredPermissionName: LesoftWuye2.Core.Authorization.PermissionNames.Pages_WeixinSubscribes));



            var articlesMenu = new MenuItemDefinition("Aricle", new FixedLocalizableString("物业资讯"), url: "", icon: "fa  fa-info-circle", requiresAuthentication: true);

            articlesMenu.AddItem(new MenuItemDefinition("Notices", new FixedLocalizableString("社区公告"), url: "Notices", icon: "fa fa-volume-up", requiredPermissionName: LesoftWuye2.Core.Authorization.PermissionNames.Pages_Projects));
            articlesMenu.AddItem(new MenuItemDefinition("Newss", new FixedLocalizableString("社区资讯"), url: "Newss", icon: "fa  fa-copy", requiredPermissionName: LesoftWuye2.Core.Authorization.PermissionNames.Pages_Newss));
            //articlesMenu.AddItem(new MenuItemDefinition("LifeInfos", new FixedLocalizableString("生活信息"), url: "LifeInfos", icon: "fa   fa-tag", requiredPermissionName: LesoftWuye2.Core.Authorization.PermissionNames.Pages_LifeInfos));
            //articlesMenu.AddItem(new MenuItemDefinition("Propertys", new FixedLocalizableString("物业项目"), url: "Propertys", icon: "fa  fa-bookmark-o", requiredPermissionName: LesoftWuye2.Core.Authorization.PermissionNames.Pages_Propertys));
            articlesMenu.AddItem(new MenuItemDefinition("Activitys", new FixedLocalizableString("社区活动"), url: "Activitys", icon: "fa  fa-heart", requiredPermissionName: LesoftWuye2.Core.Authorization.PermissionNames.Pages_Activitys));
            articlesMenu.AddItem(new MenuItemDefinition("Substations", new FixedLocalizableString("关于我们"), url: "Substations", icon: "fa fa-phone", requiredPermissionName: LesoftWuye2.Core.Authorization.PermissionNames.Pages_Substations));
            articlesMenu.AddItem(new MenuItemDefinition("Estateinfos", new FixedLocalizableString("跳蚤信息"), url: "Estateinfos", icon: "fa fa-shopping-cart", requiredPermissionName: LesoftWuye2.Core.Authorization.PermissionNames.Pages_Estateinfos));
            articlesMenu.AddItem(new MenuItemDefinition("Rentsaleinfos", new FixedLocalizableString("租售信息"), url: "Rentsaleinfos", icon: "fa fa-suitcase", requiredPermissionName: LesoftWuye2.Core.Authorization.PermissionNames.Pages_Rentsaleinfos));

            var mallMenu = new MenuItemDefinition("Mall", new FixedLocalizableString("电商模块"), url: "", icon: "fa fa-leaf", requiresAuthentication: true);

            mallMenu.AddItem(new MenuItemDefinition("MallSlideImages", new FixedLocalizableString("商城轮播图管理"), url: "MallSlideImages", icon: "fa fa-picture-o", requiredPermissionName: LesoftWuye2.Core.Authorization.PermissionNames.Pages_MallSlideImages));
            mallMenu.AddItem(new MenuItemDefinition("Suppliers", new FixedLocalizableString("供应商"), url: "Suppliers", icon: "fa fa-shopping-cart", requiredPermissionName: LesoftWuye2.Core.Authorization.PermissionNames.Pages_Suppliers));
            mallMenu.AddItem(new MenuItemDefinition("Categorys", new FixedLocalizableString("商品分类"), url: "Categorys", icon: "fa fa-sitemap", requiredPermissionName: LesoftWuye2.Core.Authorization.PermissionNames.Pages_Categorys));
            mallMenu.AddItem(new MenuItemDefinition("Products", new FixedLocalizableString("商品管理"), url: "Products", icon: "fa fa-bullhorn", requiredPermissionName: LesoftWuye2.Core.Authorization.PermissionNames.Pages_Products));
            mallMenu.AddItem(new MenuItemDefinition("ProductComments", new FixedLocalizableString("商品评论管理"), url: "ProductComments", icon: "fa fa-comments-o", requiredPermissionName: LesoftWuye2.Core.Authorization.PermissionNames.Pages_ProductComments));
            mallMenu.AddItem(new MenuItemDefinition("Groupons", new FixedLocalizableString("团购管理"), url: "Groupons", icon: "fa fa-gift", requiredPermissionName: LesoftWuye2.Core.Authorization.PermissionNames.Pages_Groupons));
            mallMenu.AddItem(new MenuItemDefinition("Orders", new FixedLocalizableString("订单列表"), url: "Order", icon: "fa fa-calendar-o", requiredPermissionName: LesoftWuye2.Core.Authorization.PermissionNames.Pages_Orders));
            mallMenu.AddItem(new MenuItemDefinition("RefundOrders", new FixedLocalizableString("退款列表"), url: "RefundOrder", icon: "fa fa-calendar-o", requiredPermissionName: LesoftWuye2.Core.Authorization.PermissionNames.Pages_RefundOrders));

            var forumMenu = new MenuItemDefinition("Forum", new FixedLocalizableString("业主论坛"), url: "", icon: "fa  fa-book", requiresAuthentication: true);

            forumMenu.AddItem(new MenuItemDefinition("Plates", new FixedLocalizableString("论坛版块"), url: "Plates", icon: "fa  fa-film", requiredPermissionName: LesoftWuye2.Core.Authorization.PermissionNames.Pages_Plates));
            forumMenu.AddItem(new MenuItemDefinition("ForumPosts", new FixedLocalizableString("帖子列表"), url: "ForumPost", icon: "fa fa-paste", requiredPermissionName: LesoftWuye2.Core.Authorization.PermissionNames.Pages_ForumPosts));



            var managerMenu = new MenuItemDefinition("Manager", new FixedLocalizableString("系统管理"), url: "", icon: "fa fa-wrench", requiresAuthentication: true);

            managerMenu.AddItem(new MenuItemDefinition("Roles", new FixedLocalizableString("角色"), url: "Roles", icon: "fa fa-users", requiredPermissionName: PermissionNames.Pages_Roles));
            managerMenu.AddItem(new MenuItemDefinition("Users", new FixedLocalizableString("系统用户"), url: "Users", icon: "fa fa-user", requiredPermissionName: PermissionNames.Pages_Users));
            managerMenu.AddItem(new MenuItemDefinition("AuditLogs", new FixedLocalizableString("审计日志"), url: "AuditLogs", icon: "fa fa-lock", requiredPermissionName: PermissionNames.Pages_AuditLogs));
            managerMenu.AddItem(new MenuItemDefinition("Maintenance", new FixedLocalizableString("系统维护"), url: "Maintenance", icon: "fa fa-gear", requiredPermissionName: PermissionNames.Pages_Maintenance));
            managerMenu.AddItem(new MenuItemDefinition("Settings", new FixedLocalizableString("参数设置"), url: "Settings", icon: "fa fa-flag", requiredPermissionName: LesoftWuye2.Core.Authorization.PermissionNames.Pages_Settings));
            managerMenu.AddItem(new MenuItemDefinition("ApiLogs", new FixedLocalizableString("API调用日志"), url: "ApiLogs", icon: "fa fa-info-circle", requiredPermissionName: LesoftWuye2.Core.Authorization.PermissionNames.Pages_ApiLogs));

            context.Manager.MainMenu.AddItem(homeMenu)
            .AddItem(baseMenu)
            .AddItem(articlesMenu)
            .AddItem(mallMenu)
            .AddItem(forumMenu)
            .AddItem(managerMenu);
        }
        public override void SetNavigation(INavigationProviderContext context)
        {
            var device = new MenuItemDefinition(
                AppPermissions.Pages_HandheldTerminal,
                L(AppPermissions.Pages_HandheldTerminal),
                icon: "icon-grid"
                );
            var videoCall = new MenuItemDefinition("VideoCall", L("VideoCall"),
                                                   url: "/Devices/Device/VideoCall",
                                                   requiredPermissionName: AppPermissions.Pages_HandheldTerminal_VideoCall);
            var appWhiteList = new MenuItemDefinition(
                AppWhiteListAppPermissions.AppWhiteList,
                L("AppWhiteList"),
                url: "/AppWhiteLists/AppWhiteList",
                icon: "icon-grid",
                requiredPermissionName: AppWhiteListAppPermissions.AppWhiteList
                );

            device.AddItem(
                new MenuItemDefinition(
                    DeviceAppPermissions.Device,
                    L("Device"),
                    "icon-star",
                    url: "/Devices/Device",
                    requiredPermissionName: DeviceAppPermissions.Device))
            .AddItem(appWhiteList)
            .AddItem(videoCall)
            ;

            var announcement = new MenuItemDefinition(
                AnnouncementAppPermissions.Announcement,
                L("Announcement"),
                icon: "icon-grid"
                );

            announcement.AddItem(
                new MenuItemDefinition(
                    AnnouncementAppPermissions.Announcement,
                    L("Announcement"),
                    "icon-star",
                    "announcements/announcement",
                    requiredPermissionName: AnnouncementAppPermissions.Announcement));

            context.Manager.MainMenu
            .AddItem(device)
            .AddItem(announcement)

            #region 系统管理
            .AddItem(
                new MenuItemDefinition(
                    "SystemManage",
                    L("SystemManage"),
                    icon: "fa fa-gear",
                    requiredPermissionName: AppPermissions.Pages_SystemManage
                    )
                .AddItem(
                    new MenuItemDefinition(
                        "User",
                        L("User"),
                        url: "Users",
                        requiredPermissionName: UserAppPermissions.User
                        ))
                .AddItem(
                    new MenuItemDefinition(
                        "Role",
                        L("Role"),
                        url: "Roles",
                        requiredPermissionName: RoleAppPermissions.Role
                        ))
                .AddItem(
                    new MenuItemDefinition(
                        "OrganizationUnit",
                        L("OrganizationUnit"),
                        url: "OrganizationUnits",
                        requiredPermissionName: OrganizationUnitAppPermissions.OrganizationUnit
                        ))
                .AddItem(
                    new MenuItemDefinition(
                        "DataDictionaries",
                        L("DataDictionary"),
                        url: "DataDictionaries",
                        requiredPermissionName: DataDictionaryAppPermissions.DataDictionary
                        ))
                .AddItem(
                    new MenuItemDefinition(
                        "AuditLog",
                        L("AuditLog"),
                        url: "AuditLogs",
                        requiredPermissionName: AuditLogAppPermissions.AuditLog
                        ))
                .AddItem(
                    new MenuItemDefinition(
                        "MainTenance",
                        L("Maintenance"),
                        url: "MainTenance",
                        requiredPermissionName: AppPermissions.Pages_Maintenance
                        ))


                //                        .AddItem(
                //new MenuItemDefinition(
                //    "DatatableApi",
                //    L("DatatableApi"),
                //    url: "Document/DataTable",
                //    requiredPermissionName: AppPermissions.Pages_Api
                //    ))
                )         // end:SystemManage

            #endregion

            ;
        }