Skip to content

Commit

Permalink
Merge branch 'dev' into passez_votre_chemin_refacto_urls_en_cours_7
Browse files Browse the repository at this point in the history
  • Loading branch information
philippemilink authored Jul 3, 2022
2 parents 70c81b2 + 8da239f commit fcb4a55
Show file tree
Hide file tree
Showing 53 changed files with 361 additions and 301 deletions.
8 changes: 4 additions & 4 deletions fixtures/advanced/aide_tuto_media.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
- factory: zds.utils.tests.factories.HelpWritingFactory
- factory: zds.tutorialv2.tests.factories.HelpWritingFactory
fields:
title: "Rédacteur"
tablelabel: "Besoin d'aide pour la rédaction"
slug: "redacteur"
fixture_image_path: "aide_redacteur.png"

- factory: zds.utils.tests.factories.HelpWritingFactory
- factory: zds.tutorialv2.tests.factories.HelpWritingFactory
fields:
title: "Correcteur"
tablelabel: "Besoin d'aide pour la correction"
slug: "correcteur"
fixture_image_path: "aide_correcteur.png"

- factory: zds.utils.tests.factories.HelpWritingFactory
- factory: zds.tutorialv2.tests.factories.HelpWritingFactory
fields:
title: "Illustrateur"
tablelabel: "Besoin d'aide pour l'illustration"
slug: "illustrateur"
fixture_image_path: "aide_illustrateur.png"

- factory: zds.utils.tests.factories.HelpWritingFactory
- factory: zds.tutorialv2.tests.factories.HelpWritingFactory
fields:
title: "Repreneur"
tablelabel: "Cherche un repreneur"
Expand Down
8 changes: 4 additions & 4 deletions templates/featured/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@


{% block breadcrumb_base %}
<li><a href="{% url 'featured-resource-list' %}">{% trans "Mise en avant du site" %}</a></li>
<li><a href="{% url "featured:resource-list" %}">{% trans "Mise en avant du site" %}</a></li>
{% endblock %}



{% block sidebar %}
<aside class="sidebar accordeon mobile-menu-bloc" data-title="{% trans 'Action sur les unes' %}">
<a href="{% url 'featured-message-create' %}" class="new-btn ico-after more blue">
<a href="{% url "featured:message-create" %}" class="new-btn ico-after more blue">
{% trans "Éditer le message d’accueil" %}
</a>
<a href="{% url 'featured-resource-create' %}" class="new-btn ico-after more blue">
<a href="{% url "featured:resource-create" %}" class="new-btn ico-after more blue">
{% trans "Nouvelle une" %}
</a>
<a href="{% url 'featured-resource-requests' %}" class="new-btn ico-after star blue">
<a href="{% url "featured:resource-requests" %}" class="new-btn ico-after star blue">
{% trans "Liste des requêtes pour les unes" %}
</a>

Expand Down
4 changes: 2 additions & 2 deletions templates/featured/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
<input name="items" type="checkbox" value="{{ featured_resource.pk }}" form="form-delete-featured">
</div>
<div class="topic-description">
<a href="{% url 'featured-resource-update' featured_resource.pk %}" class="topic-title-link navigable-link">
<a href="{% url "featured:resource-update" featured_resource.pk %}" class="topic-title-link navigable-link">
<img src="{{ featured_resource.image_url|remove_url_scheme }}"
data-caption="{{ featured_resource.title }}"
alt="{{ featured_resource.title }}"
Expand Down Expand Up @@ -72,7 +72,7 @@
{% include "misc/paginator.html" with position="bottom" %}

<!-- Confirmation modal for deleting featured -->
<form id="form-delete-featured" name="form" method="post" action="{% url "featured-resource-list-delete" %}" class="modal modal-flex">
<form id="form-delete-featured" name="form" method="post" action="{% url "featured:resource-list-delete" %}" class="modal modal-flex">
{% csrf_token %}
<p>{% trans "Attention, vous vous apprêtez à supprimer toutes les unes sélectionnées." %}</p>
<button type="submit" name="delete_multi" class="btn btn-submit">{% trans "Confirmer" %}</button>
Expand Down
18 changes: 9 additions & 9 deletions templates/featured/list_requests.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,17 @@
<td>{{ featured_request.num_vote }}</td>
<td>
{% if featured_request.rejected %}
<button type="button" class="btn btn-grey ico-after cross unpick-action" data-url="{% url 'featured-resource-request-update' featured_request.pk %}"
<button type="button" class="btn btn-grey ico-after cross unpick-action" data-url="{% url "featured:resource-request-update" featured_request.pk %}"
data-operation="CONSIDER">{% trans "Ne plus ignorer" %}</button>
{% else %}
<button type="button" class="btn btn-grey ico-after hide unpick-action" data-url="{% url 'featured-resource-request-update' featured_request.pk %}"
<button type="button" class="btn btn-grey ico-after hide unpick-action" data-url="{% url "featured:resource-request-update" featured_request.pk %}"
data-operation="REJECT">{% trans "Ignorer" %}</button>
{% endif %}

