diff options
| author | Jules Laplace <jules@okfoc.us> | 2016-10-24 17:27:36 -0400 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2016-10-24 17:27:36 -0400 |
| commit | 073b2af3e21edccb35dad6b5bfdda2772f164abf (patch) | |
| tree | 4621ce5a3a282b30b59d55cb770672a5b681aa24 /themes | |
| parent | bc38a56567c20f3205b89dae710d131655b0220d (diff) | |
fix issue with empty schemasv0.2.4
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> |
