diff --git a/Griddly.Mvc/Griddly.Mvc.csproj b/Griddly.Mvc/Griddly.Mvc.csproj
index 0ce76e5..54b281b 100644
--- a/Griddly.Mvc/Griddly.Mvc.csproj
+++ b/Griddly.Mvc/Griddly.Mvc.csproj
@@ -91,6 +91,7 @@
+
diff --git a/Griddly.Mvc/GriddlyContext.cs b/Griddly.Mvc/GriddlyContext.cs
index f514862..b37a452 100644
--- a/Griddly.Mvc/GriddlyContext.cs
+++ b/Griddly.Mvc/GriddlyContext.cs
@@ -23,6 +23,7 @@ public class GriddlyContext
public int PageSize { get; set; }
public GriddlyExportFormat? ExportFormat { get; set; }
public SortField[] SortFields { get; set; }
+ public GriddlySettings Settings { get; set; }
}
public class GriddlyFilterCookieData
diff --git a/Griddly.Mvc/GriddlyCss.cs b/Griddly.Mvc/GriddlyCss.cs
new file mode 100644
index 0000000..ec69aff
--- /dev/null
+++ b/Griddly.Mvc/GriddlyCss.cs
@@ -0,0 +1,76 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace Griddly.Mvc
+{
+ public class GriddlyCssIcons
+ {
+ public string Calendar { get; set; }
+ public string Remove { get; set; }
+ public string ListMultipleSelected { get; set; }
+ public string ListSingleSelected { get; set; }
+ public string Check { get; set; }
+ public string Filter { get; set; }
+ public string Clear { get; set; }
+ public string CaretDown { get; set; }
+ }
+
+ public struct GriddlyCss
+ {
+ public string TextCenter { get; set; }
+ public string TextRight { get; set; }
+ public string FloatRight { get; set; }
+ public string GriddlyDefault { get; set; }
+ public string TableDefault { get; set; }
+ public string ButtonDefault { get; set; }
+ public GriddlyCssIcons Icons { get; set; }
+ public bool IsBootstrap4 { get; set; }
+
+ public static GriddlyCss Bootstrap3Defaults = new GriddlyCss()
+ {
+ TextCenter = "text-center",
+ TextRight = "text-right",
+ FloatRight = "pull-right",
+ GriddlyDefault = null,
+ TableDefault = "table table-bordered table-hover",
+ ButtonDefault = "btn btn-default",
+ Icons = new GriddlyCssIcons()
+ {
+ Calendar = "glyphicon glyphicon-calendar",
+ Remove = "glyphicon glyphicon-remove",
+ ListMultipleSelected = "glyphicon glyphicon-ok",
+ ListSingleSelected = "glyphicon glyphicon-record",
+ Check = "glyphicon glyphicon-check",
+ Filter = "glyphicon glyphicon-filter",
+ Clear = "glyphicon glyphicon-ban-circle",
+ CaretDown = "caret"
+ }
+ };
+
+ public static GriddlyCss Bootstrap4Defaults = new GriddlyCss()
+ {
+ IsBootstrap4 = true,
+ TextCenter = "text-center",
+ TextRight = "text-right",
+ FloatRight = "float-right",
+ GriddlyDefault = null,
+ TableDefault = "table table-bordered table-hover",
+ ButtonDefault = "btn btn-outline-secondary",
+ Icons = new GriddlyCssIcons()
+ {
+ Calendar = "fa fa-calendar-alt",
+ Remove = "fa fa-times",
+ ListMultipleSelected = "fa fa-check",
+ ListSingleSelected = "fas fa-check-circle",
+ Check = "fa fa-check-square",
+ Filter = "fa fa-filter",
+ Clear = "fa fa-ban",
+ CaretDown = "fa fa-caret-down"
+ }
+ };
+ }
+
+}
diff --git a/Griddly.Mvc/GriddlyExport.cs b/Griddly.Mvc/GriddlyExport.cs
index 89889b6..7296db3 100644
--- a/Griddly.Mvc/GriddlyExport.cs
+++ b/Griddly.Mvc/GriddlyExport.cs
@@ -53,9 +53,6 @@ public GriddlyExport Column(Expression> e
{
var compiledTemplate = expression.Compile();
- //if (type == typeof(bool) && (BoolTrueHtml != null || BoolFalseHtml != null))
- // template = (row) => (compiledTemplate(row) as bool? == true) ? BoolTrueHtml : BoolFalseHtml;
- //else
template = (row) => compiledTemplate(row);
}
}
diff --git a/Griddly.Mvc/GriddlyResult.cs b/Griddly.Mvc/GriddlyResult.cs
index 3325a79..cd05d2a 100644
--- a/Griddly.Mvc/GriddlyResult.cs
+++ b/Griddly.Mvc/GriddlyResult.cs
@@ -72,7 +72,7 @@ public override void ExecuteResult(ControllerContext context)
if (context.IsChildAction)
{
- settings = GriddlySettingsResult.GetSettings(context, ViewName);
+ griddlyContext.Settings = settings = GriddlySettingsResult.GetSettings(context, ViewName);
GriddlySettings.OnGriddlyResultExecuting?.Invoke(settings, context);
@@ -127,7 +127,7 @@ public override void ExecuteResult(ControllerContext context)
}
else
{
- settings = GriddlySettingsResult.GetSettings(context, ViewName);
+ griddlyContext.Settings = settings = GriddlySettingsResult.GetSettings(context, ViewName);
settings.Columns.RemoveAll(x => x is GriddlySelectColumn);
diff --git a/Griddly.Mvc/GriddlySelectColumn.cs b/Griddly.Mvc/GriddlySelectColumn.cs
index bd5d611..8aed9d1 100644
--- a/Griddly.Mvc/GriddlySelectColumn.cs
+++ b/Griddly.Mvc/GriddlySelectColumn.cs
@@ -12,9 +12,9 @@ public class GriddlySelectColumn : GriddlyColumn
{
public Func