Projet

Général

Profil

0018-fontenay-sous-bois-2018-simplify-custom-forms_of_cat.patch

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

Télécharger (2,48 ko)

Voir les différences:

Subject: [PATCH 18/19] fontenay-sous-bois-2018: simplify custom
 forms_of_category (#40883)

 .../combo/wcs/forms_of_category.html          | 35 ++++---------------
 1 file changed, 6 insertions(+), 29 deletions(-)
templates/variants/fontenay-sous-bois-2018/combo/wcs/forms_of_category.html
1
{% extends 'combo/wcs/forms_of_category.html' %}
1 2
{% load assets i18n static %}
2
{% block cell-content %}
3
<div class="wcs-forms-of-category-{{slug}}">
3

  
4
{% block cell-header %}{% endblock cell-header %}
5

  
6
{% block cell-top-content %}
4 7
<picture>
5 8
<img src="{% asset_url "wcs:category:picture:"|add:cell.category_reference size="265x174" crop="center" %}" alt="">
6 9
</picture>
......
10 13
{{ description|safe }}
11 14
</div>
12 15
{% endif %}
13
<ul>
14
{% for form in forms %}
15
<li class="{% if form.authentication_required %}required-authentication{% endif %}
16
           {% for context in form.required_authentication_contexts %}required-{{context}}-authentication {% endfor %}
17
           {% for keyword in form.keywords %}keyword-{{keyword|slugify}}{% endfor %}
18
           {% if form.redirection %}is-redirection{% endif %}"
19
  ><a href="{{ form.url }}tryauth">{{ form.title }}</a>
20
  {% if form.description %}<div class="description">{{ form.description|safe }}</div>{% endif %}
21
  </li>
22
{% endfor %}
23

  
24
{% if more_forms %}
25
<li class="more-items"><a>+</a></li>
26
{% for form in more_forms %}
27
<li style="display: none" class="additional-form {% if form.authentication_required %}required-authentication{% endif %}
28
           {% for context in form.required_authentication_contexts %}required-{{context}}-authentication {% endfor %}
29
           {% for keyword in form.keywords %}keyword-{{keyword|slugify}}{% endfor %}
30
           {% if form.redirection %}is-redirection{% endif %}"
31
  ><a href="{{ form.url }}tryauth">{{ form.title }}</a>
32
  {% if form.description %}<div class="description">{{ form.description|safe }}</div>{% endif %}
33
  </li>
34
{% endfor %}
35
{% endif %}
36

  
37
</ul>
38
</div>
39
{% endblock %}
16
{% endblock cell-top-content %}
40
-