public virtual ActionResult MovePage(string fullName) { CopyPageModel model = new CopyPageModel(); model.SourcePage = new Page(Site, fullName); return(View(model)); }
public virtual ActionResult MovePage(CopyPageModel model, string fullName, string parentPage) { JsonResultEntry entry = new JsonResultEntry(); try { Manager.Move(Site, fullName, parentPage, model.CreateRedirect); entry.SetSuccess(); } catch (Exception e) { entry.AddException(e); } return(Json(entry)); }
public virtual ActionResult Copy(CopyPageModel copyModel, string @return) { var data = new JsonResultData(ModelState); data.RunWithTry((resultData) => { if (ModelState.IsValid) { var destPage = PageHelper.CombineFullName(new string[] { copyModel.ParentPage, copyModel.DestinationName }); Manager.Copy(Site, copyModel.UUID, destPage); data.RedirectUrl = @return; } }); return(Json(data)); }
public virtual ActionResult CopyNameAvailabled(CopyPageModel copyModel) { return(this.IsNameAvailable(copyModel.DestinationName, copyModel.ParentPage, null)); }