Beispiel #1
0
 private void ConfigureMenu(MenuConfig config)
 {
     config.Add(new MenuSection
     {
         Name  = " ",
         Index = 0,
         Items = new List <IMenuItemBase>
         {
             new MenuLink("Acasă", typeof(DashboardController)).WithIconClasses("fas fa-home"),
             new MenuSection
             {
                 Name          = "Administrare",
                 IsCollapsable = true,
                 Items         = new List <IMenuItemBase>
                 {
                     new MenuLink("Panou Administrare", typeof(InfoEducatieAdminController),
                                  nameof(InfoEducatieAdminController.Index)).WithIconClasses("fas fa-tools")
                     .RequiresRoles("Admin"),
                     new MenuSection
                     {
                         Name          = "Conținut",
                         IsCollapsable = true,
                         Items         = new List <IMenuItemBase>
                         {
                             new MenuLink("Seminarii", typeof(SeminarsAdminController),
                                          nameof(SeminarsAdminController.Index)),
                             new MenuLink("Pagini", typeof(PagesAdminController),
                                          nameof(PagesAdminController.Index))
                         }
                     }.WithIconClasses("fas fa-file-contract").RequiresRoles("Moderator"),
                     new MenuLink("Utilizatori", typeof(AdminUsersUiController),
                                  nameof(AdminUsersUiController.Index)).WithIconClasses("fas fa-users")
                     .RequiresRoles("Moderator", "Admin"),
                     new MenuLink("Texte / Traduceri", typeof(TranslationsController),
                                  nameof(TranslationsController.Index)).WithIconClasses("fas fa-globe")
                     .RequiresRoles("Admin"),
                     new MenuLink("Fișiere", typeof(FilesController), nameof(FilesController.Index))
                     .WithIconClasses("fas fa-copy").RequiresRoles("Admin"),
                 }
             }.WithIconClasses("fas fa-tools").RequiresRoles("Admin", "Moderator")
         }
     });
     // config.Add(new MenuLink("Seminarii", typeof(SeminarsController),
     // nameof(SeminarsController.Index)));
     config.Add(new MenuLink("Program", "/Pages/program")
     {
         Index = 20
     });
 }
 private void ConfigureMenu(MenuConfig config)
 {
     config.Add(new MenuSection
     {
         Name          = "Judging",
         IsCollapsable = true,
         Items         = new List <IMenuItemBase>
         {
             new MenuLink("Judging Projects", typeof(JudgingController), nameof(JudgingController.Judging))
             .WithIconClasses("fas fa-gavel").RequiresRoles("Jury").WithValues(new { type = "project" }),
             new MenuLink("Judging Open", typeof(JudgingController), nameof(JudgingController.Judging))
             .WithIconClasses("fas fa-gavel").RequiresRoles("Jury").WithValues(new { type = "open" }),
             new MenuLink("Judges", typeof(JudgesAdminController),
                          nameof(JudgesAdminController.Index)).RequiresRoles("Moderator"),
             new MenuLink("Judging criteria", typeof(JudgingCriteriaAdminController),
                          nameof(JudgingCriteriaAdminController.Index)).RequiresRoles("Moderator"),
             new MenuLink("Judging criteria sections", typeof(JudgingCriteriaSectionsAdminController),
                          nameof(JudgingCriteriaSectionsAdminController.Index)).RequiresRoles("Moderator"),
             new MenuLink("Judging criteria points", typeof(ProjectJudgingCriterionPointsAdminController),
                          nameof(ProjectJudgingCriterionPointsAdminController.Index)).RequiresRoles("God"),
             new MenuLink("Results", typeof(ResultsController), nameof(ResultsController.Index))
             .WithIconClasses("fas fa-list-ol").RequiresRoles("Jury", "Moderator"),
             new MenuLink("Detailed results", typeof(ResultsController),
                          nameof(ResultsController.DetailedResults))
             .WithIconClasses("fas fa-search").RequiresRoles("Jury", "Moderator"),
         }
     }.RequiresRoles("Moderator", "Jury"));
     config.Add(new MenuSection
     {
         Name          = "Contest",
         IsCollapsable = true,
         Items         = new List <IMenuItemBase>
         {
             new MenuLink("Participants", typeof(ParticipantsAdminController),
                          nameof(ParticipantsAdminController.Index)),
             new MenuLink("Projects", typeof(ProjectsAdminController),
                          nameof(ProjectsAdminController.Index)),
             new MenuLink("Categories", typeof(CategoriesAdminController),
                          nameof(CategoriesAdminController.Index)),
         }
     }.RequiresRoles("Moderator"));
 }