From 14094a0f9082e1eaf22d1864a52e21c69c965f3d Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Fri, 2 Sep 2016 12:40:37 -0400 Subject: show sort/+ buttons on groupby elements if resource is empty --- themes/okadmin/templates/index.liquid | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'themes') diff --git a/themes/okadmin/templates/index.liquid b/themes/okadmin/templates/index.liquid index c8c4aa5..ebb1bde 100644 --- a/themes/okadmin/templates/index.liquid +++ b/themes/okadmin/templates/index.liquid @@ -9,13 +9,15 @@

{{name | capitalize}}

- {% if resource.groupBy %} + {% assign resourceJSON = resource.data[0][resource.groupBy] | stringify %} + {% if resource.groupBy and resourceJSON != "{}" %} {% assign i = 0 %} {% for item in resource.data %} {% for pair in item[resource.groupBy] %} -- cgit v1.2.3-70-g09d2