public LocationSimpleViewData(Person currentPerson, Models.Project project, ProposalSectionsStatus proposalSectionsStatus, ProjectLocationSimpleViewData projectLocationSimpleViewData) : base(currentPerson, project, ProjectCreateSection.LocationSimple.ProjectCreateSectionDisplayName, proposalSectionsStatus) { ProjectLocationSimpleViewData = projectLocationSimpleViewData; }
public LocationSimpleViewData(FirmaSession currentFirmaSession, ProjectFirmaModels.Models.Project project, ProposalSectionsStatus proposalSectionsStatus, ProjectLocationSimpleViewData projectLocationSimpleViewData) : base(currentFirmaSession, project, ProjectCreateSection.LocationSimple.ProjectCreateSectionDisplayName, proposalSectionsStatus) { ProjectLocationSimpleViewData = projectLocationSimpleViewData; ShowCommentsSection = project.IsPendingApproval() || (project.BasicsComment != null && project.ProjectApprovalStatus == ProjectApprovalStatus.Returned); CanEditComments = project.IsPendingApproval() && new ProjectEditAsAdminRegardlessOfStageFeature().HasPermission(currentFirmaSession, project).HasPermission; }
private PartialViewResult ViewEditProjectLocationSummaryPoint(Project project, ProjectLocationSimpleViewModel viewModel) { var layerGeoJsons = MapInitJson.GetAllGeospatialAreaMapLayers(LayerInitialVisibility.Hide); var mapInitJson = new MapInitJson($"project_{project.ProjectID}_EditMap", 10, layerGeoJsons, BoundingBox.MakeNewDefaultBoundingBox(), false) { AllowFullScreen = false, DisablePopups = true }; var mapPostUrl = SitkaRoute <ProjectLocationController> .BuildUrlFromExpression(c => c.EditProjectLocationSimple(project, null)); var mapFormID = GenerateEditProjectLocationFormID(project.ProjectID); var viewData = new ProjectLocationSimpleViewData(CurrentPerson, mapInitJson, FirmaWebConfiguration.GetWmsLayerNames(), null, mapPostUrl, mapFormID, FirmaWebConfiguration.WebMapServiceUrl); return(RazorPartialView <ProjectLocationSimple, ProjectLocationSimpleViewData, ProjectLocationSimpleViewModel>(viewData, viewModel)); }
private PartialViewResult ViewEditProjectLocationSummaryPoint(Project project, ProjectLocationSimpleViewModel viewModel) { var layerGeoJsons = MapInitJson.GetConfiguredGeospatialAreaMapLayers(); var mapInitJson = new MapInitJson($"project_{project.ProjectID}_EditMap", 10, layerGeoJsons, MapInitJson.GetExternalMapLayers(), BoundingBox.MakeNewDefaultBoundingBox(), false) { AllowFullScreen = false, DisablePopups = true }; var mapPostUrl = SitkaRoute <ProjectLocationController> .BuildUrlFromExpression(c => c.EditProjectLocationSimple(project, null)); var mapFormID = GenerateEditProjectLocationFormID(project.ProjectID); var geospatialAreaTypes = HttpRequestStorage.DatabaseEntities.GeospatialAreaTypes.OrderBy(x => x.GeospatialAreaTypeName) .ToList(); var viewData = new ProjectLocationSimpleViewData(CurrentFirmaSession, mapInitJson, geospatialAreaTypes, null, mapPostUrl, mapFormID); return(RazorPartialView <ProjectLocationSimple, ProjectLocationSimpleViewData, ProjectLocationSimpleViewModel>(viewData, viewModel)); }
public LocationSimpleViewData(FirmaSession currentFirmaSession, ProjectFirmaModels.Models.ProjectUpdate projectUpdate, ProjectLocationSimpleViewData projectLocationSimpleViewData, ProjectLocationSummaryViewData projectLocationSummaryViewData, LocationSimpleValidationResult locationSimpleValidationResult, ProjectUpdateStatus projectUpdateStatus) : base(currentFirmaSession, projectUpdate.ProjectUpdateBatch, projectUpdateStatus, locationSimpleValidationResult.GetWarningMessages(), ProjectUpdateSection.LocationSimple.ProjectUpdateSectionDisplayName) { ProjectLocationSimpleViewData = projectLocationSimpleViewData; ProjectLocationSummaryViewData = projectLocationSummaryViewData; RefreshUrl = SitkaRoute <ProjectUpdateController> .BuildUrlFromExpression(x => x.RefreshProjectLocationSimple(projectUpdate.ProjectUpdateBatch.Project)); SectionCommentsViewData = new SectionCommentsViewData( projectUpdate.ProjectUpdateBatch.LocationSimpleComment, projectUpdate.ProjectUpdateBatch.IsReturned()); ValidationWarnings = locationSimpleValidationResult.GetWarningMessages(); }