Exemple #1
0
        public virtual ActionResult MovePage(string fullName)
        {
            CopyPageModel model = new CopyPageModel();

            model.SourcePage = new Page(Site, fullName);
            return(View(model));
        }
Exemple #2
0
        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));
        }
Exemple #3
0
        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));
        }
Exemple #4
0
 public virtual ActionResult CopyNameAvailabled(CopyPageModel copyModel)
 {
     return(this.IsNameAvailable(copyModel.DestinationName, copyModel.ParentPage, null));
 }