diff --git a/lemarche/templates/dashboard/_siae_activity_card.html b/lemarche/templates/dashboard/_siae_activity_card.html index cfd3e94c5..816a7e714 100644 --- a/lemarche/templates/dashboard/_siae_activity_card.html +++ b/lemarche/templates/dashboard/_siae_activity_card.html @@ -21,13 +21,15 @@

-
- - - - - - -
+ {% if not hide_actions %} +
+ + + + + + +
+ {% endif %} diff --git a/lemarche/templates/dashboard/siae_edit_activities_create.html b/lemarche/templates/dashboard/siae_edit_activities_create.html index 5ba7e2092..5767defb7 100644 --- a/lemarche/templates/dashboard/siae_edit_activities_create.html +++ b/lemarche/templates/dashboard/siae_edit_activities_create.html @@ -1,7 +1,7 @@ {% extends "layouts/base.html" %} {% load static bootstrap4 %} -{% block title %}Ajouter une activité{{ block.super }}{% endblock %} +{% block title %}{{ page_title }}{{ block.super }}{% endblock %} {% block breadcrumbs %}
@@ -13,7 +13,7 @@ - + @@ -34,10 +34,18 @@
-

Ajouter une activité

+

{{ page_title }}

+ {% if activity %} +
+
+ {% include "dashboard/_siae_activity_card.html" with activity=activity hide_actions=True %} +
+
+ {% endif %} +
diff --git a/lemarche/www/dashboard_siaes/views.py b/lemarche/www/dashboard_siaes/views.py index 98d18b911..df051fa47 100644 --- a/lemarche/www/dashboard_siaes/views.py +++ b/lemarche/www/dashboard_siaes/views.py @@ -171,6 +171,7 @@ def form_valid(self, form): def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) + context["page_title"] = "Ajouter une activité" context["siae"] = self.siae return context @@ -191,14 +192,16 @@ def get(self, request, *args, **kwargs): self.siae = Siae.objects.get(slug=self.kwargs.get("slug")) return super().get(request, *args, **kwargs) + def get_object(self): + return get_object_or_404(SiaeActivity, siae__slug=self.kwargs.get("slug"), id=self.kwargs.get("activity_id")) + def get_context_data(self, **kwargs): context = super().get_context_data(**kwargs) + context["page_title"] = "Modifier une activité" context["siae"] = self.siae + context["activity"] = self.object return context - def get_object(self): - return get_object_or_404(SiaeActivity, siae__slug=self.kwargs.get("slug"), id=self.kwargs.get("activity_id")) - def get_success_url(self): return reverse_lazy("dashboard_siaes:siae_edit_activities", args=[self.kwargs.get("slug")])