Пример #1
0
 public static void AddFundingStatusMenuItem(LtInfoMenuItem resultsMenu, FirmaSession currentFirmaSession)
 {
     if (UsesCustomFundingStatusPage(currentFirmaSession))
     {
         resultsMenu.AddMenuItem(LtInfoMenuItem.MakeItem(new SitkaRoute <ResultsController>(c => c.FundingStatus()), currentFirmaSession, "Funding Status"));
     }
 }
Пример #2
0
 public static void AddEvaluationsMenuItem(LtInfoMenuItem manageMenu, FirmaSession currentFirmaSession, string menuGroupName)
 {
     if (UsesEvaluations() && new FirmaAdminFeature().HasPermission(currentFirmaSession).HasPermission)
     {
         manageMenu.AddMenuItem(LtInfoMenuItem.MakeItem(new SitkaRoute <EvaluationController>(c => c.Index()), currentFirmaSession, FieldDefinitionEnum.ProjectEvaluation.ToType().GetFieldDefinitionLabelPluralized(), "Group1"));
     }
 }
Пример #3
0
 public static void AddTechnicalAssistanceReportMenuItem(LtInfoMenuItem resultsMenu, FirmaSession currentFirmaSession)
 {
     if (UsesTechnicalAssistanceParameters() && new TechnicalAssistanceRequestsViewFeature().HasPermissionByFirmaSession(currentFirmaSession))
     {
         resultsMenu.AddMenuItem(LtInfoMenuItem.MakeItem(new SitkaRoute <TechnicalAssistanceRequestController>(c => c.TechnicalAssistanceReport()), currentFirmaSession, "Technical Assistance Report"));
     }
 }
Пример #4
0
        private List <LtInfoMenuItem> MakeNeptuneHelpMenu(Person currentPerson)
        {
            var helpMenu = new LtInfoMenuItem("Help");

            helpMenu.AddMenuItem(LtInfoMenuItem.MakeItem("Request Support",
                                                         $@"<a href='{RequestSupportUrl}' target='_blank'>Request Support<span class='glyphicon glyphicon-new-window'></span></a>", "ToolHelp"));

            helpMenu.AddMenuItem(LtInfoMenuItem.MakeItem(new SitkaRoute <HomeController>(c => c.Training()), currentPerson, "Training", "ToolHelp"));
            if (!currentPerson.IsAnonymousUser())
            {
                helpMenu.AddMenuItem(LtInfoMenuItem.MakeItem(new SitkaRoute <HelpController>(c => c.BulkUploadRequest()),
                                                             currentPerson, "Bulk Upload Request", "ToolHelp"));
            }

            helpMenu.ExtraDropdownMenuCssClasses = new List <string> {
                "dropdown-menu-right"
            };
            helpMenu.ExtraTopLevelMenuCssClasses = new List <string> {
                "topRightMenu noHighlight"
            };
            helpMenu.ExtraTopLevelListItemCssClasses = new List <string> {
                "topRightMenuParent"
            };

            var topLevelLtInfoMenuItems = new List <LtInfoMenuItem> {
                helpMenu
            };

            return(topLevelLtInfoMenuItems);
        }
Пример #5
0
        private LtInfoMenuItem BuildOVTAMenu(Person currentPerson)
        {
            var ovtaMenu = new LtInfoMenuItem("OVTA");

            ovtaMenu.AddMenuItem(LtInfoMenuItem.MakeItem(new SitkaRoute <OnlandVisualTrashAssessmentController>(c => c.Index()), currentPerson, "View All OVTAs", "Group1"));

            return(ovtaMenu);
        }
Пример #6
0
 public static void AddTechnicalAssistanceParametersMenuItem(LtInfoMenuItem manageMenu, FirmaSession currentFirmaSession, string menuGroupName)
 {
     if (UsesTechnicalAssistanceParameters() && new FirmaAdminFeature().HasPermission(currentFirmaSession).HasPermission)
     {
         manageMenu.AddMenuItem(LtInfoMenuItem.MakeItem("Technical Assistance Parameters",
                                                        ModalDialogFormHelper.ModalDialogFormLink("Technical Assistance Parameters",
                                                                                                  SitkaRoute <PerformanceMeasureController> .BuildUrlFromExpression(c => c.TechnicalAssistanceParameters()),
                                                                                                  "Technical Assistance Parameters", 800,
                                                                                                  "Save", "Cancel", new List <string>(), null, null).ToString(), menuGroupName));
     }
 }
Пример #7
0
        private void MakeTrashModuleMenu()
        {
            TopLevelLtInfoMenuItems = new List <LtInfoMenuItem>
            {
                BuildBMPInventoryMenu(CurrentPerson),
                LtInfoMenuItem.MakeItem(new SitkaRoute <DelineationController>(c => c.DelineationMap(null)), CurrentPerson, "Delineation Map", "Group1"),
                BuildManageMenu(CurrentPerson)
            };

            TopLevelLtInfoMenuItems.ForEach(x => x.ExtraTopLevelMenuCssClasses = new List <string> {
                "navigation-root-item"
            });
            TopLevelLtInfoMenuItems.SelectMany(x => x.ChildMenus).ToList().ForEach(x => x.ExtraTopLevelMenuCssClasses = new List <string> {
                "navigation-dropdown-item"
            });
        }
