Projet

Général

Profil

0019-toulouse-simplify-custom-forms_of_category-link-list.patch

Lauréline Guérin, 23 avril 2020 11:44

Télécharger (2,44 ko)

Voir les différences:

Subject: [PATCH 19/19] toulouse: simplify custom forms_of_category &
 link-list-cell cells (#40883)

 .../toulouse/combo/wcs/forms_of_category.html | 35 +++----------------
 1 file changed, 5 insertions(+), 30 deletions(-)
templates/variants/toulouse/combo/wcs/forms_of_category.html
1
{% load assets i18n static %}
2
{% block cell-content %}
3
<div class="wcs-forms-of-category-{{slug}}">
4
<h2><span><span>{{ title }}</span></span><i class="opener"></i></h2>
5
<ul>
6
{% for form in forms %}
7
<li class="{% if form.authentication_required %}required-authentication{% endif %}
8
           {% for context in form.required_authentication_contexts %}required-{{context}}-authentication {% endfor %}
9
           {% for keyword in form.keywords %}keyword-{{keyword|slugify}}{% endfor %}
10
           {% if form.redirection %}is-redirection{% endif %}"
11
    data-keywords="{% for keyword in form.keywords %}{{ keyword }}{% endfor %}"
12
  ><a href="{{ form.url }}tryauth">{{ form.title }}</a>
13
  {% if form.description %}<div class="description">{{ form.description|safe }}</div>{% endif %}
14
  </li>
15
{% endfor %}
1
{% extends 'combo/wcs/forms_of_category.html' %}
16 2

  
17
{% if more_forms %}
18
<li class="more-items"><a>+</a></li>
19
{% for form in more_forms %}
20
<li style="display: none" class="additional-form {% if form.authentication_required %}required-authentication{% endif %}
21
           {% for context in form.required_authentication_contexts %}required-{{context}}-authentication {% endfor %}
22
           {% for keyword in form.keywords %}keyword-{{keyword|slugify}}{% endfor %}
23
           {% if form.redirection %}is-redirection{% endif %}"
24
  ><a href="{{ form.url }}tryauth">{{ form.title }}</a>
25
  {% if form.description %}<div class="description">{{ form.description|safe }}</div>{% endif %}
26
  </li>
27
{% endfor %}
28
{% endif %}
3
{% block cell-header %}{% endblock cell-header %}
29 4

  
30
</ul>
31
</div>
32
{% endblock %}
5
{% block cell-top-content %}
6
<h2><span><span>{{ title }}</span></span><i class="opener"></i></h2>
7
{% endblock cell-top-content %}
33
-