Projet

Général

Profil

0001-toulouse-2022-use-a-unique-sorted-list-for-current-f.patch

Benjamin Dauvergne, 09 novembre 2022 08:07

Télécharger (4,2 ko)

Voir les différences:

Subject: [PATCH] toulouse-2022: use a unique sorted list for current forms
 (#71162)

 .../combo/wcs/current_forms.html              | 12 +++++++++++
 .../combo/wcs/list_of_forms.html              | 21 +++++++++++++++++++
 .../combo/wcs/user_all_forms.html             | 12 +++++++++++
 .../combo/wcs/user_done_forms.html            | 12 +++++++++++
 4 files changed, 57 insertions(+)
 create mode 100644 templates/variants/toulouse-2022/combo/wcs/current_forms.html
 create mode 100644 templates/variants/toulouse-2022/combo/wcs/list_of_forms.html
 create mode 100644 templates/variants/toulouse-2022/combo/wcs/user_all_forms.html
 create mode 100644 templates/variants/toulouse-2022/combo/wcs/user_done_forms.html
templates/variants/toulouse-2022/combo/wcs/current_forms.html
1
{% load i18n %}
2
{% block cell-content %}
3
  <h2>{{ cell.custom_title|default:_('Current Forms') }}</h2>
4
  {% if forms %}
5
    <div class="links-list current-forms current-forms list-of-forms">
6
      {% include "combo/wcs/list_of_forms.html" %}
7
    </div>
8
    {% include "combo/pagination.html" %}
9
  {% else %}
10
    <div class="cell--body"><p class="empty-message">{% trans "There are no current forms." %}</p></div>
11
  {% endif %}
12
{% endblock %}
templates/variants/toulouse-2022/combo/wcs/list_of_forms.html
1
{% load combo %}
2
{% block cell-content %}
3
  {% if forms %}
4
    <ul>
5
      {% for data in forms|dictsortreversed:"form_last_update_datetime" %}
6
        {% if data.url and data.title %}
7
          <li class="{{data.status_css_class}} {% if data.form_status_is_endpoint %}done{% endif %}"><a
8
            {% if data.readable %}href="{{ data.url }}"{% endif %}><span class="form-title">{{data.name}}</span>
9
            {% if data.draft %}
10
              <span class="form-number">{{data.datetime|strptime:"%Y-%m-%d %H:%M:%S"}}</span>
11
            {% else %}
12
              <span class="form-number">{{data.form_number}}
13
                {% if data.form_digest %}<span class="form-digest">({{data.form_digest}})</span>{% endif %}
14
              </span>
15
            {% endif %}
16
            <span class="form-status">{{data.status}}</span></a></li>
17
        {% endif %}
18
      {% endfor %}
19
    </ul>
20
  {% endif %}
21
{% endblock %}
templates/variants/toulouse-2022/combo/wcs/user_all_forms.html
1
{% load i18n %}
2
{% block cell-content %}
3
  <h2>{{ cell.custom_title|default:_('All Forms') }}</h2>
4
  {% if forms %}
5
    <div class="links-list user-all-forms list-of-forms">
6
      {% include "combo/wcs/list_of_forms.html" %}
7
    </div>
8
    {% include "combo/pagination.html" %}
9
  {% else %}
10
    <div class="cell--body"><p class="empty-message">{% trans "There are no forms." %}</p></div>
11
  {% endif %}
12
{% endblock %}
templates/variants/toulouse-2022/combo/wcs/user_done_forms.html
1
{% load i18n %}
2
{% block cell-content %}
3
  <h2>{{ cell.custom_title|default:_('Done Forms') }}</h2>
4
  {% if forms %}
5
    <div class="links-list list-of-forms">
6
      {% include "combo/wcs/list_of_forms.html" %}
7
    </div>
8
    {% include "combo/pagination.html" %}
9
  {% else %}
10
    <div class="cell--body"><p class="empty-message">{% trans "There are no done forms or they have been removed." %}</p></div>
11
  {% endif %}
12
{% endblock %}
0
-