From c607da774fdda46eda463cc3bad5856f4f9a9e79 Mon Sep 17 00:00:00 2001 From: Awilum Date: Mon, 13 May 2019 12:13:36 +0300 Subject: [PATCH] Flextype Box Plugin: Admin #125 #117 - Entries Controller/Views implementation --- .../views/templates/content/entries/add.html | 33 ++++++++++ .../templates/content/entries/index.html | 60 +++++++++++++++++++ 2 files changed, 93 insertions(+) create mode 100644 site/plugins/admin/views/templates/content/entries/add.html create mode 100644 site/plugins/admin/views/templates/content/entries/index.html diff --git a/site/plugins/admin/views/templates/content/entries/add.html b/site/plugins/admin/views/templates/content/entries/add.html new file mode 100644 index 00000000..60edb68d --- /dev/null +++ b/site/plugins/admin/views/templates/content/entries/add.html @@ -0,0 +1,33 @@ +{% extends "plugins/admin/views/partials/base.html" %} + +{% block content %} +
+ + + + +
+
+
+ + +
+
+ + +
+
+ + +
+
+ +
+
+
+
+{% endblock %} diff --git a/site/plugins/admin/views/templates/content/entries/index.html b/site/plugins/admin/views/templates/content/entries/index.html new file mode 100644 index 00000000..36cb4a5a --- /dev/null +++ b/site/plugins/admin/views/templates/content/entries/index.html @@ -0,0 +1,60 @@ +{% extends "plugins/admin/views/partials/base.html" %} + +{% block content %} +{% if entries_list|length > 0 %} + + + + + + + + + {% for entry in entries_list %} + + + + + {% endfor %} + +
{{ tr('admin_entry') }}
+ {% set entries = entries_fetch_all(entry.slug, 'slug', 'ASC') %} + + {% if entry.fieldset %} + {% set fieldset_path = PATH_THEMES ~ '/' ~ registry.settings.theme ~ '/fieldsets/' ~ entry.fieldset ~ '.json' %} + {% if filesystem_has(fieldset_path) %} + {% set fieldset = json_parser_decode(filesystem_read(fieldset_path)) %} + {% if fieldset.default_field %} + {{ entry[fieldset.default_field] }} + {% else %} + {{ entry.slug }} + {% endif %} + {% else %} + {{ entry.slug }} + {% endif %} + {% else %} + {{ entry.slug }} + {% endif %} + {% if entries|length > 0 %} + ({{ entries|length }}) + {% endif %} + + +
+ {{ tr('admin_edit') }} + + +
+ +
+{% endif %} +{% endblock %}