<button type="button" class="btn btn-grey ico-after hide unpick-action" data-url="{% url 'featured-resource-request-update' featured_request.pk %}"
<button type="button" class="btn btn-grey ico-after hide unpick-action" data-url="{% url "featured:resource-request-update" featured_request.pk %}"
data-operation="REJECT_FOR_GOOD">{% trans "Ignorer définitivement" %}</button>

<a href="{% url "featured-resource-create" %}?content_type={% if featured_request.type == 'TOPIC' %}topic{% else %}published_content{% endif %}&amp;content_id={{ featured_request.content_object.pk }}">
<a href="{% url "featured:resource-create" %}?content_type={% if featured_request.type == 'TOPIC' %}topic{% else %}published_content{% endif %}&amp;content_id={{ featured_request.content_object.pk }}">
<button type="button" class="btn btn-grey ico-after star">{% trans "Nouvelle une" %}</button>
</a>
</td>
Expand All @@ -95,28 +95,28 @@
<h3>{% trans "Filtres" %}</h3>
<ul>
<li>
<a href="{% url "featured-resource-requests" %}?type=topic" class="ico-after view {% if request.GET.type == "topic" %}selected{% endif %}">
<a href="{% url "featured:resource-requests" %}?type=topic" class="ico-after view {% if request.GET.type == "topic" %}selected{% endif %}">
{% trans "Sujets proposés" %}
</a>
</li>
<li>
<a href="{% url "featured-resource-requests" %}?type=content" class="ico-after view {% if request.GET.type == "content" %}selected{% endif %}">
<a href="{% url "featured:resource-requests" %}?type=content" class="ico-after view {% if request.GET.type == "content" %}selected{% endif %}">
{% trans "Contenus proposés" %}
</a>
</li>
<li>
<a href="{% url "featured-resource-requests" %}?type=ignored" class="ico-after view {% if request.GET.type == "ignored" %}selected{% endif %}">
<a href="{% url "featured:resource-requests" %}?type=ignored" class="ico-after view {% if request.GET.type == "ignored" %}selected{% endif %}">
{% trans "Requêtes ignorées" %}
</a>
</li>
<li>
<a href="{% url "featured-resource-requests" %}?type=accepted" class="ico-after view {% if request.GET.type == "accepted" %}selected{% endif %}">
<a href="{% url "featured:resource-requests" %}?type=accepted" class="ico-after view {% if request.GET.type == "accepted" %}selected{% endif %}">
{% trans "Requêtes acceptées" %}
</a>
</li>
{% if request.GET.type %}
<li>
<a href="{% url "featured-resource-requests" %}" class="ico-after cross red">
<a href="{% url "featured:resource-requests" %}" class="ico-after cross red">
{% trans "Annuler le filtre" %}
</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion templates/featured/resource/update.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ <h3>{% trans "Actions" %}</h3>
<a href="#delete-featured-resource" class="open-modal ico-after cross blue">
{% trans "Supprimer la une" %}
</a>
<form action="{% url "featured-resource-delete" featured_resource.pk %}" method="post" id="delete-featured-resource" class="modal modal-flex">
<form action="{% url "featured:resource-delete" featured_resource.pk %}" method="post" id="delete-featured-resource" class="modal modal-flex">
<p>
{% trans "Attention, vous vous apprêtez à supprimer définitivement cette une." %}
</p>
Expand Down
2 changes: 1 addition & 1 deletion templates/forum/topic/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ <h3>{% trans "Modération" %}</h3>
</li>
{% if perms.featured.change_featuredresource %}
<li>
<a href="{% url "featured-resource-create" %}?content_type=topic&amp;content_id={{ topic.pk }}" class="ico-after star blue">
<a href="{% url "featured:resource-create" %}?content_type=topic&amp;content_id={{ topic.pk }}" class="ico-after star blue">
{% trans "Ajouter en une" %}
</a>
</li>
Expand Down
12 changes: 6 additions & 6 deletions templates/gallery/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@


