Beispiel #1
0
        public ActionResult SaveCache(EditModel.CacheModel model)
        {
            Piranha.Config.Cache.Expires = model.Expires;
            Piranha.Config.Cache.MaxAge  = model.MaxAge;

            return(JsonData(true, EditModel.Get(api)));
        }
        public ActionResult SaveComments(EditModel.CommentModel model)
        {
            Piranha.Config.Comments.ModerateAnonymous  = model.ModerateAnonymous;
            Piranha.Config.Comments.ModerateAuthorized = model.ModerateAuthorized;

            return(JsonData(true, EditModel.Get(api)));
        }
Beispiel #3
0
        public ActionResult SaveSite(EditModel.SiteModel model)
        {
            Piranha.Config.Site.Title           = model.Title;
            Piranha.Config.Site.Description     = model.Description;
            Piranha.Config.Site.ArchivePageSize = model.ArchivePageSize;

            return(JsonData(true, EditModel.Get(api)));
        }
Beispiel #4
0
        public ActionResult SaveBlock(IList <EditModel.ParamModel> block)
        {
            foreach (var item in block)
            {
                var param = api.Params.GetSingle(where : p => p.Name == item.Name);
                if (param != null)
                {
                    param.Value = item.Value;
                }
            }
            api.SaveChanges();

            return(JsonData(true, EditModel.Get(api)));
        }
Beispiel #5
0
 public ActionResult Get()
 {
     return(JsonData(true, EditModel.Get(api)));
 }