diff options
| author | Jules Laplace <jules@okfoc.us> | 2016-12-31 05:58:49 +0100 |
|---|---|---|
| committer | Jules Laplace <jules@okfoc.us> | 2016-12-31 05:58:49 +0100 |
| commit | fe31b3ad482c959deb5b4fa447e3d73c042e982c (patch) | |
| tree | f8ddac33fd7890d599e1f75a00eb08217ecde84d /themes/okadmin/templates/index.liquid | |
| parent | 3319b60ca946a0fad11da52bb3fee4aa66afb62c (diff) | |
| parent | 073b2af3e21edccb35dad6b5bfdda2772f164abf (diff) | |
merge
Diffstat (limited to 'themes/okadmin/templates/index.liquid')
| -rw-r--r-- | themes/okadmin/templates/index.liquid | 30 |
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> |