{% block breadcrumb_base %}
<li><a href="{% url "gallery-list" %}">{% trans "Galeries" %}</a></li>
<li><a href="{% url "gallery:list" %}">{% trans "Galeries" %}</a></li>
{% endblock %}



{% block sidebar %}
<aside class="sidebar mobile-menu-hide">
<a href="{% url "gallery-new" %}" class="new-btn ico-after more blue">
<a href="{% url "gallery:create" %}" class="new-btn ico-after more blue">
{% trans "Créer une galerie" %}
</a>

Expand All @@ -31,19 +31,19 @@ <h3>{% trans "Actions" %}</h3>
<ul>
{% if permissions.write %}
<li>
<a href="{% url "gallery-image-new" gallery.pk %}" class="ico-after more blue">
<a href="{% url "gallery:image-add" gallery.pk %}" class="ico-after more blue">
{% trans "Ajouter une image" %}
</a>
</li>
{% if not content_linked %}
<li>
<a href="{% url "gallery-edit" gallery.pk gallery.slug %}" class="ico-after edit blue">
<a href="{% url "gallery:edit" gallery.pk %}" class="ico-after edit blue">
{% trans "Éditer la galerie" %}
</a>
</li>
{% endif %}
<li>
<a href="{% url "gallery-image-import" gallery.pk %}" class="ico-after import blue">
<a href="{% url "gallery:image-import" gallery.pk %}" class="ico-after import blue">
{% trans "Importer une archive" %}
</a>
</li>
Expand All @@ -52,7 +52,7 @@ <h3>{% trans "Actions" %}</h3>
<a href="#delete-galleries" class="open-modal ico-after cross red">
{% trans "Supprimer la galerie" %}
</a>
<form action="{% url "galleries-delete" %}" method="post" id="delete-galleries" class="modal modal-flex">
<form action="{% url "gallery:delete" %}" method="post" id="delete-galleries" class="modal modal-flex">
<input name="g_items" type="hidden" value="{{ gallery.pk }}" form="delete-galleries" />
<p>{% trans "Êtes-vous certain de vouloir supprimer cette galerie ?" %}</p>
{% csrf_token %}
Expand Down
14 changes: 7 additions & 7 deletions templates/gallery/gallery/details.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<td>
{# droits #}
{% if u.user != current_user %}
<form action="{% url "gallery-members" gallery.pk %}" method="post">
<form action="{% url "gallery:members" gallery.pk %}" method="post">
{% csrf_token %}
<input type="hidden" name="action" value="edit">
<input type="hidden" name="user" value="{{ u.user.username }}">
Expand All @@ -85,7 +85,7 @@
</td>
<td>
{# suppression #}
<form action="{% url "gallery-members" gallery.pk %}" method="post">
<form action="{% url "gallery:members" gallery.pk %}" method="post">
{% csrf_token %}
<input type="hidden" name="action" value="leave">
<input type="hidden" name="user" value="{{ u.user.username }}">
Expand Down Expand Up @@ -127,7 +127,7 @@
<!-- Delete images -->
<a class="btn btn-cancel open-modal" href="#form-delete-images">{% trans "Supprimer la sélection" %}</a>
<!-- Confirmation modal -->
<form id="form-delete-images" name="form" method="post" action="{% url "gallery-image-delete" gallery.pk %}" class="modal modal-flex">
<form id="form-delete-images" name="form" method="post" action="{% url "gallery:image-delete" gallery.pk %}" class="modal modal-flex">
<input type="hidden" name="gallery" value="{{ gallery.pk }}">
{% csrf_token %}
<p>{% trans "Attention, vous vous appretez à supprimer toutes les images sélectionnées." %}</p>
Expand All @@ -149,7 +149,7 @@
{% endif %}
</div>
<div class="topic-description has-image" title="{{ img.title }}">
<a href="{% url "gallery-image-edit" gallery.pk img.pk %}" class="topic-title-link navigable-link">
<a href="{% url "gallery:image-edit" gallery.pk img.pk %}" class="topic-title-link navigable-link">
<img src="{{ img.physical.gallery.url }}"
data-caption="{{ img.title }}"
alt="{{ img.title }}"
Expand All @@ -164,16 +164,16 @@
</div>
{% endfor %}

<a href="{% url "gallery-image-new" gallery.pk %}" title="Ajouter une image" class="gallery-item add-image">+</a>
<a href="{% url "gallery:image-add" gallery.pk %}" title="Ajouter une image" class="gallery-item add-image">+</a>
</div>
{% else %}
<p>
{% trans "Aucune image." %}
<br>

{% if permissions.write %}
{% url "gallery-image-new" gallery.pk as new_img_url %}
{% url "gallery-image-import" gallery.pk as import_archive %}
{% url "gallery:image-add" gallery.pk as new_img_url %}
{% url "gallery:image-import" gallery.pk as import_archive %}
{% blocktrans %}
Vous pouvez <a href="{{new_img_url}}">ajouter une image</a> à cette galerie dès à présent, ou <a href="{{ import_archive }}">importer une archive</a> !
{% endblocktrans %}
Expand Down
4 changes: 2 additions & 2 deletions templates/gallery/gallery/list.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
{% if galleries|length == 0 %}
<p>
{% trans "Vous n’avez pas encore de galerie" %}. <br>
<a href="{% url "gallery-new" %}">{% trans "Créer une galerie" %}</a>.
<a href="{% url "gallery:create" %}">{% trans "Créer une galerie" %}</a>.
</p>
{% endif %}

Expand All @@ -99,7 +99,7 @@ <h3>{% trans "Actions" %}</h3>
{% trans "Supprimer les galeries sélectionnées" %}
</a>

<form action="{% url "galleries-delete" %}" method="post" id="delete-galleries" class="modal modal-flex">
<form action="{% url "gallery:delete" %}" method="post" id="delete-galleries" class="modal modal-flex">
<p>
{% trans "Attention, vous vous apprêtez à supprimer toutes les galeries sélectionnées" %}.
</p>
Expand Down
2 changes: 1 addition & 1 deletion templates/gallery/image/edit.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@

{% if permissions.write %}
{# Confirmation modal for deleting image #}
<form id="form-delete-image" name="form" method="post" action="{% url "gallery-image-delete" gallery.pk %}" class="modal modal-flex">
<form id="form-delete-image" name="form" method="post" action="{% url "gallery:image-delete" gallery.pk %}" class="modal modal-flex">
{% csrf_token %}
<input type="hidden" name="image" value="{{ image.pk }}">
<p>{% trans "Attention, vous vous apprêtez à supprimer cette image." %}</p>
Expand Down
8 changes: 4 additions & 4 deletions templates/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ <h1>{% trans "Messagerie privée" %}</h1>

{# NOTIFICATIONS #}
<div>
<a href="{% url 'notification-list' %}" class="ico-link" title="{% trans 'Notifications' %}">
<a href="{% url "notification:list" %}" class="ico-link" title="{% trans 'Notifications' %}">
{% if header_general_notifications.total > 0 %}
<span class="notif-count">{{ header_general_notifications.total }}</span>
{% endif %}
Expand Down Expand Up @@ -290,7 +290,7 @@ <h1 class="dropdown-title">{% trans "Notifications" %}</h1>
</li>
{% endif %}
</ul>
<a href="{% url 'notification-list' %}" class="dropdown-link-all">
<a href="{% url "notification:list" %}" class="dropdown-link-all">
{% trans "Toutes les notifications" %}
</a>
</div>
Expand Down Expand Up @@ -367,7 +367,7 @@ <h1 class="dropdown-title">{{ user.username|truncatechars:25 }}</h1>
<a href="{% url "opinion:find-opinion" user.username %}">{% trans "Mes billets" %}</a>
</li>
<li>
<a href="{% url "gallery-list" %}">{% trans "Galeries d’images" %}</a>
<a href="{% url "gallery:list" %}">{% trans "Galeries d’images" %}</a>
</li>
<li>
<a href="{% url "update-member" %}">{% trans "Paramètres" %}</a>
Expand Down Expand Up @@ -434,7 +434,7 @@ <h1 class="dropdown-title">{{ user.username|truncatechars:25 }}</h1>

{% if perms.featured.change_featuredresource %}
<li class="staff-only">
<a href="{% url 'featured-resource-list' %}">{% trans 'Gestion des mises en avant' %}</a>
<a href="{% url "featured:resource-list" %}">{% trans 'Gestion des mises en avant' %}</a>
</li>
{% endif %}
<li>
Expand Down
Loading

0 comments on commit fcb4a55

Please sign in to comment.