-
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.
Permet de gérer les auteurs directement depuis la liste des auteurs (#…
- Loading branch information
Showing
8 changed files
with
112 additions
and
83 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
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,31 +1,39 @@ | ||
{% load i18n %} | ||
{% load pluralize_fr %} | ||
{% load displayable_authors %} | ||
{% load captureas %} | ||
|
||
<div class="members"> | ||
<span class="authors-label"> | ||
{% trans "Auteur" %}{{ db_content|displayable_authors:online_mode|pluralize }} : | ||
</span> | ||
<ul> | ||
{% for member in db_content|displayable_authors:online_mode %} | ||
<li> | ||
{% include "misc/member_item.part.html" with avatar=True %} | ||
</li> | ||
{% endfor %} | ||
{% with authors=db_content|displayable_authors:online_mode %} | ||
<div class="members"> | ||
<span class="authors-label"> | ||
{% trans "Par" %} | ||
</span> | ||
<ul> | ||
{% if authors.count == 1 %} | ||
<li> | ||
{% include "misc/member_item.part.html" with member=authors.first author=True avatar=True deletable=False %} | ||
</li> | ||
{% else %} | ||
{% for author in authors %} | ||
<li> | ||
{% include "misc/member_item.part.html" with member=author author=True avatar=True deletable=edit_authors %} | ||
</li> | ||
{% endfor %} | ||
{% endif %} | ||
|
||
{% if add_author %} | ||
<li> | ||
<a href="#add-author-content" class="btn btn-add open-modal ico-after more blue"> | ||
{% trans "Ajouter un auteur" %} | ||
</a> | ||
<form action="{% url "content:add-author" content.pk %}" method="post" class="modal modal-flex" id="add-author-content"> | ||
{% csrf_token %} | ||
<input type="text" name="username" placeholder="Pseudo de l’utilisateur à ajouter" data-autocomplete="{ 'type': 'single' }"> | ||
<button type="submit" name="add_author" class="btn btn-submit"> | ||
{% trans "Confirmer" %} | ||
</button> | ||
</form> | ||
</li> | ||
{% endif %} | ||
</ul> | ||
{% if edit_authors %} | ||
<li> | ||
<a href="#add-author" class="btn btn-add open-modal ico-after more blue"> | ||
{% trans "Ajouter" %} | ||
</a> | ||
{% url "content:add-author" content.pk as add_author_url %} | ||
<form action="{{ add_author_url }}" method="post" class="modal modal-flex" id="add-author"> | ||
{% csrf_token %} | ||
<input type="text" name="username" placeholder="Pseudo du membre à ajouter" data-autocomplete="{ 'type': 'single' }"> | ||
<button type="submit" name="add_author" class="btn btn-submit">{% trans "Confirmer" %}</button> | ||
</form> | ||
</li> | ||
{% endif %} | ||
</ul> | ||
</div> | ||
{% endwith %} |
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
42 changes: 0 additions & 42 deletions
42
templates/tutorialv2/includes/sidebar/authors_management.part.html
This file was deleted.
Oops, something went wrong.
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