public ActionResult Pending(int id) { var project = _projectRepository.GetByDataManagementPlanId(id); if (project == null || project.DataManagementPlan == null) { return View("DmpNotFound"); } if (project.SourceProjectType == SourceProjectType.DEPOSIT) { return View("IncorrectProjectType"); } if (!this.CurrentUser.IsPrincipalInvestigatorFor(project)) { return View("NoProjectAccessRight"); } if (project.ProvisioningStatus != ProvisioningStatus.Pending) { return View("DmpNotInProgress"); } var vm = new DataManagementPlanInfoViewModel { ProjectId = project.Id, DataManagementPlanId = project.DataManagementPlan.Id, ProjectTitle = project.Title }; return View(vm); }
public ActionResult Pending(DataManagementPlanInfoViewModel vm) { return RedirectToAction("Edit", "Dmp", new { id = vm.DataManagementPlanId, step = 6 }); }
public ActionResult Republish(DataManagementPlanInfoViewModel vm) { var project = _projectRepository.Get(vm.ProjectId); if (project == null) { return View("ProjectNotFound"); } if (project.DataManagementPlan == null) { return View("DmpNotFound"); } if (project.SourceProjectType == SourceProjectType.DEPOSIT) { return View("IncorrectProjectType"); } if (!this.CurrentUser.IsPrincipalInvestigatorFor(project)) { return View("NoProjectAccessRight"); } if (project.ProvisioningStatus != ProvisioningStatus.Provisioned) { return View("DmpNotProvisioned"); } _bus.Send<GenerateDmpCommand>(m => { m.ProjectId = project.Id; m.SiteUrl = project.SiteUrl; }); return RedirectToAction("Republished", "Confirm"); }