public ActionResult WidgetContentOne() { System.Threading.Thread.Sleep(1000); // Fake waiting time to show javascript spinner var model = new ContentViewModel(); model.AddSubTitle("A content based block"); model.AddParagraph("A content based widget with lots of information."); model.AddListItem("A list with items"); model.AddListItem("Another list item"); model.AddParagraph("Some further text after the list contains even more words, and punctuation marks as well."); return(PartialView("EditorTemplates/ContentViewModel", model)); }
public ActionResult WidgetContentFive(string widgetContext) { System.Threading.Thread.Sleep(1000); // Fake waiting time to show javascript spinner var model = new ContentViewModel(); model.AddSubTitle("Data context: " + (UserService.Dashboard.GetDataContext(widgetContext) ?? "not set")); model.AddParagraph("This model changes its information based on the data context, set in the right hand sidebar."); model.AddParagraph("It is useful for making a set of widgets display a different kind of information as a whole."); model.AddParagraph("A user selected data context is saved for that user across all pages/widgets"); model.AddParagraph("You can access the Data Context in your widget controllers using the dashboard service:"); model.AddPreformatted(@" public ActionResult WidgetContentFive(string widgetContext) { ... string dataContext = UserService.Dashboard.GetDataContext(widgetContext); ... } "); return(PartialView("EditorTemplates/ContentViewModel", model)); }