1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-18 10:51:21 +02:00

feat(admin-plugin): update all tables #211

This commit is contained in:
Awilum
2020-01-31 18:52:42 +03:00
parent a3cc7d1fb5
commit 4a0f6f811b
4 changed files with 57 additions and 10 deletions

View File

@@ -1,8 +1,17 @@
{% extends "plugins/admin/templates/partials/base.html" %}
{% block content %}
{% if fieldsets_list | length < 0 %}
{% if fieldsets_list | length > 0 %}
<table class="table">
<thead>
<tr>
<th></th>
<th>
{{ tr('admin_fieldset') }}
</th>
<th></th>
</tr>
</thead>
<tbody>
{% for id, title in fieldsets_list %}
{% set fieldset_path = PATH_FIELDSETS ~ '/' ~ id ~ '.yaml' %}

View File

@@ -3,6 +3,15 @@
{% block content %}
{% if snippets_list | length > 0 %}
<table class="table">
<thead>
<tr>
<th></th>
<th>
{{ tr('admin_snippet') }}
</th>
<th></th>
</tr>
</thead>
<tbody>
{% for id in snippets_list %}
<tr>

View File

@@ -3,6 +3,21 @@
{% block content %}
{% if (themes_list | length > 0) %}
<table class="table">
<thead>
<tr>
<th></th>
<th>
{{ tr('admin_theme') }}
</th>
<th>
{{ tr('admin_description') }}
</th>
<th>
{{ tr('admin_version') }}
</th>
<th></th>
</tr>
</thead>
<tbody>
{% for key, theme in themes_list %}
<tr>
@@ -12,6 +27,8 @@
<td class="pl-0">
<a href="{{ path_for('admin.templates.index') }}?theme={{ key }}">{{ theme.name }}</a>
</td>
<td class="{% if theme.enabled == false %}opacity-50{% endif %}">{{ theme.description }}</td>
<td class="{% if theme.enabled == false %}opacity-50{% endif %}">{{ theme.version }}</td>
<td class="text-right">
<button type="button" class="js-dropdown-btn" data-dropdown="dropdown-{{ key }}">
<i class="icon">{{ icon('fas fa-ellipsis-h') }}</i>

View File

@@ -1,9 +1,21 @@
{% extends "plugins/admin/templates/partials/base.html" %}
{% block content %}
{% if (templates_list | length > 0)
{% if (templates_list | length > 0)
or(partials_list | length > 0) %}
<table class="table">
<thead>
<tr>
<th></th>
<th>
{{ tr('admin_template') }}
</th>
<th>
{{ tr('admin_type') }}
</th>
<th></th>
</tr>
</thead>
<tbody>
{% if templates_list | length > 0 %}
{% for template in templates_list %}
@@ -102,12 +114,12 @@
</tbody>
</table>
{% else %}
<div class="text-center flex justify-center items-center h-full">
<div>
<i class="icon icon--4xl">{{ icon('fas fa-layer-group') }}</i>
<h3 class="text-2xl pt-4 pb-8">{{ tr('admin_you_have_not_created_any_templates_yet') }}</h3>
<a href="{{ path_for('admin.templates.add') }}" class="button">{{ tr('admin_create_new_template') }}</a>
</div>
</div>
<div class="text-center flex justify-center items-center h-full">
<div>
<i class="icon icon--4xl">{{ icon('fas fa-layer-group') }}</i>
<h3 class="text-2xl pt-4 pb-8">{{ tr('admin_you_have_not_created_any_templates_yet') }}</h3>
<a href="{{ path_for('admin.templates.add') }}" class="button">{{ tr('admin_create_new_template') }}</a>
</div>
</div>
{% endif %}
{% endblock %}
{% endblock %}