Skip to content

Commit

Permalink
Corrige un problème d'espace dans l'affichage des catégories sur une …
Browse files Browse the repository at this point in the history
…publication
  • Loading branch information
Arnaud-D committed Dec 21, 2022
1 parent 58a7121 commit e5716f2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
12 changes: 12 additions & 0 deletions templates/tutorialv2/includes/categories.part.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{% load i18n %}

<p>
{% trans "Catégorie" %}{{ categories|pluralize }} :

{# Warning: whitespace in the lines below is crucial for rendering, despite ruining legibility. Change with care. #}
{% for category in categories %}{% if forloop.first %}{% elif forloop.last %} {% trans "et" %}{% else %},{% endif %}
{% if content.is_opinion %}
<a href="{% url 'opinion:list' %}?category={{ category.slug }}">{{ category.title }}</a>
{% else %}
<a href="{% url 'publication:list' %}?subcategory={{ category.slug }}">{{ category.title }}</a>{% endif %}{% endfor %}
</p>
13 changes: 1 addition & 12 deletions templates/tutorialv2/includes/tags_authors.part.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,7 @@
{% endif %}
{% endwith %}

<p>
{% trans "Catégorie" %}{{ content.subcategory.all|pluralize }} :

{% for category in content.subcategory.all %}
{% if forloop.first %}{% elif forloop.last %} {% trans "et" %}{% else %},{% endif %}
{% if content.is_opinion %}
<a href="{% url 'opinion:list' %}?category={{ category.slug }}">{{ category.title }}</a>
{% else %}
<a href="{% url 'publication:list' %}?subcategory={{ category.slug }}">{{ category.title }}</a>
{% endif %}
{% endfor %}
</p>
{% include "tutorialv2/includes/categories.part.html" with categories=content.subcategory.all %}

{% include "tutorialv2/includes/goals.part.html" with goals=publishablecontent.goals.all %}

Expand Down

0 comments on commit e5716f2

Please sign in to comment.