Allow to group exports

This commit is contained in:
2019-06-18 21:01:32 +02:00
parent b7e71088ac
commit 9c6a3de0ff
5 changed files with 76 additions and 14 deletions

View File

@@ -25,19 +25,44 @@
<div class="container-export">
<h1>{{ 'Exports list'|trans }}</h1>
<div class="export-list">
{% for export_alias,export in exports %}
<div class="export-list__element">
<h2>{{ export.title|trans }}</h2>
<p>{{ export.description|trans }}</p>
<div>
{% for group, exports in grouped_exports if group != '_' %}
<h2>{{ group }}</h2>
<div class="export-list">
{% for export_alias, export in exports %}
<div class="export-list__element">
<h2>{{ export.title|trans }}</h2>
<p>{{ export.description|trans }}</p>
<p>
<a class="sc-button bt-action" href="{{ path('chill_main_export_new', { 'alias': export_alias } ) }}">
{{ 'Create an export'|trans }}
</a>
</p>
<p>
<a class="sc-button bt-action" href="{{ path('chill_main_export_new', { 'alias': export_alias } ) }}">
{{ 'Create an export'|trans }}
</a>
</p>
</div>
{% endfor %}
</div>
{% endfor %}
{% if grouped_exports|keys|length > 1 %}
<h2>{{ 'Ungrouped exports'|trans }}</h2>
{% endif %}
<div class="export-list">
{% for export_alias,export in grouped_exports['_'] %}
<div class="export-list__element">
<h2>{{ export.title|trans }}</h2>
<p>{{ export.description|trans }}</p>
<p>
<a class="sc-button bt-action" href="{{ path('chill_main_export_new', { 'alias': export_alias } ) }}">
{{ 'Create an export'|trans }}
</a>
</p>
</div>
{% endfor %}
</div>
</div>
{% endfor %}
</div>
</div>
{% endblock %}