public ActionResult Preview(PageData currentPage, OrganisationalUnitListModel organisationalUnitListModel) { var pd = (OrganisationalUnitPage)currentPage; PreviewTextLength = 200; var model = new OrganisationalUnitPageModel(pd) { Categories = CategoryHelper.GetCategoryViewModels(pd), PreviewText = GetPreviewText(pd), //ShowIntroduction = organisationalUnitListModel.ShowIntroduction, //ShowPublishDate = organisationalUnitListModel.ShowPublishDate }; return(PartialView("Preview", model)); }
public ActionResult Full(OrganisationalUnitPage currentPage) { PreviewTextLength = 200; var model = new OrganisationalUnitPageModel(currentPage) { Category = currentPage.Category, Categories = CategoryHelper.GetCategoryViewModels(currentPage), PreviewText = GetPreviewText(currentPage), // MainBody = currentPage.MainBody, StartPublish = currentPage.StartPublish }; var editHints = ViewData.GetEditHints <OrganisationalUnitPageModel, OrganisationalUnitPage>(); editHints.AddConnection(m => m.Category, p => p.Category); editHints.AddFullRefreshFor(p => p.Category); editHints.AddFullRefreshFor(p => p.StartPublish); return(PartialView("Full", model)); }