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 %}