- {% trans "Ajouter une section" %}
- {% trans " pour adopter le format moyen-tuto, composé uniquement de sections." %}
+ {% if display_config.draft_actions.enable_edit %}
+ {% if not child.is_chapter %}
+
+{% endif %}
+
+{% for child in content.children %}
+ {% include "tutorialv2/includes/child.part.html" with child=child %}
+{% empty %}
+ {% if content.can_add_extract and content.can_add_container and display_config.draft_actions.enable_edit %}
+
+
+ {% trans "Ce contenu est vide." %} {% trans "Vous pouvez :" %}
+
+
+
+ {% trans "Ajouter une partie" %}
+ {% trans " pour adopter le format big-tuto ou moyen-tuto. Vous pourrez y ajouter des chapitres ou des sections ;" %}
+
+ {% trans "Il n’y a pas de conclusion." %}
+ {% if display_config.draft_actions.enable_edit %}
+ {% trans "Vous pouvez " %}{% trans "en ajouter une" %}.
+ {% endif %}
+
+
+{% endif %}
diff --git a/templates/tutorialv2/includes/content_pager.part.html b/templates/tutorialv2/includes/content/content_pager.part.html
similarity index 100%
rename from templates/tutorialv2/includes/content_pager.part.html
rename to templates/tutorialv2/includes/content/content_pager.part.html
diff --git a/templates/tutorialv2/includes/content/online_content.part.html b/templates/tutorialv2/includes/content/online_content.part.html
new file mode 100644
index 0000000000..cc34493e89
--- /dev/null
+++ b/templates/tutorialv2/includes/content/online_content.part.html
@@ -0,0 +1,27 @@
+{% if content.has_extracts %}
+ {{ content.get_content_online|safe }}
+{% else %}
+ {% if content.introduction %}
+ {{ content.get_introduction_online|default:""|safe }}
+ {% endif %}
+
+ {% if not content.has_sub_containers %}
+
+ {% endif %}
+
+ {% for child in content.children %}
+ {% include "tutorialv2/includes/child_online.part.html" with child=child %}
+ {% endfor %}
+
+ {% if not content.has_sub_containers %}
+
+ {% endif %}
+
+
+
+
+ {% if content.conclusion %}
+ {{ content.get_conclusion_online|default:""|safe }}
+ {% endif %}
+
+{% endif %}
diff --git a/templates/tutorialv2/includes/warn_typo.part.html b/templates/tutorialv2/includes/content/warn_typo.part.html
similarity index 96%
rename from templates/tutorialv2/includes/warn_typo.part.html
rename to templates/tutorialv2/includes/content/warn_typo.part.html
index 9f58d8ec4d..9fce837ee7 100644
--- a/templates/tutorialv2/includes/warn_typo.part.html
+++ b/templates/tutorialv2/includes/content/warn_typo.part.html
@@ -22,7 +22,7 @@
{% endif %}
- {% crispy formWarnTypo %}
+ {% crispy form_warn_typo %}
diff --git a/templates/tutorialv2/includes/headline/beta_info.part.html b/templates/tutorialv2/includes/headline/beta_info.part.html
new file mode 100644
index 0000000000..01b1678bf7
--- /dev/null
+++ b/templates/tutorialv2/includes/headline/beta_info.part.html
@@ -0,0 +1,28 @@
+{% load i18n %}
+
+{% if state.current_version %}
+
+
+ {% blocktrans %}
+ Cette version est en BÊTA !
+ {% endblocktrans %}
+
+ {% if beta_topic %}
+ {% blocktrans with url=beta_topic.get_absolute_url %}
+ Vous pouvez y réagir sur ce sujet.
+ {% endblocktrans %}
+ {% endif %}
+
+
+{% endif %}
+
+{% if state.other_version %}
+
+
+ {% url "content:beta-view" content.pk content.slug as beta_url %}
+ {% blocktrans with beta_url=beta_url %}
+ Une autre version de cette publication est en bêta.
+ {% endblocktrans %}
+
+ {% if content.authors.count > 1 %}
+ {% trans "Les auteurs de ce contenu recherchent" %}
+ {% else %}
+ {% trans "L’auteur de ce contenu recherche" %}
+ {% endif %}
+
+ {% for help in content_helps %}{% if not forloop.first %}{% if forloop.last %}{% trans ' et ' %}{% else %}{% trans ', ' %}{% endif %}{% endif %}un {{ help.title|lower }}{% if forloop.last %}{% trans '.' %}{% endif %}{% endfor %}
+
+ {% if not can_edit %}
+ {% blocktrans with plural=content.authors.count|pluralize_fr %}
+ N’hésitez pas à le{{ plural }} contacter par MP pour proposer votre aide !
+ {% endblocktrans %}
+ {% endif %}
+
+
+{% endif %}
diff --git a/templates/tutorialv2/includes/headline/licence.part.html b/templates/tutorialv2/includes/headline/licence.part.html
new file mode 100644
index 0000000000..8426f450a5
--- /dev/null
+++ b/templates/tutorialv2/includes/headline/licence.part.html
@@ -0,0 +1,21 @@
+{% load i18n %}
+{% load crispy_forms_tags %}
+
+{% if show_form %}
+ {% if licence %}
+
+ {% blocktrans %}
+ Ce contenu est obsolète. Il peut contenir des informations intéressantes mais soyez prudent avec celles-ci.
+ {% endblocktrans %}
+
+ {% trans "Ce contenu a été modéré. Il ne peut pas faire l'objet d'une nouvelle publication." %}
+
+
diff --git a/templates/tutorialv2/includes/headline/opinion_promotion_info.part.html b/templates/tutorialv2/includes/headline/opinion_promotion_info.part.html
new file mode 100644
index 0000000000..4cb0a7d8ca
--- /dev/null
+++ b/templates/tutorialv2/includes/headline/opinion_promotion_info.part.html
@@ -0,0 +1,19 @@
+{% load i18n %}
+
+{% if content.is_opinion %}
+ {% if content.converted_to %}
+ {% if content.converted_to.get_absolute_url_online %}
+
+ {% blocktrans with url_article=content.converted_to.get_absolute_url_online %}
+ Ce billet a été promu en article.
+ {% endblocktrans %}
+
+ {% elif is_staff %}
+
+ {% blocktrans with url_article=content.converted_to.get_absolute_url %}
+ Ce billet a fait l’objet d’une demande de publication en tant qu’article. Il est donc présent dans la zone de validation en attente de prise en charge par un validateur.
+ {% endblocktrans %}
+
+ {% endif %}
+ {% endif %}
+{% endif %}
diff --git a/templates/tutorialv2/includes/headline/reading_time.part.html b/templates/tutorialv2/includes/headline/reading_time.part.html
new file mode 100644
index 0000000000..d8a117e00a
--- /dev/null
+++ b/templates/tutorialv2/includes/headline/reading_time.part.html
@@ -0,0 +1,8 @@
+{% load i18n %}
+{% load humanize_duration %}
+
+{% if reading_time and not is_part_or_chapter %}
+
{% trans "Temps de lecture estimé : " %}{{ reading_time|humanize_duration }}
+{% elif not is_part_or_chapter %}
+
{% trans "Temps de lecture estimé à moins d’une minute." %}
+{% endif %}
diff --git a/templates/tutorialv2/includes/exports.part.html b/templates/tutorialv2/includes/sidebar/exports.part.html
similarity index 100%
rename from templates/tutorialv2/includes/exports.part.html
rename to templates/tutorialv2/includes/sidebar/exports.part.html
diff --git a/templates/tutorialv2/includes/sidebar/follow_links.part.html b/templates/tutorialv2/includes/sidebar/follow_links.part.html
new file mode 100644
index 0000000000..5cfd95b035
--- /dev/null
+++ b/templates/tutorialv2/includes/sidebar/follow_links.part.html
@@ -0,0 +1,31 @@
+{% load i18n %}
+{% load interventions %}
+
+
+
+ {% with content_is_followed=object|is_content_followed %}
+ {% url "content:follow-reactions" object.pk as link_follow %}
+ {% if content_is_followed %}
+ {% trans "Suivre ce contenu" as data_onclick %}
+ {% trans "Ne plus suivre ce contenu" as button_text %}
+ {% else %}
+ {% trans "Suivre ce contenu" as button_text %}
+ {% trans "Ne plus suivre ce contenu" as data_onclick %}
+ {% endif %}
+ {% include "notification/follow_template.html" with link=link_follow is_followed=content_is_followed data_onclick=data_onclick button_text=button_text subscriber_count=subscriber_count %}
+ {% endwith %}
+
+
+
+ {% with content_is_followed=object|is_content_email_followed %}
+ {% url "content:follow-reactions" object.pk as link_follow %}
+ {% if content_is_followed %}
+ {% trans "Être notifié par courriel" as data_onclick %}
+ {% trans "Ne plus être notifié par courriel" as button_text %}
+ {% else %}
+ {% trans "Être notifié par courriel" as button_text %}
+ {% trans "Ne plus être notifié par courriel" as data_onclick %}
+ {% endif %}
+ {% include "notification/follow_by_email_template.html" with link=link_follow is_followed=content_is_followed data_onclick=data_onclick button_text=button_text %}
+ {% endwith %}
+
diff --git a/templates/tutorialv2/includes/sidebar/helps.part.html b/templates/tutorialv2/includes/sidebar/helps.part.html
new file mode 100644
index 0000000000..c70ad453de
--- /dev/null
+++ b/templates/tutorialv2/includes/sidebar/helps.part.html
@@ -0,0 +1,51 @@
+{% load i18n %}
+{% load captureas %}
+
+{% if can_edit and not content.is_opinion %}
+
+ Lorsque vous rédigez un tutoriel ou un article, il se peut que vous ayiez
+ besoin d'aide. La communauté est là pour vous ! En sélectionnant un des éléments
+ ci-dessous, votre contenu sera répertorié dans la page des aides
+ et la communauté pourra vous contacter.
+
+ {% endblocktrans %}
+
+
+ {# HELPS #}
+ {% for help in helps %}
+ {% captureas current_status %}
+ {% if help in content_helps %}true{% else %}false{% endif %}
+ {% endcaptureas %}
+ {% captureas desired_status %}
+ {% if help in content_helps %}false{% else %}true{% endif %}
+ {% endcaptureas %}
+ {% captureas classes_when_activated %}
+ {% if help in content_helps %}selected ico-after tick green{% endif %}
+ {% endcaptureas %}
+
+
+
+ {% endfor %}
+ {# END HELPS #}
+
+
+{% endif %}
diff --git a/templates/tutorialv2/includes/list_of_exports.html b/templates/tutorialv2/includes/sidebar/list_of_exports.html
similarity index 99%
rename from templates/tutorialv2/includes/list_of_exports.html
rename to templates/tutorialv2/includes/sidebar/list_of_exports.html
index 1cf63de476..cce3954fde 100644
--- a/templates/tutorialv2/includes/list_of_exports.html
+++ b/templates/tutorialv2/includes/sidebar/list_of_exports.html
@@ -1,4 +1,5 @@
{% load i18n %}
+
{% trans "Télécharger" %}
{% if public_object %}
diff --git a/templates/tutorialv2/includes/sidebar/public_actions.part.html b/templates/tutorialv2/includes/sidebar/public_actions.part.html
new file mode 100644
index 0000000000..695709f92e
--- /dev/null
+++ b/templates/tutorialv2/includes/sidebar/public_actions.part.html
@@ -0,0 +1,67 @@
+{% load i18n %}
+{% load captureas %}
+{% load crispy_forms_tags %}
+
+{% if public_actions.show_block %}
+
+
{% trans "Version publique" %}
+
+ {% if public_actions.show_public_page_message %}
+
+
+ {% trans "Vous êtes sur la page publique." %}
+
+
-
- {% include 'tutorialv2/includes/tags_authors.part.html' with online=False %}
-
- {% if content.is_beta %}
-
-
- {% blocktrans %}
- Cette version est en BÊTA !
- {% endblocktrans %}
+ {% include "tutorialv2/includes/headline/header.part.html" with show_thumbnail=False content=content title=container.title %}
- {% if beta_topic %}
- {% blocktrans with url=beta_topic.get_absolute_url %}
- Vous pouvez y réagir sur ce sujet.
- {% endblocktrans %}
- {% endif %}
-
-
+ {% if display_config.online_config.show_obsolescence_warning %}
+ {% include "tutorialv2/includes/headline/obsolescence_warning.part.html" with is_obsolete=is_obsolete %}
{% endif %}
- {% if content_helps %}
-
-
- {% if content.authors.count > 1 %}
- {% trans "Les auteurs de ce contenu recherchent" %}
- {% else %}
- {% trans "L’auteur de ce contenu recherche" %}
- {% endif %}
-
- {% for help in content_helps %}{% if not forloop.first %}{% if forloop.last %}{% trans ' et ' %}{% else %}{% trans ', ' %}{% endif %}{% endif %}un {{ help.title|lower }}{% if forloop.last %}{% trans '.' %}{% endif %}{% endfor %}
+ {% if display_config.info_config.show_beta_info %}
+ {% include "tutorialv2/includes/headline/beta_info.part.html" with beta_topic=beta_topic %}
+ {% endif %}
- {% if not can_edit %}
- {% blocktrans with plural=content.authors.count|pluralize_fr %}
- N’hésitez pas à le{{ plural }} contacter par MP pour proposer votre aide !
- {% endblocktrans %}
- {% endif %}
-
-
+ {% if display_config.info_config.show_help_info %}
+ {% include "tutorialv2/includes/headline/help_info.part.html" %}
{% endif %}
{% endblock %}
-
-
{% block content %}
- {% if not container.ready_to_publish %}
-
- {% trans "Cette partie n'est pas prête à la publication. En cas de validation, elle ne sera pas publiée." %}
-
- {% endif %}
- {% include "tutorialv2/includes/chapter_pager.part.html" with position="top" %}
-
- {% if container.introduction and container.get_introduction %}
- {{ container.get_introduction|emarkdown:is_js }}
- {% elif not content.is_beta %}
-
-
- {% trans "Il n’y a pas d’introduction." %}
- {% if can_add_something %}
- {% trans "Vous pouvez " %}{% trans "en ajouter une" %}.
- {% endif %}
-
-
- {% endif %}
-
- {% if container.has_extracts or container.can_add_extract %}
-
+ {% if not display_config.online_config.show_rendered_source %}
+ {% if display_config.draft_actions.show_ready_to_publish %}
+ {% if not container.ready_to_publish %}
+
+ {% trans "Cette partie n'est pas prête à la publication. En cas de validation, elle ne sera pas publiée." %}
+
{% endif %}
-
- {% endif %}
+ {% endif %}
- {% for child in container.children %}
- {% include "tutorialv2/includes/child.part.html" with child=child %}
- {% empty %}
- {% if not can_add_something or not container.is_chapter %}
+ {% include "tutorialv2/includes/chapter_pager.part.html" with position="top" %}
+
+ {% if container.introduction and container.get_introduction %}
+ {{ container.get_introduction|emarkdown:is_js }}
+ {% elif display_config.draft_actions.enable_edit %}
- {{ "Ce"|feminize:container.get_level_as_string }} {{ container.get_level_as_string|lower }} {% trans " est actuellement vide." %}
+ {% trans "Il n’y a pas d’introduction." %}
+ {% trans "Vous pouvez " %}{% trans "en ajouter une" %}.
- {% if container.can_add_extract and container.can_add_container and can_add_something %}
-
+ {% endif %}
+
+ {% endif %}
+
+ {% for child in container.children %}
+ {% include "tutorialv2/includes/child.part.html" with child=child %}
+ {% empty %}
+ {% if not display_config.draft_actions.enable_edit or not container.is_chapter %}
+
+
+ {{ "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 %}
+
- {% trans "Il n’y a pas de conclusion." %}
- {% if can_add_something %}
+ {% if container.conclusion and container.get_conclusion %}
+ {{ container.get_conclusion|emarkdown:is_js }}
+ {% elif display_config.online_config.enable_edit %}
+
+
+ {% trans "Il n’y a pas de conclusion." %}
{% trans "Vous pouvez " %}{% trans "en ajouter une" %}.
- {% endif %}
-
-
- {% endif %}
+
+
+ {% endif %}
- {% include "tutorialv2/includes/chapter_pager.part.html" with position="bottom" %}
+ {% include "tutorialv2/includes/chapter_pager.part.html" with position="bottom" %}
- {% if content.is_beta and container.has_extracts %}
- {% include "tutorialv2/includes/warn_typo.part.html" with content=content %}
- {% endif %}
-{% endblock %}
+ {% else %}
+ {% include "tutorialv2/includes/chapter_pager.part.html" with position="top" %}
+ {% if container.has_extracts %}
+ {{ container.get_content_online|safe }}
+ {% else %}
+ {% if container.introduction %}
+ {{ container.get_introduction_online|safe }}
+
+ {% endif %}
+ {% include "tutorialv2/includes/child_online.part.html" with child=container hide_title=True %}
-{% block sidebar_new %}
- {% if can_add_something %}
-
- {% trans "Éditer" %}
-
+
+
+ {% if container.conclusion %}
+ {{ container.get_conclusion_online|safe }}
+ {% endif %}
- {% if container.can_add_container %}
-
- {% trans "Ajouter " %} {{ "un"|feminize:container.get_next_level_as_string }} {{ container.get_next_level_as_string|lower }}
-
{% endif %}
- {% if container.can_add_extract %}
-
- {% trans "Ajouter une section" %}
-
- {% elif not version or version != content.sha_draft %}
-
- {% trans "Version brouillon" %}
-
- {% endif %}
+ {% include "tutorialv2/includes/chapter_pager.part.html" with position="bottom" %}
{% endif %}
-{% endblock %}
-
+ {% if display_config.info_config.show_warn_typo and container.has_extracts %}
+ {% include "tutorialv2/includes/content/warn_typo.part.html" with content=content %}
+ {% endif %}
+{% endblock %}
{% block sidebar_actions %}
- {% if can_add_something %}
+ {% if display_config.draft_actions.show_edit_content_link %}
+ {% endif %}
+ {% endif %}
+{% endblock %}
{% block sidebar_blocks %}
- {% include "tutorialv2/includes/summary.part.html" with current_container=container %}
+ {% include "tutorialv2/includes/sidebar/summary.part.html" with current_container=container %}
- {% if can_add_something %}
+ {% if display_config.draft_actions.show_deletion_link %}
{% trans "Suppression" %}
- {% include "tutorialv2/includes/delete.part.html" with object=container additional_classes="ico-after cross red" %}
+ {% include "tutorialv2/includes/sidebar/delete.part.html" with object=container additional_classes="ico-after cross red" %}
{% endif %}
+
+ {% if display_config.online_config.show_social_buttons %}
+ {% include "misc/social_buttons.part.html" with link=container.get_absolute_url_online text=container.title %}
+ {% endif %}
+{% endblock %}
+
+{% block sidebar_new %}
+ {% if display_config.draft_actions.show_draft_link %}
+
+ {% trans "Version brouillon" %}
+
+ {% endif %}
{% endblock %}
diff --git a/templates/tutorialv2/view/container_online.html b/templates/tutorialv2/view/container_online.html
deleted file mode 100644
index ab6ff983eb..0000000000
--- a/templates/tutorialv2/view/container_online.html
+++ /dev/null
@@ -1,135 +0,0 @@
-{% extends "tutorialv2/base_online.html" %}
-{% load set %}
-{% load thumbnail %}
-{% load emarkdown %}
-{% load i18n %}
-{% load times %}
-{% load crispy_forms_tags %}
-
-
-{% block title %}
- {{ container.title }} - {{ content.title }}
-{% endblock %}
-
-{% block description %}
- {% if content.description %}
- {{ content.description }}
- {% else %}
- Site et association de partage de connaissances animé par sa communauté. Vous y trouverez des tutoriels et des articles de tous niveaux et des forums.
- {% endif %}
-{% endblock %}
-
-{% block opengraph %}
- {% include "tutorialv2/includes/opengraph.part.html" %}
-{% endblock %}
-
-{% block meta_image %}{% spaceless %}
- {% include "tutorialv2/includes/image_illu.part.html" with content=content %}
-{% endspaceless %}{% endblock %}
-
-{% block breadcrumb %}
- {% if container.parent.parent %}
-
-
- {% include 'tutorialv2/includes/tags_authors.part.html' with content=content online=True is_part_or_chapter=True %}
-
- {% if is_obsolete %}
-
-
- {% blocktrans %}
- Ce contenu est obsolète. Il peut contenir des informations intéressantes mais soyez prudent avec celles-ci.
- {% endblocktrans %}
-
-
- {% endif %}
-{% endblock %}
-
-
-
-{% block content %}
- {% if content.is_tutorial %}
- {% include "tutorialv2/includes/chapter_pager.part.html" with position="top" online=True %}
- {% endif %}
- {% if container.has_extracts %}
- {{ container.get_content_online|safe }}
- {% else %}
-
- {% if container.introduction %}
- {{ container.get_introduction_online|safe }}
-
- {% endif %}
-
- {% include "tutorialv2/includes/child_online.part.html" with child=container hide_title=True %}
-
-
-
-
- {% if container.conclusion %}
- {{ container.get_conclusion_online|safe }}
- {% endif %}
-
- {% endif %}
- {% if content.is_tutorial %}
- {% include "tutorialv2/includes/chapter_pager.part.html" with position="bottom" online=True %}
- {% endif %}
-
- {% include "tutorialv2/includes/warn_typo.part.html" with content=content %}
-{% endblock %}
-
-{% block sidebar_actions %}
-
- {% if not user in content.authors.all and user.is_authenticated %}
-
+ {% include "tutorialv2/includes/headline/beta_info.part.html" with state=display_config.beta_info beta_topic=beta_topic %}
- {% if content.description %}
-
- {{ content.description }}
-
+ {% if display_config.info_config.show_help_info %}
+ {% include "tutorialv2/includes/headline/help_info.part.html" %}
{% endif %}
- {% if can_edit %}
- {% include 'tutorialv2/includes/tags_authors.part.html' with content=content add_author=True online=False %}
- {% else %}
- {% include 'tutorialv2/includes/tags_authors.part.html' with content=content online=False %}
+ {% if display_config.info_config.show_opinion_moderation_warning %}
+ {% include "tutorialv2/includes/headline/opinion_moderation_warning.part.html" %}
{% endif %}
- {% if is_staff or can_edit %}
- {% if content.in_validation %}
- {% if validation.version == content.current_version %}
- {% if validation.is_pending %}
-
- {% trans "Ce contenu est en attente d’un validateur." %}
-
- {% elif validation.is_pending_valid %}
-
- {% trans "Ce contenu est en cours de validation par" %}
- {% include "misc/member_item.part.html" with member=validation.validator %}
-
- {% endif %}
- {% if validation.comment_authors %}
-
-
- {% trans "Le message suivant a été laissé à destination des validateurs" %} :
-
- {% endif %}
- {% endif %}
- {% endif %}
+ {% if display_config.online_config.show_obsolescence_warning %}
+ {% include "tutorialv2/includes/headline/obsolescence_warning.part.html" with is_obsolete=is_obsolete %}
{% endif %}
- {% if content.is_beta %}
-
-
- {% blocktrans %}
- Cette version est en "BÊTA" !
- {% endblocktrans %}
-
- {% if beta_topic %}
- {% blocktrans with url=beta_topic.get_absolute_url %}
- Vous pouvez y réagir sur ce sujet.
- {% endblocktrans %}
- {% endif %}
-
+ {% if display_config.alerts_config.show_alerts %}
+
+ {% include "misc/alerts.part.html" with alerts=alerts alerts_solve_url='content:resolve-content' %}
-
- {% if content_helps %}
-
-
- {% if content.authors.count > 1 %}
- {% trans "Les auteurs de ce contenu recherchent" %}
- {% else %}
- {% trans "L’auteur de ce contenu recherche" %}
- {% endif %}
-
- {% for help in content_helps %}{% if not forloop.first %}{% if forloop.last %}{% trans ' et ' %}{% else %}{% trans ', ' %}{% endif %}{% endif %}un {{ help.title|lower }}{% if forloop.last %}{% trans '.' %}{% endif %}{% endfor %}
-
- {% if not can_edit %}
- {% blocktrans with plural=content.authors.count|pluralize_fr %}
- N’hésitez pas à le{{ plural }} contacter par MP pour proposer votre aide !
- {% endblocktrans %}
- {% endif %}
-
-
- {% endif %}
{% endif %}
- {% if not can_publish and content.is_opinion %}
-
-
- {% trans "Ce contenu a été modéré. Il ne peut pas faire l'objet d'une nouvelle publication." %}
-
-
+ {% if display_config.info_config.show_opinion_promotion %}
+ {% include "tutorialv2/includes/headline/opinion_promotion_info.part.html" with content=content is_staff=is_staff %}
{% endif %}
{% endblock %}
{% block content %}
- {% if content.introduction and content.get_introduction != "" %}
- {{ content.get_introduction|emarkdown:is_js }}
- {% elif not content.is_beta %}
-
-
- {% trans "Il n’y a pas d’introduction." %}
- {% if can_add_something %}
- {% trans "Vous pouvez " %}{% trans "en ajouter une" %}.
- {% endif %}
-
-
+ {% if display_config.online_config.show_content_pager %}
+ {% include "tutorialv2/includes/content/content_pager.part.html" with content=content %}
{% endif %}
- {% if content.has_extracts or content.can_add_extract %}
-
+ {% if display_config.online_config.show_rendered_source %}
+ {% include "tutorialv2/includes/content/online_content.part.html" %}
+ {% else %}
+ {% include "tutorialv2/includes/content/content.part.html" %}
{% endif %}
- {% for child in content.children %}
- {% include "tutorialv2/includes/child.part.html" with child=child %}
- {% empty %}
- {% if content.can_add_extract and content.can_add_container and can_add_something %}
-
-
- {% trans "Ce contenu est actuellement vide." %} {% trans "Vous pouvez :" %}
-
-
-
- {% trans "Ajouter une partie" %}
- {% trans " pour adopter le format big-tuto ou moyen-tuto. Vous pourrez y ajouter des chapitres ou des sections ;" %}
-
+ {% if display_config.online_config.show_follow_actions %}
+ {% include "tutorialv2/includes/sidebar/follow_links.part.html" %}
{% endif %}
- {# END AUTHORS #}
- {# CONTRIBUTORS #}
- {% if can_add_something and formAddReviewer %}
+
+ {% if display_config.online_config.show_propose_feature %}
-
- {% trans "Ajouter un contributeur" %}
-
- {% crispy formAddReviewer %}
+ {% url 'content:request-featured' object.pk as link_request %}
+ {% if is_requesting %}
+ {% trans "Proposer la mise en une" as data_onclick %}
+ {% trans "Ne plus proposer la mise en une" as button_text %}
+ {% else %}
+ {% trans "Proposer la mise en une" as button_text %}
+ {% trans "Ne plus proposer la mise en une" as data_onclick %}
+ {% endif %}
+ {% include "featured/includes/featured_request.part.html" with link=link_request is_requesting=is_requesting data_onclick=data_onclick button_text=button_text featured_request_count=featured_request_count %}
+ {% endif %}
+
+ {% if display_config.online_config.show_contact_authors %}
- {% include "tutorialv2/includes/exports.part.html" %}
-
- {% endif %}
- {# END ONLINE VERSION #}
-
- {% if content.sha_public %}
- {# interpreted as: (version and (content.sha_public != version)) or ((not version) and (content.sha_public != content.sha_draft)) #}
- {% if version and content.sha_public != version or not version and content.sha_public != content.sha_draft %}
-
-
- {% trans "Comparer avec la version en ligne (identique)" %}
-
-
- {% endif %}
- {% endif %}
-
- {% if content.sha_beta %}
- {# interpreted as: (version and (content.sha_beta != version)) or ((not version) and (content.sha_beta != content.sha_draft)) #}
- {% if version and content.sha_beta != version or not version and content.sha_beta != content.sha_draft %}
-
-
- {% trans "Comparer avec la bêta (identique)" %}
-
-
- {% endif %}
- {% endif %}
-
- {% if content.in_validation %}
- {# interpreted as: (version and (validation.version != version)) or ((not version) and (validation.version != content.sha_draft)) #}
- {% if version and validation.version != version or not version and validation.version != content.sha_draft %}
-
+ {% include "tutorialv2/includes/sidebar/public_actions.part.html" with public_actions=display_config.public_actions %}
+
+ {% include "tutorialv2/includes/sidebar/administration_actions.part.html" with administration_actions=display_config.administration_actions %}
+
+ {% include "tutorialv2/includes/sidebar/beta_actions.part.html" with beta_actions=display_config.beta_actions %}
+
+ {% include "tutorialv2/includes/sidebar/validation.part.html" %}
+
+ {% if display_config.draft_actions.show_helps %}
+ {% include "tutorialv2/includes/sidebar/helps.part.html" %}
{% endif %}
- {% if is_staff or can_edit %}
-
- {% include "tutorialv2/includes/editorialization.part.html" %}
-
+ {% include "tutorialv2/includes/sidebar/editorialization.part.html" %}
+
+ {% if display_config.draft_actions.show_deletion_link %}
+ {% include "tutorialv2/includes/sidebar/delete_content.part.html" %}
{% endif %}
- {% if can_edit and not content.is_opinion %}
-
- Lorsque vous rédigez un tutoriel ou un article, il se peut que vous ayiez
- besoin d'aide. La communauté est là pour vous ! En sélectionnant un des éléments
- ci-dessous, votre contenu sera répertorié dans la page des aides
- et la communauté pourra vous contacter.
-
- {% endblocktrans %}
-
-
- {# HELPS #}
- {% for help in helps %}
- {% captureas current_status %}
- {% if help in content_helps %}true{% else %}false{% endif %}
- {% endcaptureas %}
- {% captureas desired_status %}
- {% if help in content_helps %}false{% else %}true{% endif %}
- {% endcaptureas %}
- {% captureas classes_when_activated %}
- {% if help in content_helps %}selected ico-after tick green{% endif %}
- {% endcaptureas %}
-
-
-
- {% endfor %}
- {# END HELPS #}
-
+ {% include "tutorialv2/includes/sidebar/summary.part.html" %}
+
+ {% if display_config.online_config.show_social_buttons %}
+ {% include "misc/social_buttons.part.html" with link=content.get_absolute_url_online text=content.title %}
+ {% endif %}
+
+ {% if display_config.online_config.show_exports %}
+
+ {% if not public_object or public_object.is_exported %}
+ {% include "tutorialv2/includes/sidebar/list_of_exports.html" %}
+ {% endif %}
{% endif %}
- {% include "tutorialv2/includes/summary.part.html" %}
-
- {% if can_edit %}
- {% if not version or content.sha_draft == version %}
-
-
{% trans "Suppression" %}
-
- {% if not content.in_public %}
-
-
- {% trans "Supprimer le contenu" %}
-
- {% captureas need_reason %}{% if validation and validation.status == 'PENDING_V' %}True{% endif %}{% endcaptureas %}
-
-
- {% else %}
-
-
- {% trans "Impossible, car publié" %}
-
-
- {% endif %}
-
-
- {% endif %}
+{% endblock %}
+
+
+
+{% block content_after %}
+ {% if display_config.online_config.show_suggestions %}
+ {% include "tutorialv2/includes/content_suggestion.part.html" with content=content content_suggestions=content_suggestions_random %}
+ {% endif %}
+
+ {% if display_config.online_config.show_comments %}
+ {% include "tutorialv2/includes/comments.part.html" with content=content reactions=reactions %}
{% endif %}
{% endblock %}
diff --git a/templates/tutorialv2/view/content_online.html b/templates/tutorialv2/view/content_online.html
deleted file mode 100644
index a5175aeb6b..0000000000
--- a/templates/tutorialv2/view/content_online.html
+++ /dev/null
@@ -1,435 +0,0 @@
-{% extends "tutorialv2/base_online.html" %}
-{% load emarkdown %}
-{% load profile %}
-{% load date %}
-{% load captureas %}
-{% load set %}
-{% load thumbnail %}
-{% load i18n %}
-{% load crispy_forms_tags %}
-{% load interventions %}
-{% load pluralize_fr %}
-{% load displayable_authors %}
-{% load joinby %}
-
-
-{% block title %}
- {{ content.title }}
-{% endblock %}
-
-{% block DCMI_cards %}
-
-
- {% for author in publishablecontent|displayable_authors:True %}
-
- {% endfor %}
-
-
-
-
- {% if content.meta_description %}{% endif %}
-
-
- {% if content.source %}{% endif %}
-
-
-{% endblock %}
-
-{% block description %}
- {% if content.description %}
- {{ content.description }}
- {% else %}
- Site et association de partage de connaissances animé par sa communauté. Vous y trouverez des tutoriels et des articles de tous niveaux et des forums.
- {% endif %}
-{% endblock %}
-
-
-
-{% block meta_image %}{% spaceless %}
- {% include "tutorialv2/includes/image_illu.part.html" with content=content %}
-{% endspaceless %}{% endblock %}
-
-
-{% block head_extra %}
- {{ block.super }}
- {% if content.converted_to.get_absolute_url_online %}
-
- {% endif %}
-{% endblock %}
-
-
-{% block opengraph %}
- {% include "tutorialv2/includes/opengraph.part.html" %}
-{% endblock %}
-
-
-
-{% block breadcrumb %}
-
- {% endif %}
-
- {% include 'tutorialv2/includes/tags_authors.part.html' with content=content online=True %}
-
- {% if is_obsolete %}
-
-
- {% blocktrans %}
- Ce contenu est obsolète. Il peut contenir des informations intéressantes mais soyez prudent avec celles-ci.
- {% endblocktrans %}
-
- {% include "misc/alerts.part.html" with alerts=alerts alerts_solve_url='content:resolve-content' %}
-
- {% endif %}
-
- {% if content.is_opinion %}
- {% if content.converted_to %}
- {% if content.converted_to.get_absolute_url_online %}
-
- {% blocktrans with url_article=content.converted_to.get_absolute_url_online %}
- Ce billet a été promu en article.
- {% endblocktrans %}
-
- {% elif is_staff %}
-
- {% blocktrans with url_article=content.converted_to.get_absolute_url %}
- Ce billet a fait l’objet d’une demande de publication en tant qu’article. Il est donc présent dans la zone de validation en attente de prise en charge par un validateur.
- {% endblocktrans %}
-
- {% endif %}
- {% endif %}
- {% endif %}
-
- {% captureas content_pager %}
- {% include "tutorialv2/includes/content_pager.part.html" with content=content %}
- {% endcaptureas %}
-
- {{ content_pager }}
-
- {% if content.has_extracts %}
- {{ content.get_content_online|safe }}
- {% else %}
- {% if content.introduction %}
- {{ content.get_introduction_online|default:""|safe }}
- {% endif %}
-
- {% if not content.has_sub_containers %}
-
- {% endif %}
-
- {% for child in content.children %}
- {% include "tutorialv2/includes/child_online.part.html" with child=child %}
- {% endfor %}
-
- {% if not content.has_sub_containers %}
-
- {% endif %}
-
-
-
-
- {% if content.conclusion %}
- {{ content.get_conclusion_online|default:""|safe }}
- {% endif %}
-
- {% endif %}
- {{ content_pager }}
- {% include "tutorialv2/includes/alert.html" with content=content current_content_type=current_content_type %}
- {% include "tutorialv2/includes/warn_typo.part.html" with content=content %}
-
-{% endblock %}
-
-{% block sidebar_actions %}
- {% if user.is_authenticated %}
-
- {% with content_is_followed=object|is_content_followed %}
- {% url 'content:follow-reactions' object.pk as link_follow %}
- {% if content_is_followed %}
- {% trans "Suivre ce contenu" as data_onclick %}
- {% trans "Ne plus suivre ce contenu" as button_text %}
- {% else %}
- {% trans "Suivre ce contenu" as button_text %}
- {% trans "Ne plus suivre ce contenu" as data_onclick %}
- {% endif %}
- {% include 'notification/follow_template.html' with link=link_follow is_followed=content_is_followed data_onclick=data_onclick button_text=button_text subscriber_count=subscriber_count %}
- {% endwith %}
-
-
- {% with content_is_followed=object|is_content_email_followed %}
- {% url 'content:follow-reactions' object.pk as link_follow %}
- {% if content_is_followed %}
- {% trans "Être notifié par courriel" as data_onclick %}
- {% trans "Ne plus être notifié par courriel" as button_text %}
- {% else %}
- {% trans "Être notifié par courriel" as button_text %}
- {% trans "Ne plus être notifié par courriel" as data_onclick %}
- {% endif %}
- {% include 'notification/follow_by_email_template.html' with link=link_follow is_followed=content_is_followed data_onclick=data_onclick button_text=button_text %}
- {% endwith %}
-
-
- {% url 'content:request-featured' object.pk as link_request %}
- {% if is_requesting %}
- {% trans "Proposer la mise en une" as data_onclick %}
- {% trans "Ne plus proposer la mise en une" as button_text %}
- {% else %}
- {% trans "Proposer la mise en une" as button_text %}
- {% trans "Ne plus proposer la mise en une" as data_onclick %}
- {% endif %}
- {% include 'featured/includes/featured_request.part.html' with link=link_request is_requesting=is_requesting data_onclick=data_onclick button_text=button_text featured_request_count=featured_request_count %}
-
-
{% trans "Le message suivant a été laissé à destination des validateurs" %} :
+ +