Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ajout de boutons pour modifier l'introduction et la conclusion des contenus #6565

Merged
merged 4 commits into from
Mar 2, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions assets/scss/layout/_main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,15 @@
color: $primary-300 !important;
}

.simple-edit-button {
text-align: right;

.btn {
display: inline-block;
float: none;
}
}

li.simple-create-button {
list-style-type: '';

Expand Down
10 changes: 10 additions & 0 deletions templates/tutorialv2/includes/content/content.part.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
{% load emarkdown %}

{% if content.introduction and content.get_introduction != "" %}
<div class="simple-edit-button">
<a class="ico-after edit btn btn-grey" href="{% url "content:edit" content.pk content.slug %}#div_id_introduction">
{% trans "Modifier l'introduction" %}
</a>
</div>
{{ content.get_introduction|emarkdown:is_js }}
{% elif display_config.draft_actions.show_empty_section_warnings %}
<div class="ico-after warning">
Expand Down Expand Up @@ -97,6 +102,11 @@ <h2>
<hr />

{% if content.conclusion and content.get_conclusion != "" %}
Arnaud-D marked this conversation as resolved.
Show resolved Hide resolved
<div class="simple-edit-button">
<a class="ico-after edit btn btn-grey" href="{% url "content:edit" content.pk content.slug %}#div_id_conclusion">
{% trans "Modifier la conclusion" %}
</a>
</div>
{{ content.get_conclusion|emarkdown:is_js }}
{% elif display_config.draft_actions.show_empty_section_warnings %}
<div class="ico-after warning">
Expand Down
10 changes: 10 additions & 0 deletions templates/tutorialv2/view/container.html
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@
{% include "tutorialv2/includes/chapter_pager.part.html" with position="top" %}

{% if container.introduction and container.get_introduction %}
Arnaud-D marked this conversation as resolved.
Show resolved Hide resolved
<div class="simple-edit-button">
<a class="ico-after edit btn btn-grey" href="{{ container.get_edit_url }}#div_id_introduction">
{% trans "Modifier l'introduction" %}
</a>
</div>
{{ container.get_introduction|emarkdown:is_js }}
{% elif display_config.draft_actions.enable_edit %}
<div class="ico-after warning">
Expand Down Expand Up @@ -194,6 +199,11 @@ <h2 class="force-blue">
<hr />

{% if container.conclusion and container.get_conclusion %}
<div class="simple-edit-button">
<a class="ico-after edit btn btn-grey" href="{{ container.get_edit_url }}#div_id_conclusion">
{% trans "Modifier la conclusion" %}
</a>
</div>
{{ container.get_conclusion|emarkdown:is_js }}
{% elif display_config.online_config.enable_edit %}
<div class="ico-after warning">
Expand Down
1 change: 1 addition & 0 deletions templates/tutorialv2/view/content.html
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@

{% if display_config.draft_actions.show_license_edit %}
<li>
{{ content }}
Arnaud-D marked this conversation as resolved.
Show resolved Hide resolved
{% url "content:edit" content.pk content.slug as edit_url %}
<a href="{{ edit_url }}" class="ico-after edit blue">{% trans "Éditer" %}</a>
</li>
Expand Down