public override ActionResult Index() { var config = new EntityListConfiguration <DocumentViewModel>(StrixPlatform.User); config.Fields.Insert(0, new ListFieldConfiguration("Extension")); config.Fields.Insert(1, new ListFieldConfiguration("FileSize", "bytes") { ShowFilter = false }); return(this.View(config)); }
public override ActionResult Index() { if (!this.CheckIsAccessAllowed()) { return(new HttpStatusCodeResult(401)); } var config = new EntityListConfiguration <NewsViewModel>(StrixPlatform.User); config.Fields.Insert(0, new ListFieldConfiguration("PublishedOn", "kendoDate") { ShowFilter = false }); config.Fields.Insert(1, new ListFieldConfiguration("ExpireTime", "kendoDate") { ShowFilter = false }); return(this.View(config)); }
public virtual ActionResult Display(FilterOptions options, string url) { var type = (string)HttpContext.Items[CmsConstants.DISPLAYTYPE] ?? CmsConstants.DISPLAYTYPEITEM; var itemPageUrl = (string)HttpContext.Items[CmsConstants.ITEMPAGEURL]; if (type == CmsConstants.DISPLAYTYPELIST && !string.IsNullOrWhiteSpace(itemPageUrl) && HttpContext.Items[CmsConstants.ITEMURL] != null) { type = CmsConstants.DISPLAYTYPEITEM; } this.UpdateContentLocator(); if (type == CmsConstants.DISPLAYTYPEITEM && !string.IsNullOrWhiteSpace(url)) { var model = this.Service.GetCached(this.GetContentUrl(url)); return(this.View("Item", model)); } else { var model = new EntityListConfiguration <TModel>(StrixPlatform.User); return(this.View("List", model)); } }
/// <summary> /// Gets the index view, which displays a list of entities. /// </summary> /// <returns>The index view</returns> public override ActionResult Index() { var config = new EntityListConfiguration <TModel>(StrixPlatform.User); return(this.View(config)); }