diff --git a/site/plugins/admin/views/templates/content/entries/index.html b/site/plugins/admin/views/templates/content/entries/index.html index be814dd0..23246122 100644 --- a/site/plugins/admin/views/templates/content/entries/index.html +++ b/site/plugins/admin/views/templates/content/entries/index.html @@ -1,6 +1,8 @@ {% extends "plugins/admin/views/partials/base.html" %} {% block content %} + + {% if entries_list|length > 0 %} @@ -11,65 +13,65 @@ {% for entry in entries_list %} - - - - + + + + {% endfor %}
- {% set entries = entries.fetchAll(entry.slug, 'slug', 'ASC') %} - - {% if entry.fieldset %} - {% set fieldset_path = PATH_FIELDSETS ~ '/' ~ entry.fieldset ~ '.json' %} - {% if filesystem_has(fieldset_path) %} - {% set fieldset = json_parser_decode(filesystem_read(fieldset_path)) %} - {% if fieldset.default_field %} - {% if entry[fieldset.default_field] != '' %} - {{ entry[fieldset.default_field] }} - {% else %} - {{ entry.slug }} - {% endif %} - {% else %} - {{ entry.slug }} - {% endif %} - {% else %} - {{ entry.slug }} - {% endif %} - {% else %} - {{ entry.slug }} - {% endif %} - {% if entries|length > 0 %} - ({{ entries|length }}) - {% endif %} - - - - - - {{ tr('admin_delete') }} -
+ {% set _entries = entries.fetchAll(entry.slug, {'order_by': {field: 'slug', direction: 'asc'}}) %} + + {% if entry.fieldset %} + {% set fieldset_path = PATH_FIELDSETS ~ '/' ~ entry.fieldset ~ '.json' %} + {% if filesystem_has(fieldset_path) %} + {% set fieldset = json_parser_decode(filesystem_read(fieldset_path)) %} + {% if fieldset.default_field %} + {% if entry[fieldset.default_field] != '' %} + {{ entry[fieldset.default_field] }} + {% else %} + {{ entry.slug }} + {% endif %} + {% else %} + {{ entry.slug }} + {% endif %} + {% else %} + {{ entry.slug }} + {% endif %} + {% else %} + {{ entry.slug }} + {% endif %} + {% if _entries|length > 0 %} + ({{ _entries|length }}) + {% endif %} + + + + + + {{ tr('admin_delete') }} +