From ed7b2be755535f83e0be1b78b751087eafca7419 Mon Sep 17 00:00:00 2001 From: Arnaud-D <35631001+Arnaud-D@users.noreply.github.com> Date: Sun, 17 Nov 2024 12:07:42 +0100 Subject: [PATCH] =?UTF-8?q?Corrige=20le=20texte=20dans=20les=20encarts=20p?= =?UTF-8?q?our=20la=20cr=C3=A9ation=20de=20sections,=20parties,=20chapitre?= =?UTF-8?q?s=20(#6684)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Il ne faut plus mentionner big- ou mini-tuto, puisque tous les contenus peuvent maintenant avoir n'importe quelle structure. --- templates/tutorialv2/includes/child.part.html | 12 ++++--- .../includes/content/content.part.html | 15 ++++++--- templates/tutorialv2/view/container.html | 32 ++++++++++++------- 3 files changed, 38 insertions(+), 21 deletions(-) diff --git a/templates/tutorialv2/includes/child.part.html b/templates/tutorialv2/includes/child.part.html index 293ffb2225..b1d4ea45e5 100644 --- a/templates/tutorialv2/includes/child.part.html +++ b/templates/tutorialv2/includes/child.part.html @@ -150,16 +150,20 @@

{{ "Ce"|feminize:child.get_level_as_string }} {{ child.get_level_as_string|lower }} {% trans "est vide." %}

{% if not child.is_chapter %} + {% captureas url_create_container %}{% url "content:create-container" content.pk content.slug child.slug %}{% endcaptureas %} + {% captureas url_create_extract %}{% url "content:create-extract" content.pk content.slug child.slug %}{% endcaptureas %} + {% blocktrans %} + {% endblocktrans %} {% endif %} {% elif child.can_add_extract and child.is_chapter %} diff --git a/templates/tutorialv2/includes/content/content.part.html b/templates/tutorialv2/includes/content/content.part.html index 0e7dba91ca..42b908ff25 100644 --- a/templates/tutorialv2/includes/content/content.part.html +++ b/templates/tutorialv2/includes/content/content.part.html @@ -1,5 +1,6 @@ {% load i18n %} {% load emarkdown %} +{% load captureas %} {% if content.get_introduction %} {% if display_config.draft_actions.enable_edit %} @@ -47,19 +48,23 @@ {% empty %} {% if content.can_add_extract and content.can_add_container and display_config.draft_actions.enable_edit %}
+ {% captureas url_create_container %}{% url "content:create-container" content.pk content.slug %}{% endcaptureas %} + {% captureas url_create_extract %}{% url "content:create-extract" content.pk content.slug %}{% endcaptureas %} + {% blocktrans %}

- {% trans "Ce contenu est vide." %} {% trans "Vous pouvez :" %} + Ce contenu est vide. Vous pouvez :

+ {% endblocktrans %}
{% endif %} {% endfor %} diff --git a/templates/tutorialv2/view/container.html b/templates/tutorialv2/view/container.html index d678026dd3..7165ce3ec8 100644 --- a/templates/tutorialv2/view/container.html +++ b/templates/tutorialv2/view/container.html @@ -129,24 +129,32 @@ {{ "Ce"|feminize:container.get_level_as_string }} {{ container.get_level_as_string|lower }} {% trans " est vide." %}

{% if container.can_add_extract and container.can_add_container %} + {% captureas url_create_container %} + {% if container.parent == content %} + {% url "content:create-container" content.pk content.slug container.slug %} + {% else %} + {% url "content:create-container" content.pk content.slug container.parent.slug %} + {% endif %} + {% endcaptureas %} + {% captureas url_create_extract %} + {% if container.parent == content %} + {% url "content:create-extract" content.pk content.slug container.slug %} + {% else %} + {% url "content:create-extract" content.pk content.slug container.parent.slug %} + {% endif %} + {% endcaptureas %} + {% blocktrans %} + {% endblocktrans %} {% endif %} {% endif %}