diff options
Diffstat (limited to 'themes')
| -rw-r--r-- | themes/okadmin/templates/index.liquid | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/themes/okadmin/templates/index.liquid b/themes/okadmin/templates/index.liquid index d2ae557..9a46455 100644 --- a/themes/okadmin/templates/index.liquid +++ b/themes/okadmin/templates/index.liquid @@ -49,15 +49,18 @@ {% endfor %} {% endfor %} {% else %} - <ol class="resource-list"> - {% for data in resource.data %} - <a href="{{resource.type}}/{{data.id}}/" {% if data.disabled %}class="disabled"{% endif %}> - {{data.title}} - <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 %}> + {{data.title}} + <input class="resource-input" type="hidden" name="{{resource.type}}[{{forloop.index0}}]" + value='{{data | stringify | escape_once}}'> + </a> + {% endfor %} + </ol> + {% endif %} <footer> <nav> <a class="btn cancel-btn" href="#">cancel</a> |
