Skip to content

Commit

Permalink
feat(Activités des structures): Remplacement de l'onglet "Votre référ…
Browse files Browse the repository at this point in the history
…encement" (#1505)
  • Loading branch information
SebastienReuiller authored Nov 20, 2024
1 parent 1df3c36 commit 273a11b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 19 deletions.
19 changes: 4 additions & 15 deletions lemarche/templates/dashboard/siae_edit_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -82,25 +82,14 @@ <h3 class="fr-alert__title">Votre fiche n'est pas complète, et donc moins visib
</a>
</li>
<li role="presentation">
<a href="{% url 'dashboard_siaes:siae_edit_search' siae.slug %}"
id="siae-edit-search-tab"
<a href="{% url 'dashboard_siaes:siae_edit_activities' siae.slug %}"
id="siae-edit-search-2-tab"
class="fr-tabs__tab"
aria-controls="siae_edit_search_panel"
aria-selected="{% if 'siae_edit_search' in request.resolver_match.url_name %}true{% else %}false{% endif %}">
aria-controls="siae_edit_activities_panel"
aria-selected="{% if 'siae_edit_activities' in request.resolver_match.url_name %}true{% else %}false{% endif %}">
Votre référencement
</a>
</li>
{% if user.is_authenticated and user.is_admin %}
<li role="presentation">
<a href="{% url 'dashboard_siaes:siae_edit_activities' siae.slug %}"
id="siae-edit-search-2-tab"
class="fr-tabs__tab"
aria-controls="siae_edit_activities_panel"
aria-selected="{% if 'siae_edit_activities' in request.resolver_match.url_name %}true{% else %}false{% endif %}">
Votre référencement (2)
</a>
</li>
{% endif %}
<li role="presentation">
<a href="{% url 'dashboard_siaes:siae_edit_info' siae.slug %}"
id="siae-edit-info-tab"
Expand Down
2 changes: 1 addition & 1 deletion lemarche/www/dashboard_siaes/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def test_only_siae_user_can_edit_siae(self):

def test_only_siae_user_can_access_siae_edit_tabs(self):
SIAE_EDIT_URLS = [
"dashboard_siaes:siae_edit_search",
"dashboard_siaes:siae_edit_activities",
"dashboard_siaes:siae_edit_info",
"dashboard_siaes:siae_edit_offer",
"dashboard_siaes:siae_edit_links",
Expand Down
9 changes: 6 additions & 3 deletions lemarche/www/dashboard_siaes/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,14 @@
from django.views.generic.base import RedirectView

from lemarche.www.dashboard_siaes.views import (
SiaeEditActivitiesDeleteView,
SiaeEditActivitiesCreateView,
SiaeEditActivitiesDeleteView,
SiaeEditActivitiesEditView,
SiaeEditActivitiesView,
SiaeEditContactView,
SiaeEditInfoView,
SiaeEditLinksView,
SiaeEditOfferView,
SiaeEditSearchView,
SiaeSearchAdoptConfirmView,
SiaeSearchBySiretView,
SiaeUserDeleteView,
Expand All @@ -36,7 +35,11 @@
name="siae_edit",
),
path("contact/", SiaeEditContactView.as_view(), name="siae_edit_contact"),
path("recherche/", SiaeEditSearchView.as_view(), name="siae_edit_search"),
path(
"recherche/",
RedirectView.as_view(pattern_name="dashboard_siaes:siae_edit_activities", permanent=False),
name="siae_edit_search",
),
path("activites/", SiaeEditActivitiesView.as_view(), name="siae_edit_activities"),
path("activites/creer", SiaeEditActivitiesCreateView.as_view(), name="siae_edit_activities_create"),
path(
Expand Down

0 comments on commit 273a11b

Please sign in to comment.