public PartialViewResult EditInDialog(NeptunePagePrimaryKey neptunePagePrimaryKey) { var neptunePage = neptunePagePrimaryKey.EntityObject; var viewModel = new EditViewModel(neptunePage); return(ViewEditInDialog(viewModel, neptunePage)); }
public ContentResult CkEditorUploadFileResourceForNeptunePage(NeptunePagePrimaryKey neptunePagePrimaryKey, CkEditorImageUploadViewModel viewModel) { var fileResource = FileResource.CreateNewFromHttpPostedFileAndSave(viewModel.upload, CurrentPerson); var neptunePage = neptunePagePrimaryKey.EntityObject; var ppImage = new NeptunePageImage(neptunePage, fileResource); HttpRequestStorage.DatabaseEntities.NeptunePageImages.Add(ppImage); return(Content(viewModel.GetCkEditorJavascriptContentToReturn(fileResource))); }
public ActionResult EditInDialog(NeptunePagePrimaryKey neptunePagePrimaryKey, EditViewModel viewModel) { var neptunePage = neptunePagePrimaryKey.EntityObject; if (!ModelState.IsValid) { return(ViewEditInDialog(viewModel, neptunePage)); } viewModel.UpdateModel(neptunePage); return(new ModalDialogFormJsonResult()); }
public PartialViewResult NeptunePageDetails(NeptunePagePrimaryKey neptunePagePrimaryKey) { var neptunePage = neptunePagePrimaryKey.EntityObject; var neptunePageContentHtmlString = neptunePage.NeptunePageContentHtmlString; if (!neptunePage.HasNeptunePageContent()) { neptunePageContentHtmlString = new HtmlString(string.Format("No page content for Page \"{0}\".", neptunePage.NeptunePageType.NeptunePageTypeDisplayName)); } var viewData = new NeptunePageDetailsViewData(neptunePageContentHtmlString); return(RazorPartialView <NeptunePageDetails, NeptunePageDetailsViewData>(viewData)); }
public ContentResult CkEditorUploadFileResourceForNeptunePage(NeptunePagePrimaryKey neptunePagePrimaryKey) { return(Content(String.Empty)); }