From b8826ebb3b94c9f1f95bc590cc6d361ee52913bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Reuiller?= Date: Thu, 7 Nov 2024 17:29:16 +0100 Subject: [PATCH 1/3] switch edit activities tab --- .../templates/dashboard/siae_edit_base.html | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/lemarche/templates/dashboard/siae_edit_base.html b/lemarche/templates/dashboard/siae_edit_base.html index 98ff07ba9..4bc0e9242 100644 --- a/lemarche/templates/dashboard/siae_edit_base.html +++ b/lemarche/templates/dashboard/siae_edit_base.html @@ -82,25 +82,14 @@

Votre fiche n'est pas complète, et donc moins visib
  • - + 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
  • - {% if user.is_authenticated and user.is_admin %} -
  • - - Votre référencement (2) - -
  • - {% endif %}
  • Date: Wed, 20 Nov 2024 15:51:06 +0100 Subject: [PATCH 2/3] add a redirect in case the user has bookmarked the old link --- lemarche/www/dashboard_siaes/urls.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lemarche/www/dashboard_siaes/urls.py b/lemarche/www/dashboard_siaes/urls.py index 568adc582..9b1d83f8d 100644 --- a/lemarche/www/dashboard_siaes/urls.py +++ b/lemarche/www/dashboard_siaes/urls.py @@ -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, @@ -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( From 692f2effe5f14e318519cb8e75445ab3f90a3aaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Reuiller?= Date: Wed, 20 Nov 2024 16:13:49 +0100 Subject: [PATCH 3/3] adaptation of the failing test --- lemarche/www/dashboard_siaes/tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lemarche/www/dashboard_siaes/tests.py b/lemarche/www/dashboard_siaes/tests.py index b8f662ac7..e74126afb 100644 --- a/lemarche/www/dashboard_siaes/tests.py +++ b/lemarche/www/dashboard_siaes/tests.py @@ -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",