Пример #8
0
        private LtInfoMenuItem BuildManageMenu(Person currentPerson)
        {
            var manageMenu = new LtInfoMenuItem("Manage");

            manageMenu.AddMenuItem(LtInfoMenuItem.MakeItem(new SitkaRoute <HomeController>(c => c.ManageHomePageImages()), currentPerson, "Homepage Configuration", "Group1"));
            manageMenu.AddMenuItem(LtInfoMenuItem.MakeItem(new SitkaRoute <NeptunePageController>(c => c.Index()), currentPerson, "Page Content", "Group1"));
            manageMenu.AddMenuItem(LtInfoMenuItem.MakeItem(new SitkaRoute <FieldDefinitionController>(c => c.Index()), currentPerson, "Custom Labels & Definitions", "Group1"));
            manageMenu.AddMenuItem(LtInfoMenuItem.MakeItem(new SitkaRoute <UserController>(c => c.Index()), currentPerson, "Users", "Group1"));
            manageMenu.AddMenuItem(LtInfoMenuItem.MakeItem(new SitkaRoute <OrganizationController>(c => c.Index()), currentPerson, $"{FieldDefinitionType.Organization.GetFieldDefinitionLabelPluralized()}", "Group1"));

            manageMenu.AddMenuItem(LtInfoMenuItem.MakeItem(new SitkaRoute <TrashGeneratingUnitController>(c => c.Index()), currentPerson, "Trash Generating Units", "Group3"));
            manageMenu.AddMenuItem(LtInfoMenuItem.MakeItem(new SitkaRoute <LandUseBlockController>(c => c.Index()), currentPerson, "Land Use Blocks", "Group3"));

            manageMenu.AddMenuItem(LtInfoMenuItem.MakeItem(new SitkaRoute <HRUCharacteristicController>(c => c.Index()), currentPerson, "HRU Characteristics", "Group4"));
            manageMenu.AddMenuItem(LtInfoMenuItem.MakeItem(new SitkaRoute <RegionalSubbasinController>(c => c.Index()), currentPerson, "Regional Subbasins", "Group4"));
            manageMenu.AddMenuItem(LtInfoMenuItem.MakeItem(new SitkaRoute <RegionalSubbasinController>(c => c.Grid()), currentPerson, "Regional Subbasin Grid", "Group4"));
            manageMenu.AddMenuItem(LtInfoMenuItem.MakeItem(new SitkaRoute <RegionalSubbasinRevisionRequestController>(c => c.Index()), currentPerson, "Regional Subbasin Revision Requests", "Group4"));
            return(manageMenu);
        }
Пример #9
0
        private LtInfoMenuItem BuildBMPInventoryMenu(Person currentPerson)
        {
            var bmpMenu = new LtInfoMenuItem("BMP Inventory");

            //bmpMenu.AddMenuItem(LtInfoMenuItem.MakeItem(new SitkaRoute<JurisdictionController>(c => c.Index()), currentPerson, "Jurisdictions", "Group1"));

            bmpMenu.AddMenuItem(LtInfoMenuItem.MakeItem(new SitkaRoute <TreatmentBMPController>(c => c.FindABMP()), currentPerson, "Find a BMP", "Group1"));
            bmpMenu.AddMenuItem(LtInfoMenuItem.MakeItem(new SitkaRoute <TreatmentBMPController>(c => c.ViewTreatmentBMPModelingAttributes()), currentPerson, "Modeling Parameters", "Group1"));
            bmpMenu.AddMenuItem(LtInfoMenuItem.MakeItem(new SitkaRoute <TreatmentBMPController>(c => c.Index()), currentPerson, "View All BMPs", "Group1"));
            bmpMenu.AddMenuItem(LtInfoMenuItem.MakeItem(new SitkaRoute <TreatmentBMPController>(c => c.TreatmentBMPAssessmentSummary()), currentPerson, "View Latest BMP Assessments", "Group2"));

            bmpMenu.AddMenuItem(LtInfoMenuItem.MakeItem(new SitkaRoute <FieldVisitController>(c => c.Index()), currentPerson, "View All Field Records", "Group2"));
            if (new WaterQualityManagementPlanViewFeature().HasPermissionByPerson(currentPerson))
            {
                bmpMenu.AddMenuItem(LtInfoMenuItem.MakeItem(new SitkaRoute <WaterQualityManagementPlanController>(c => c.Index()), currentPerson, FieldDefinitionType.WaterQualityManagementPlan.GetFieldDefinitionLabelPluralized(), "Group3"));
            }
            if (new JurisdictionManageFeature().HasPermissionByPerson(currentPerson))
            {
                bmpMenu.AddMenuItem(LtInfoMenuItem.MakeItem(new SitkaRoute <ParcelController>(c => c.Index()), currentPerson, "Parcels", "Group3"));
            }

            return(bmpMenu);
        }
Пример #10
0
        private void MakeTrashModuleMenu()
        {
            TopLevelLtInfoMenuItems = new List <LtInfoMenuItem>
            {
                BuildOVTAMenu(CurrentPerson),
                BuildResultsMenu(CurrentPerson)
            };

            if (!CurrentPerson.IsAnonymousOrUnassigned())
            {
                TopLevelLtInfoMenuItems.Add(LtInfoMenuItem.MakeItem(
                                                new SitkaRoute <DelineationController>(c => c.DelineationMap(null)), CurrentPerson,
                                                "Delineation Map", "Group1"));
                TopLevelLtInfoMenuItems.Add(BuildManageMenu(CurrentPerson));
            }

            TopLevelLtInfoMenuItems.ForEach(x => x.ExtraTopLevelMenuCssClasses = new List <string> {
                "navigation-root-item"
            });
            TopLevelLtInfoMenuItems.SelectMany(x => x.ChildMenus).ToList().ForEach(x => x.ExtraTopLevelMenuCssClasses = new List <string> {
                "navigation-dropdown-item"
            });
        }