Ejemplo n.º 1
0
        public ActionResult EditContent(int id, string schema, string editContentHeading)
        {
            var model = new EditContentViewModel();

            var editContentHelper = new EditContentHelper(Context);

            editContentHelper.LoadContentViewById(id, model);

            var userName = UserUtils.CurrentMembershipUsername();
            var user     = Context.Users.First(usr => usr.Username == userName);

            model.IsBookmarked = Context.Bookmarks.Any(bookmark => bookmark.Url == Request.RawUrl && bookmark.UserId == user.UserId);

            schema = schema ?? "0";

            // If Schema is Assigned, make sure to show the Field Editor
            int schemaId = Int32.Parse(schema);

            if (schemaId > 0)
            {
                model.ShowFieldEditor = true;
            }

            if (!String.IsNullOrEmpty(editContentHeading))
            {
                model.Heading = editContentHeading;
            }

            return(View(model));
        }
Ejemplo n.º 2
0
        public ActionResult EditContentBasic(int id)
        {
            var model = new EditContentViewModel();

            var editContentHelper = new EditContentHelper(Context);

            editContentHelper.LoadContentViewById(id, model);

            return(View(model));
        }
Ejemplo n.º 3
0
        public ActionResult EditContentBasic(int id)
        {
            var model = new EditContentViewModel();

            var editContentHelper = new Business.EditContentHelper(Context);
            editContentHelper.LoadContentViewById(id, model);

            return View(model);
        }
Ejemplo n.º 4
0
        public ActionResult EditContent(int id, string schema, string editContentHeading)
        {
            var model = new EditContentViewModel();

            var editContentHelper = new DirigoEdge.Business.EditContentHelper(Context);
            editContentHelper.LoadContentViewById(id, model);

            var userName = UserUtils.CurrentMembershipUsername();
            var user = Context.Users.First(usr => usr.Username == userName);
            model.IsBookmarked = Context.Bookmarks.Any(bookmark => bookmark.Url == Request.RawUrl && bookmark.UserId == user.UserId);

            schema = schema ?? "0";

            // If Schema is Assigned, make sure to show the Field Editor
            int schemaId = Int32.Parse(schema);
            if (schemaId > 0)
            {
                model.ShowFieldEditor = true;
            }

            if (!String.IsNullOrEmpty(editContentHeading))
            {
                model.Heading = editContentHeading;
            }

            return View(model);
        }
Ejemplo n.º 5
0
 public ActionResult EditContentBasic(int id)
 {
     var model = new EditContentViewModel(id);
     return View(model);
 }
Ejemplo n.º 6
0
        public ActionResult EditContent(int id, string schema, string editContentHeading)
        {
            var model = new EditContentViewModel(id);
            schema = schema ?? "0";

            // If Schema is Assigned, make sure to show the Field Editor
            int schemaId = Int32.Parse(schema);
            if (schemaId > 0)
            {
                model.ShowFieldEditor = true;
            }

            if (!String.IsNullOrEmpty(editContentHeading))
            {
                model.Heading = editContentHeading;
            }

            return View(model);
        }