public static ResponseCollection ViewMode( this ResponseCollection res, SiteSettings ss, View view, GridData gridData, string invoke = null, Message message = null, bool loadScroll = false, bool bodyOnly = false, string bodySelector = null, HtmlBuilder body = null) { return(res .Html(!bodyOnly ? "#ViewModeContainer" : bodySelector, body) .View(ss: ss, view: view) .ReplaceAll("#Breadcrumb", new HtmlBuilder() .Breadcrumb(ss: ss)) .ReplaceAll("#CopyDirectUrlToClipboard", new HtmlBuilder() .CopyDirectUrlToClipboard(ss: ss)) .ReplaceAll("#Aggregations", new HtmlBuilder() .Aggregations( ss: ss, aggregations: gridData.Aggregations)) .ReplaceAll("#MainCommandsContainer", new HtmlBuilder() .MainCommands( ss: ss, siteId: ss.SiteId, verType: Versions.VerTypes.Latest)) .Invoke(invoke) .Message(message) .LoadScroll(loadScroll) .ClearFormData()); }
public static ResponseCollection ViewMode( this ResponseCollection res, Context context, SiteSettings ss, View view, string invoke = null, Message message = null, bool editOnGrid = false, bool loadScroll = false, bool bodyOnly = false, string bodySelector = null, ServerScriptModelRow serverScriptModelRow = null, HtmlBuilder body = null) { return(res .Html(!bodyOnly ? "#ViewModeContainer" : bodySelector, body) .View(context: context, ss: ss, view: view) .Invoke("initRelatingColumnWhenViewChanged") .ReplaceAll( "#Breadcrumb", new HtmlBuilder().Breadcrumb( context: context, ss: ss), _using: context.Controller == "items") .ReplaceAll("#Guide", new HtmlBuilder() .Guide( context: context, ss: ss)) .ReplaceAll("#CopyDirectUrlToClipboard", new HtmlBuilder() .CopyDirectUrlToClipboard( context: context, view: view)) .ReplaceAll("#Aggregations", new HtmlBuilder() .Aggregations( context: context, ss: ss, view: view)) .ReplaceAll("#MainCommandsContainer", new HtmlBuilder() .MainCommands( context: context, ss: ss, view: view, verType: Versions.VerTypes.Latest, backButton: !context.Publish && !editOnGrid, serverScriptModelRow: serverScriptModelRow)) .SetMemory("formChanged", false, _using: !editOnGrid) .Invoke(invoke) .Message(message) .Messages(context.Messages) .LoadScroll(loadScroll) .ClearFormData( context: context, ss: ss, editOnGrid: editOnGrid) .Log(context.GetLog())); }