-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactorise les templates des publications
* mise à jour de l'organisation des différentes actions possibles * fusion des variantes en ligne et pas en ligne * configuration définie dans la vue pour adapter l'affichage * vues bien séparées pour bêta, brouillon, en ligne * nouvelle vue spécifique pour voir une version par son commit
- Loading branch information
Showing
83 changed files
with
3,036 additions
and
2,796 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,11 @@ | ||
{% if show_featured_requested %} | ||
<form action="{{ link }}" method="post"> | ||
<input type="hidden" name="request_featured" value="1"> | ||
{% csrf_token %} | ||
<form action="{{ link }}" method="post"> | ||
<input type="hidden" name="request_featured" value="1"> | ||
{% csrf_token %} | ||
|
||
<button | ||
class="requesting ico-after star {% if is_requesting %}yellow{% else %}blue{% endif %}" | ||
type="submit" data-ajax-input="request-featured"> | ||
<span id="request_text" data-content-on-click="{{ data_onclick }}">{{ button_text }}</span> | ||
{% include 'featured/includes/featured_request_count.part.html' with featured_request_count=featured_request_count %} | ||
</button> | ||
</form> | ||
{% endif %} | ||
<button | ||
class="requesting ico-after star {% if is_requesting %}yellow{% else %}blue{% endif %}" | ||
type="submit" data-ajax-input="request-featured"> | ||
<span id="request_text" data-content-on-click="{{ data_onclick }}">{{ button_text }}</span> | ||
{% include 'featured/includes/featured_request_count.part.html' with featured_request_count=featured_request_count %} | ||
</button> | ||
</form> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
{% load i18n %} | ||
{% load pluralize_fr %} | ||
{% load captureas %} | ||
{% load set %} | ||
|
||
<h3 class="comments-title" id="comments"> | ||
{% if content.get_note_count > 0 %} | ||
<span itemprop="commentCount"> | ||
{{ content.get_note_count }} | ||
</span> | ||
{% trans "commentaire" %}{{ content.get_note_count|pluralize_fr }} | ||
{% else %} | ||
{% trans "Aucun commentaire" %} | ||
{% endif %} | ||
</h3> | ||
|
||
|
||
{% 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 %} |
112 changes: 112 additions & 0 deletions
112
templates/tutorialv2/includes/content/content.part.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
{% 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 %} | ||
<div class="ico-after warning"> | ||
<p> | ||
{% trans "Il n’y a pas d’introduction." %} | ||
{% if can_add_something %} | ||
{% trans "Vous pouvez " %}<a href="{% url "content:edit" content.pk content.slug %}">{% trans "en ajouter une" %}</a>. | ||
{% endif %} | ||
</p> | ||
</div> | ||
{% endif %} | ||
|
||
{% if content.has_extracts or content.can_add_extract %} | ||
<ul> | ||
{% for extract in content.children %} | ||
<li> | ||
<a href="#{{ extract.position_in_parent }}-{{ extract.slug }}"> | ||
{{ extract.title }} | ||
</a> | ||
</li> | ||
{% endfor %} | ||
{% if not content.can_add_container and content.can_add_extract and display_config.draft_actions.enable_edit %} | ||
<li class="simple-create-button"> | ||
<a class="btn btn-grey" href="{% url "content:create-extract" content.pk content.slug %}"> | ||
{% trans "Ajouter une section" %} | ||
</a> | ||
</li> | ||
{% endif %} | ||
</ul> | ||
{% 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 %} | ||
<div class="ico-after warning"> | ||
<p> | ||
{% trans "Ce contenu est vide." %} {% trans "Vous pouvez :" %} | ||
</p> | ||
<ul> | ||
<li> | ||
<a href="{% url "content:create-container" content.pk content.slug %}">{% trans "Ajouter une partie" %}</a> | ||
{% trans " pour adopter le format big-tuto ou moyen-tuto. Vous pourrez y ajouter des chapitres ou des sections ;" %} | ||
</li> | ||
<li> | ||
<a href="{% url "content:create-extract" content.pk content.slug %}">{% trans "Ajouter une section" %}</a> | ||
{% trans " pour adopter le format mini-tuto composé uniquement de sections." %} | ||
</li> | ||
</ul> | ||
</div> | ||
{% elif not display_config.draft_actions.enable_edit or not content.can_add_extract and not content.can_add_container %} | ||
<div class="ico-after warning"> | ||
<p> | ||
{% trans "Ce contenu est vide." %} | ||
</p> | ||
</div> | ||
{% endif %} | ||
{% endfor %} | ||
|
||
{% if display_config.draft_actions.enable_edit %} | ||
{% if content.can_add_container and not content.can_add_extract %} | ||
<h2> | ||
{% url "content:create-container" content.pk content.slug as create_container_url %} | ||
<a class="force-blue" href="{{create_container_url}}"> | ||
{% trans "Ajouter une nouvelle partie" %} | ||
</a> | ||
<div class="actions-title"> | ||
<a href="{{ create_container_url }}" class="ico-after more btn btn-grey"> | ||
{% trans "Ajouter" %} | ||
</a> | ||
</div> | ||
</h2> | ||
{% endif %} | ||
|
||
{% if not content.can_add_container and content.can_add_extract %} | ||
<h2> | ||
{% url "content:create-extract" content.pk content.slug as create_extract_url %} | ||
<a class="force-blue" href="{{ create_extract_url }}"> | ||
{% trans "Ajouter une section" %} | ||
</a> | ||
<div class="actions-title"> | ||
<a href="{{ create_extract_url }}" class="ico-after more btn btn-grey"> | ||
{% trans "Ajouter" %} | ||
</a> | ||
</div> | ||
</h2> | ||
<div class="ico-after information"> | ||
<p>{% trans "Cliquer sur ajouter pour rédiger une nouvelle section." %}</p> | ||
</div> | ||
{% endif %} | ||
{% endif %} | ||
|
||
|
||
<hr class="clearfix" /> | ||
<hr /> | ||
|
||
{% if content.conclusion and content.get_conclusion != "" %} | ||
{{ content.get_conclusion|emarkdown:is_js }} | ||
{% elif display_config.draft_actions.show_empty_section_warnings %} | ||
<div class="ico-after warning"> | ||
<p> | ||
{% trans "Il n’y a pas de conclusion." %} | ||
{% if display_config.draft_actions.enable_edit %} | ||
{% trans "Vous pouvez " %}<a href="{% url "content:edit" content.pk content.slug %}">{% trans "en ajouter une" %}</a>. | ||
{% endif %} | ||
</p> | ||
</div> | ||
{% endif %} |
File renamed without changes.
Oops, something went wrong.