diff --git a/templates/base.html b/templates/base.html index 2759a79caa..670922f3c1 100644 --- a/templates/base.html +++ b/templates/base.html @@ -82,11 +82,8 @@ - - {# DCMI cards #} {% block DCMI_cards %}{% endblock %} - {# Stylesheets #} - - {% csrf_token %} +
+ + {% csrf_token %} - -
-{% endif %} + + diff --git a/templates/tutorialv2/base.html b/templates/tutorialv2/base.html index 365b0b4b7f..429239775e 100644 --- a/templates/tutorialv2/base.html +++ b/templates/tutorialv2/base.html @@ -83,14 +83,5 @@

{% trans "Actions" %}

{% endif %} {% block sidebar_blocks %}{% endblock %} - {% if content %} - {% if content.is_public or content.in_beta or can_edit or is_staff %} - - {% endif %} - {% endif %} {% endblock %} diff --git a/templates/tutorialv2/events/descriptions.part.html b/templates/tutorialv2/events/descriptions.part.html index e28e2c5463..6153dd84ff 100644 --- a/templates/tutorialv2/events/descriptions.part.html +++ b/templates/tutorialv2/events/descriptions.part.html @@ -26,7 +26,7 @@ {% elif event.type == "beta_management" %} - {% captureas version_href %}{% url "content:view" event.content.pk event.content.slug %}?version={{ event.version }}{% endcaptureas %} + {% url "content:view-version" pk=event.content.pk slug=event.content.slug version=event.version as version_href %} {% if event.action == "activate" %} {{ event.performer }} a mis une version du contenu en bêta. {% elif event.action == "deactivate" %} @@ -37,7 +37,7 @@ {% elif event.type == "validation_management" %} - {% captureas version_href %}{% url "content:view" event.content.pk event.content.slug %}?version={{ event.version }}{% endcaptureas %} + {% url "content:view-version" pk=event.content.pk slug=event.content.slug version=event.version as version_href %} {% if event.action == "request" %} {{ event.performer }} a demandé la validation d'une version du contenu. {% elif event.action == "cancel" %} diff --git a/templates/tutorialv2/events/list.html b/templates/tutorialv2/events/list.html index 13ebfeb6d5..1239b967e5 100644 --- a/templates/tutorialv2/events/list.html +++ b/templates/tutorialv2/events/list.html @@ -21,12 +21,6 @@ {% block headline %} - {% if content.licence %} -

- {{ content.licence }} -

- {% endif %} -

{% if content.image %} @@ -41,8 +35,6 @@

{{ content.description }}

{% endif %} - - {% include 'tutorialv2/includes/tags_authors.part.html' with content=content online=False %} {% endblock %} diff --git a/templates/tutorialv2/includes/chapter_pager.part.html b/templates/tutorialv2/includes/chapter_pager.part.html index c7a155a2ae..2ae28d516f 100644 --- a/templates/tutorialv2/includes/chapter_pager.part.html +++ b/templates/tutorialv2/includes/chapter_pager.part.html @@ -1,59 +1,27 @@ {% load i18n %} -{% if has_pagination %} - +{% if pager.has_pagination %} - {% endif %} diff --git a/templates/tutorialv2/includes/child.part.html b/templates/tutorialv2/includes/child.part.html index 44727bed6e..293ffb2225 100644 --- a/templates/tutorialv2/includes/child.part.html +++ b/templates/tutorialv2/includes/child.part.html @@ -3,26 +3,15 @@ {% load times %} {% load target_tree %} {% load feminize %} +{% load captureas %}

- - {{ child.title }} - + {{ child.title }} - {% if can_add_something %} + {% if display_config.draft_actions.enable_edit %}
{% trans "Éditer" %} @@ -67,7 +56,8 @@ {% trans "Déplacer" %} - {% include "tutorialv2/includes/delete.part.html" with object=child additional_classes="ico-after cross btn btn-grey" %} + + {% include "tutorialv2/includes/sidebar/delete.part.html" with object=child additional_classes="ico-after cross btn btn-grey" %}
{% endif %}

@@ -77,7 +67,7 @@ {% if child.get_text.strip|length == 0 %}

- {% trans "Cette section est actuellement vide." %} + {% trans "Cette section est vide." %}

{% else %} @@ -92,16 +82,12 @@
    {% for extract in child.children %}
  1. - {{ extract.title }} + + {{ extract.title }} +
  2. {% endfor %} - {% if can_add_something and child.can_add_extract %} + {% if display_config.draft_actions.enable_edit and child.can_add_extract %}
  3. - {{ subchild.title }} + {{ subchild.title }}

      {% for extract in subchild.children %}
    1. - {{ extract.title }} + + {{ extract.title }} +

    2. {% endfor %} - {% if can_add_something %} + {% if display_config.draft_actions.enable_edit %}
  4. {% endfor %} - {% if can_add_something and child.can_add_container %} + {% if display_config.draft_actions.enable_edit and child.can_add_container %}
  5. {% endif %}

{% else %} - {% if not can_add_something or not child.is_chapter %} -
-

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

- {% if can_add_something and not child.is_chapter %} -
+ {% endif %} -
- {% elif can_add_something and child.can_add_extract and child.is_chapter %} -
    -
  1. - - {% trans "Ajouter une section" %} - -
  2. -
{% endif %} {% endif %} {% endif %} diff --git a/templates/tutorialv2/includes/child_online.part.html b/templates/tutorialv2/includes/child_online.part.html index c20dee9582..55af486ce7 100644 --- a/templates/tutorialv2/includes/child_online.part.html +++ b/templates/tutorialv2/includes/child_online.part.html @@ -20,7 +20,7 @@

{# child is an extract #} {% if child.get_text.strip|length == 0 %}

- {% trans "Cette section est actuellement vide." %} + {% trans "Cette section est vide." %}

{% else %}
diff --git a/templates/tutorialv2/includes/comments.part.html b/templates/tutorialv2/includes/comments.part.html new file mode 100644 index 0000000000..07ba7b40db --- /dev/null +++ b/templates/tutorialv2/includes/comments.part.html @@ -0,0 +1,78 @@ +{% load i18n %} +{% load pluralize_fr %} +{% load captureas %} +{% load set %} + +

+ {% if content.get_note_count > 0 %} + + {{ content.get_note_count }} + + {% trans "commentaire" %}{{ content.get_note_count|pluralize_fr }} + {% else %} + {% trans "Aucun commentaire" %} + {% endif %} +

+ + +{% include "misc/paginator.html" with position="top" topic=content is_online=True anchor="comments" %} + +{% for message in reactions %} + + {% captureas edit_link %} + {% url "content:update-reaction" %}?message={{ message.pk }}&pk={{ content.pk }} + {% endcaptureas %} + + {% captureas cite_link %} + {% url "content:add-reaction" %}?cite={{ message.pk }}&pk={{ content.pk }} + {% endcaptureas %} + + {% captureas karma_link %} + {% url "api:content:reaction-karma" message.pk %} + {% endcaptureas %} + + {% captureas alerts_solve_link %} + {% url "content:resolve-reaction" %} + {% endcaptureas %} + {% captureas alert_link %} + {% url "content:alert-reaction" message.pk %} + {% endcaptureas %} + {% captureas hide_link %} + {% url "content:hide-reaction" message.pk%} + {% endcaptureas %} + + {% captureas show_link %} + {% url "content:show-reaction" message.pk %} + {% endcaptureas %} + + {% if forloop.first and page_obj.number > 1 %} + {% set True as is_repeated_message %} + {% else %} + {% set False as is_repeated_message %} + {% endif %} + + {% if user == message.author or perms.tutorialv2.change_contentreaction %} + {% set True as can_view_history %} + {% else %} + {% set False as can_view_history %} + {% endif %} + + {% include "misc/message.part.html" with perms_change=perms.tutorialv2.change_contentreaction topic=object %} +{% endfor %} + + +{% include "misc/paginator.html" with position="bottom" topic=content is_online=True anchor="comments" %} + + + +{% captureas form_action %} + {% url 'content:add-reaction' %}?pk={{ content.pk }} +{% endcaptureas %} + +{% if object.last_note %} + {% captureas last_note_pk %} + {{ object.last_note.pk }} + {% endcaptureas %} +{% endif %} + +{% include "misc/message_form.html" with member=user topic=content is_antispam=is_antispam %} diff --git a/templates/tutorialv2/includes/content/content.part.html b/templates/tutorialv2/includes/content/content.part.html new file mode 100644 index 0000000000..8a491d6ee8 --- /dev/null +++ b/templates/tutorialv2/includes/content/content.part.html @@ -0,0 +1,110 @@ +{% load i18n %} +{% load emarkdown %} + +{% if content.introduction and content.get_introduction != "" %} + {{ content.get_introduction|emarkdown:is_js }} +{% elif display_config.draft_actions.show_empty_section_warnings %} +
+

+ {% trans "Il n’y a pas d’introduction." %} + {% trans "Vous pouvez " %}{% trans "en ajouter une" %}. +

+
+{% endif %} + +{% if content.has_extracts or content.can_add_extract %} + +{% 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 :" %} +

+ +
+ {% elif not display_config.draft_actions.enable_edit or not content.can_add_extract and not content.can_add_container %} +
+

+ {% trans "Ce contenu est vide." %} +

+
+ {% endif %} +{% endfor %} + +{% if display_config.draft_actions.enable_edit %} + {% if content.can_add_container and not content.can_add_extract %} +

+ {% url "content:create-container" content.pk content.slug as create_container_url %} + + {% trans "Ajouter une nouvelle partie" %} + + +

+ {% endif %} + + {% if not content.can_add_container and content.can_add_extract %} +

+ {% url "content:create-extract" content.pk content.slug as create_extract_url %} + + {% trans "Ajouter une section" %} + + +

+
+

{% trans "Cliquer sur ajouter pour rédiger une nouvelle section." %}

+
+ {% endif %} +{% endif %} + + +
+
+ +{% if content.conclusion and content.get_conclusion != "" %} + {{ content.get_conclusion|emarkdown:is_js }} +{% elif display_config.draft_actions.show_empty_section_warnings %} +
+

+ {% 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 %}
{% endif %} diff --git a/templates/tutorialv2/includes/editorialization.part.html b/templates/tutorialv2/includes/editorialization.part.html deleted file mode 100644 index c3636daa84..0000000000 --- a/templates/tutorialv2/includes/editorialization.part.html +++ /dev/null @@ -1,58 +0,0 @@ -{% load i18n %} -{% load crispy_forms_tags %} - -

Éditorialisation

- diff --git a/templates/tutorialv2/includes/headline/authors.part.html b/templates/tutorialv2/includes/headline/authors.part.html new file mode 100644 index 0000000000..14040552e3 --- /dev/null +++ b/templates/tutorialv2/includes/headline/authors.part.html @@ -0,0 +1,31 @@ +{% load i18n %} +{% load pluralize_fr %} +{% load displayable_authors %} + +
+ + {% trans "Auteur" %}{{ db_content|displayable_authors:online_mode|pluralize }} : + + +
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 %} +
+
+{% endif %} diff --git a/templates/tutorialv2/includes/headline/categories.part.html b/templates/tutorialv2/includes/headline/categories.part.html new file mode 100644 index 0000000000..b8bd6e7cb4 --- /dev/null +++ b/templates/tutorialv2/includes/headline/categories.part.html @@ -0,0 +1,15 @@ +{% load i18n %} +{% load pluralize_fr %} + +

+ {% 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 %} + {{ category.title }} + {% else %} + {{ category.title }} + {% endif %} + {% endfor %} +

diff --git a/templates/tutorialv2/includes/headline/contributions.part.html b/templates/tutorialv2/includes/headline/contributions.part.html new file mode 100644 index 0000000000..e81e93a469 --- /dev/null +++ b/templates/tutorialv2/includes/headline/contributions.part.html @@ -0,0 +1,21 @@ +{% load i18n %} +{% load pluralize_fr %} + +{% with count_contributions=contributions|length %} + {% if count_contributions > 0 %} +

+ {% trans "Ce contenu a bénéficié des apports de" %} + {{ count_contributions }} {% trans "contributeur" %}{{ count_contributions|pluralize }} + +

+

+ {% endif %} +{% endwith %} diff --git a/templates/tutorialv2/includes/goals.part.html b/templates/tutorialv2/includes/headline/goals.part.html similarity index 100% rename from templates/tutorialv2/includes/goals.part.html rename to templates/tutorialv2/includes/headline/goals.part.html diff --git a/templates/tutorialv2/includes/headline/header.part.html b/templates/tutorialv2/includes/headline/header.part.html new file mode 100644 index 0000000000..4572ce4cd7 --- /dev/null +++ b/templates/tutorialv2/includes/headline/header.part.html @@ -0,0 +1,33 @@ +{% include "tutorialv2/includes/headline/licence.part.html" with licence=content.licence show_form=display_config.draft_actions.show_license_edit form=form_edit_license %} + +

+ {% if show_thumbnail and content.image %} + + {% endif %} + {{ title }} +

+ +{% if subtitle %} +

+ {{ subtitle }} +

+{% endif %} + + diff --git a/templates/tutorialv2/includes/headline/help_info.part.html b/templates/tutorialv2/includes/headline/help_info.part.html new file mode 100644 index 0000000000..49ae4cfa80 --- /dev/null +++ b/templates/tutorialv2/includes/headline/help_info.part.html @@ -0,0 +1,22 @@ +{% load i18n %} +{% load pluralize_fr %} + +{% 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 %} 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 %} +
+

{{ licence }}

+ + {% trans "Modifier la licence" %} + +
+ {% else %} +

+ Choisissez la licence de votre publication ! +

+ {% endif %} + + {% crispy form %} +{% elif licence %} + {{ licence }} +{% endif %} diff --git a/templates/tutorialv2/includes/headline/obsolescence_warning.part.html b/templates/tutorialv2/includes/headline/obsolescence_warning.part.html new file mode 100644 index 0000000000..26ed1623bc --- /dev/null +++ b/templates/tutorialv2/includes/headline/obsolescence_warning.part.html @@ -0,0 +1,11 @@ +{% load i18n %} + +{% if is_obsolete %} +
+
+ {% blocktrans %} + Ce contenu est obsolète. Il peut contenir des informations intéressantes mais soyez prudent avec celles-ci. + {% endblocktrans %} +
+
+{% endif %} diff --git a/templates/tutorialv2/includes/headline/opinion_moderation_warning.part.html b/templates/tutorialv2/includes/headline/opinion_moderation_warning.part.html new file mode 100644 index 0000000000..f083aed9a2 --- /dev/null +++ b/templates/tutorialv2/includes/headline/opinion_moderation_warning.part.html @@ -0,0 +1,7 @@ +{% load i18n %} + +
+
+ {% 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/headline/tags.part.html b/templates/tutorialv2/includes/headline/tags.part.html new file mode 100644 index 0000000000..ce88293c26 --- /dev/null +++ b/templates/tutorialv2/includes/headline/tags.part.html @@ -0,0 +1,17 @@ +{% load captureas %} + +{% captureas tag_list_url %} + {% if content.is_opinion %} + {% url 'opinion:list' %} + {% else %} + {% url 'publication:list' %} + {% endif %} +{% endcaptureas %} + +{% if db_content.tags.all|length > 0 %} + +{% endif %} diff --git a/templates/tutorialv2/includes/headline/update_date.part.html b/templates/tutorialv2/includes/headline/update_date.part.html new file mode 100644 index 0000000000..e30f5c9572 --- /dev/null +++ b/templates/tutorialv2/includes/headline/update_date.part.html @@ -0,0 +1,25 @@ +{% load set %} +{% load i18n %} +{% load date %} + +{% if online_mode %} + {% set public_object.last_publication_date as update_date %} +{% else %} + {% set content.update_date as update_date %} +{% endif %} + +{% if update_date %} +

+ {% if online_mode and update_date == public_object.publication_date %} + {% trans "Publié" %} + + {% else %} + {% trans "Dernière mise à jour" %} + + {% endif %} +

+{% endif %} diff --git a/templates/tutorialv2/includes/headline/validation_info.part.html b/templates/tutorialv2/includes/headline/validation_info.part.html new file mode 100644 index 0000000000..4e36ee7447 --- /dev/null +++ b/templates/tutorialv2/includes/headline/validation_info.part.html @@ -0,0 +1,46 @@ +{% load i18n %} +{% load emarkdown %} +{% load captureas %} + +{% captureas validation_comment_from_authors %} + {% if validation.comment_authors %} +
+

{% trans "Le message suivant a été laissé à destination des validateurs" %} :

+
{{ validation.comment_authors|emarkdown }}
+
+ {% endif %} +{% endcaptureas %} + +{% if state.current_version_and_reserved %} +

+ {% trans "Cette version est en cours de validation par" %} + {% include "misc/member_item.part.html" with member=validation.validator %}. +

+ {{ validation_comment_from_authors }} +{% endif %} + +{% if state.current_version_and_waiting_validator %} +

{% trans "Cette version est en attente d’un validateur." %}

+ {{ validation_comment_from_authors }} +{% endif %} + +{% url "content:view-version" pk=content.pk slug=content.slug version=content.sha_validation as validation_version_url %} + +{% if state.other_version_and_reserved %} +

+ + {% trans "Une autre version de cette publication" %} + + {% trans "est en cours de validation par" %} + {% include "misc/member_item.part.html" with member=validation.validator %}. +

+{% endif %} + +{% if state.other_version_and_waiting_validator %} +

+ + {% trans "Une autre version de cette publication" %} + + {% trans "est en attente d’un validateur." %} +

+{% endif %} diff --git a/templates/tutorialv2/includes/meta/dcmi_cards.part.html b/templates/tutorialv2/includes/meta/dcmi_cards.part.html new file mode 100644 index 0000000000..d32427b56b --- /dev/null +++ b/templates/tutorialv2/includes/meta/dcmi_cards.part.html @@ -0,0 +1,18 @@ +{% load displayable_authors %} +{% load joinby %} + + + +{% for author in db_content|displayable_authors:is_online %} + +{% endfor %} + + + + +{% if content.meta_description %}{% endif %} + + +{% if content.source %}{% endif %} + + diff --git a/templates/tutorialv2/includes/image_illu.part.html b/templates/tutorialv2/includes/meta/image_illu.part.html similarity index 100% rename from templates/tutorialv2/includes/image_illu.part.html rename to templates/tutorialv2/includes/meta/image_illu.part.html diff --git a/templates/tutorialv2/includes/opengraph.part.html b/templates/tutorialv2/includes/meta/opengraph.part.html similarity index 100% rename from templates/tutorialv2/includes/opengraph.part.html rename to templates/tutorialv2/includes/meta/opengraph.part.html diff --git a/templates/tutorialv2/includes/sidebar/administration_actions.part.html b/templates/tutorialv2/includes/sidebar/administration_actions.part.html new file mode 100644 index 0000000000..2ae5450331 --- /dev/null +++ b/templates/tutorialv2/includes/sidebar/administration_actions.part.html @@ -0,0 +1,71 @@ +{% load i18n %} +{% load captureas %} +{% load crispy_forms_tags %} + +{% if administration_actions.show_block %} + +{% endif %} diff --git a/templates/tutorialv2/includes/sidebar/authors_management.part.html b/templates/tutorialv2/includes/sidebar/authors_management.part.html new file mode 100644 index 0000000000..32154d3345 --- /dev/null +++ b/templates/tutorialv2/includes/sidebar/authors_management.part.html @@ -0,0 +1,42 @@ +{% load i18n %} + + +
  • + {% trans "Ajouter un auteur" %} + {% url "content:add-author" content.pk as add_author_url %} + +
  • + +
  • + {% trans "Gérer les auteurs" %} + {% url "content:remove-author" content.pk as remove_author_url %} + +
  • diff --git a/templates/tutorialv2/includes/sidebar/beta_actions.part.html b/templates/tutorialv2/includes/sidebar/beta_actions.part.html new file mode 100644 index 0000000000..6c89299747 --- /dev/null +++ b/templates/tutorialv2/includes/sidebar/beta_actions.part.html @@ -0,0 +1,100 @@ +{% load i18n %} +{% load captureas %} + + +{% url "content:set-beta" content.pk content.slug as set_beta_url %} + + +{% captureas version %} + {% if version %}{{ version }}{% else %}{{ content.sha_draft }}{% endif %} +{% endcaptureas %} + + +{% if beta_actions.show_block %} + +{% endif %} diff --git a/templates/tutorialv2/includes/sidebar/contributors_management.part.html b/templates/tutorialv2/includes/sidebar/contributors_management.part.html new file mode 100644 index 0000000000..27aa45ca3d --- /dev/null +++ b/templates/tutorialv2/includes/sidebar/contributors_management.part.html @@ -0,0 +1,39 @@ +{% load i18n %} +{% load crispy_forms_tags %} + +
  • + {% trans "Ajouter un contributeur" %} + {% crispy form_add_contributor %} +
  • + +
  • + {% trans "Gérer les contributeurs" %} + {% url "content:remove-contributor" content.pk as delete_contributor_url %} + +
  • diff --git a/templates/tutorialv2/includes/delete.part.html b/templates/tutorialv2/includes/sidebar/delete.part.html similarity index 100% rename from templates/tutorialv2/includes/delete.part.html rename to templates/tutorialv2/includes/sidebar/delete.part.html diff --git a/templates/tutorialv2/includes/sidebar/delete_content.part.html b/templates/tutorialv2/includes/sidebar/delete_content.part.html new file mode 100644 index 0000000000..fa11b0e978 --- /dev/null +++ b/templates/tutorialv2/includes/sidebar/delete_content.part.html @@ -0,0 +1,45 @@ +{% load i18n %} +{% load crispy_forms_tags %} +{% load captureas %} + + + diff --git a/templates/tutorialv2/includes/sidebar/editorialization.part.html b/templates/tutorialv2/includes/sidebar/editorialization.part.html new file mode 100644 index 0000000000..d5a5dd5991 --- /dev/null +++ b/templates/tutorialv2/includes/sidebar/editorialization.part.html @@ -0,0 +1,86 @@ +{% load i18n %} +{% load crispy_forms_tags %} + +{% if display_config.enable_editorialization %} + +{% 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 %} +
    +

    + {% trans "Demander de l'aide" %} + ? +

    + + +
    +{% 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" %}