templates: improve user lists of forms markup (#53234)

This commit is contained in:
Thomas Jund 2021-04-27 16:06:29 +02:00
parent 9ca7e0c17e
commit e939770c0c
4 changed files with 15 additions and 4 deletions

View File

@ -1,6 +1,7 @@
{% load i18n %}
{% block cell-content %}
<h2>{% trans 'Current Drafts' %}</h2>
{% if drafts %}
{% for slug, forms in current_drafts.items %}
<div class="links-list current-drafts-{{ slug }} current-drafts list-of-forms">
{% if forms.data %}
@ -17,6 +18,7 @@
{% endif %}
</div>
{% endfor %}
{% if not drafts %}<div class="empty-message"><p>{% trans "There are no current drafts." %}</p></div>{% endif %}
{% include "combo/pagination.html" %}
{% else %}
<div class="cell--body"><p class="empty-message">{% trans "There are no current drafts." %}</p></div>{% endif %}
{% endblock %}

View File

@ -1,11 +1,14 @@
{% load i18n %}
{% block cell-content %}
<h2>{% trans 'Current Forms' %}</h2>
{% if forms %}
{% for slug, forms in current_forms.items %}
<div class="links-list current-forms-{{ slug }} current-forms list-of-forms">
{% include "combo/wcs/list_of_forms.html" with forms=forms %}
</div>
{% endfor %}
{% if not forms %}<div class="empty-message"><p>{% trans "There are no current forms." %}</p></div>{% endif %}
{% include "combo/pagination.html" %}
{% else %}
<div class="cell--body"><p class="empty-message">{% trans "There are no current forms." %}</p></div>
{% endif %}
{% endblock %}

View File

@ -1,11 +1,14 @@
{% load i18n %}
{% block cell-content %}
<h2>{% trans 'All Forms' %}</h2>
{% if forms %}
{% for slug, forms in user_forms.items %}
<div class="links-list user-forms-{{ slug }} user-all-forms list-of-forms">
{% include "combo/wcs/list_of_forms.html" with forms=forms %}
</div>
{% endfor %}
{% if not forms %}<div class="empty-message"><p>{% trans "There are no forms." %}</p></div>{% endif %}
{% include "combo/pagination.html" %}
{% else %}
<div class="cell--body"><p class="empty-message">{% trans "There are no forms." %}</p></div>
{% endif %}
{% endblock %}

View File

@ -1,11 +1,14 @@
{% load i18n %}
{% block cell-content %}
<h2>{% trans 'Done Forms' %}</h2>
{% if forms %}
{% for slug, forms in user_forms.items %}
<div class="links-list user-forms-{{ slug }} list-of-forms">
{% include "combo/wcs/list_of_forms.html" with forms=forms %}
</div>
{% endfor %}
{% if not forms %}<div class="empty-message"><p>{% trans "There are no done forms or they have been removed." %}</p></div>{% endif %}
{% include "combo/pagination.html" %}
{% else %}
<div class="cell--body"><p class="empty-message">{% trans "There are no done forms or they have been removed." %}</p></div>
{% endif %}
{% endblock %}