Exemple #1
0
        private static LtInfoMenuItem BuildDelineationMenu(Person currentPerson)
        {
            var delineationMenu = new LtInfoMenuItem("Delineation");

            delineationMenu.AddMenuItem(LtInfoMenuItem.MakeItem(new SitkaRoute <DelineationController>(c => c.DelineationMap(null)), currentPerson, "Delineation Map", "Group1"));
            delineationMenu.AddMenuItem(LtInfoMenuItem.MakeItem(new SitkaRoute <DelineationController>(c => c.DelineationReconciliationReport()), currentPerson, "Delineation Reconciliation Report", "Group1"));

            return(delineationMenu);
        }
Exemple #2
0
        private static LtInfoMenuItem BuildProgramInfoMenu(Person currentPerson)
        {
            var programInfoMenu = new LtInfoMenuItem("Program Info");

            programInfoMenu.AddMenuItem(LtInfoMenuItem.MakeItem(new SitkaRoute <TreatmentBMPAssessmentObservationTypeController>(c => c.Index()), currentPerson, "Observation Types", "Group1"));
            programInfoMenu.AddMenuItem(LtInfoMenuItem.MakeItem(new SitkaRoute <TreatmentBMPTypeController>(c => c.Index()), currentPerson, "Treatment BMP Types", "Group1"));
            programInfoMenu.AddMenuItem(LtInfoMenuItem.MakeItem(new SitkaRoute <FundingSourceController>(c => c.Index()), currentPerson, FieldDefinitionType.FundingSource.GetFieldDefinitionLabelPluralized(), "Group1"));

            if (new JurisdictionEditFeature().HasPermissionByPerson(currentPerson))
            {
                programInfoMenu.AddMenuItem(LtInfoMenuItem.MakeItem(
                                                new SitkaRoute <WebServicesController>(c => c.Index()), currentPerson, "Web Services", "Group 2"));
            }

            return(programInfoMenu);
        }
Exemple #3
0
        private static 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"));

            bmpMenu.AddMenuItem(LtInfoMenuItem.MakeItem(new SitkaRoute <WaterQualityManagementPlanController>(c => c.Index()), currentPerson, FieldDefinitionType.WaterQualityManagementPlan.GetFieldDefinitionLabelPluralized(), "Group3"));
            bmpMenu.AddMenuItem(LtInfoMenuItem.MakeItem(new SitkaRoute <ParcelController>(c => c.Index()), currentPerson, "Parcels", "Group3"));

            return(bmpMenu);
        }
Exemple #4
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"));

            if (currentPerson.IsAdministrator())
            {
                manageMenu.AddMenuItem(LtInfoMenuItem.MakeItem(new SitkaRoute <JurisdictionController>(c => c.Index()), currentPerson, "Jurisdictions", "Group1"));
            }

            manageMenu.AddMenuItem(LtInfoMenuItem.MakeItem(new SitkaRoute <TreatmentBMPAssessmentObservationTypeController>(c => c.Manage()), currentPerson, "Observation Types", "Group2"));
            if (!currentPerson.IsAnonymousOrUnassigned())
            {
                manageMenu.AddMenuItem(LtInfoMenuItem.MakeItem(
                                           new SitkaRoute <TreatmentBMPTypeController>(c => c.Manage()), currentPerson, "Treatment BMP Types",
                                           "Group2"));
            }
            manageMenu.AddMenuItem(LtInfoMenuItem.MakeItem(new SitkaRoute <CustomAttributeTypeController>(c => c.Manage()), currentPerson, "Custom Attributes", "Group2"));

            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"));

            manageMenu.AddMenuItem(LtInfoMenuItem.MakeItem(new SitkaRoute <WaterQualityManagementPlanController>(c => c.LGUAudit()), currentPerson, "Water Quality Management Plan LGU Audit", "Group5"));

            return(manageMenu);
        }