summaryrefslogtreecommitdiff
path: root/themes/okadmin
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2016-09-02 12:40:37 -0400
committerJules Laplace <jules@okfoc.us>2016-09-02 12:40:37 -0400
commit14094a0f9082e1eaf22d1864a52e21c69c965f3d (patch)
tree945d64312c5b1b4a1cb89dd98120bd1beb52412e /themes/okadmin
parentef64682b40be479ecff91c19d406fff10f9cc688 (diff)
show sort/+ buttons on groupby elements if resource is empty
Diffstat (limited to 'themes/okadmin')
-rw-r--r--themes/okadmin/templates/index.liquid4
1 files changed, 3 insertions, 1 deletions
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 @@
<section class="resource-category root
{% if resource.groupBy %} grouped {% endif %}
+ {% if resource.descending %} descending {% endif %}
{{name}}">
<form action="{{resource.type}}/__batch__/" method="POST">
<header>
<h2>{{name | capitalize}}</h2>
</header>
<input type="hidden" name="_method" value="PUT">
- {% 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] %}