コード例 #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));
        }
コード例 #2
0
        public ActionResult EditContentBasic(int id)
        {
            var model = new EditContentViewModel();

            var editContentHelper = new EditContentHelper(Context);

            editContentHelper.LoadContentViewById(id, model);

            return(View(model));
        }
コード例 #3
0
        public ActionResult EditContentBasic(int id)
        {
            var model = new EditContentViewModel();

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

            return View(model);
        }
コード例 #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);
        }
コード例 #5
0
 public ActionResult EditContentBasic(int id)
 {
     var model = new EditContentViewModel(id);
     return View(model);
 }
コード例 #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);
        }