summaryrefslogtreecommitdiff
path: root/themes/okadmin/templates/index.liquid
diff options
context:
space:
mode:
Diffstat (limited to 'themes/okadmin/templates/index.liquid')
-rw-r--r--themes/okadmin/templates/index.liquid30
1 files changed, 17 insertions, 13 deletions
diff --git a/themes/okadmin/templates/index.liquid b/themes/okadmin/templates/index.liquid
index c5754dc..d47eb2e 100644
--- a/themes/okadmin/templates/index.liquid
+++ b/themes/okadmin/templates/index.liquid
@@ -49,19 +49,23 @@
{% endfor %}
{% endfor %}
{% else %}
- <ol class="resource-list">
- {% for data in resource.data %}
- <a href="{{resource.type}}/{{data.id}}/" {% if data.disabled %}class="disabled"{% endif %}>
- {% if resource.display == 'image' %}
- <div class="image" style="background-image:url('{{data.title}}')"></div>
- {% else %}
- {{data.title}}
- {% endif %}
- <input class="resource-input" type="hidden" name="{{resource.type}}[{{forloop.index0}}]"
- value='{{data | stringify | escape_once}}'>
- </a>
- {% endfor %}
- </ol>
+ {% assign resourceJSON = resource.data[0] | stringify %}
+ {% if resourceJSON != "[]" %}
+ <ol class="resource-list">
+ {% for data in resource.data %}
+ <a href="{{resource.type}}/{{data.id}}/" {% if data.disabled %}class="disabled"{% endif %}>
+ {% if resource.display == 'image' %}
+ <div class="image" style="background-image:url('{{data.title}}')"></div>
+ {% else %}
+ {{data.title}}
+ {% endif %}
+ <input class="resource-input" type="hidden" name="{{resource.type}}[{{forloop.index0}}]"
+ value='{{data | stringify | escape_once}}'>
+ </a>
+ {% endfor %}
+ </ol>
+ {% endif %}
+ {% endif %}
<footer>
<nav>
<a class="btn cancel-btn" href="#">cancel</a>