From 8e0c118862abfa42f0aac20b43e1fb91b271182d Mon Sep 17 00:00:00 2001 From: Raphael Odini Date: Mon, 29 Jan 2024 18:34:00 +0100 Subject: [PATCH] Tender detail: new template for siae users without siae. Update tests --- .../tenders/_detail_siae_user_without_siae.html | 12 ++++++++++++ lemarche/templates/tenders/_detail_sidebar.html | 17 ++++------------- lemarche/www/tenders/tests.py | 2 +- 3 files changed, 17 insertions(+), 14 deletions(-) create mode 100644 lemarche/templates/tenders/_detail_siae_user_without_siae.html diff --git a/lemarche/templates/tenders/_detail_siae_user_without_siae.html b/lemarche/templates/tenders/_detail_siae_user_without_siae.html new file mode 100644 index 000000000..4b1768a74 --- /dev/null +++ b/lemarche/templates/tenders/_detail_siae_user_without_siae.html @@ -0,0 +1,12 @@ + diff --git a/lemarche/templates/tenders/_detail_sidebar.html b/lemarche/templates/tenders/_detail_sidebar.html index 257a033e8..bdee44e83 100644 --- a/lemarche/templates/tenders/_detail_sidebar.html +++ b/lemarche/templates/tenders/_detail_sidebar.html @@ -37,18 +37,7 @@ {% elif user.kind == user.KIND_SIAE %} {% if not user.has_siae %} - + {% include "tenders/_detail_siae_user_without_siae.html" %} {% elif siae_has_detail_contact_click_date %} {% elif siae_has_detail_not_interested_click_date %} {% include "tenders/_detail_not_interested_click_confirm.html" %} @@ -72,7 +61,9 @@ {% else %} {% if user.is_authenticated or siae_id %} - {% if siae_has_detail_contact_click_date %} + {% if user.is_authenticated and not user.has_siae %} + {% include "tenders/_detail_siae_user_without_siae.html" %} + {% elif siae_has_detail_contact_click_date %} {% include "tenders/_detail_contact_click_confirm_tender_response_is_anonymous.html" %} {% elif siae_has_detail_not_interested_click_date %} {% include "tenders/_detail_not_interested_click_confirm.html" %} diff --git a/lemarche/www/tenders/tests.py b/lemarche/www/tenders/tests.py index 090995e20..03e75cf8a 100644 --- a/lemarche/www/tenders/tests.py +++ b/lemarche/www/tenders/tests.py @@ -887,7 +887,7 @@ def test_tender_response_is_anonymous_contact_display(self): self.client.force_login(self.siae_user_without_siae) url = reverse("tenders:detail", kwargs={"slug": self.tender_3_response_is_anonymous.slug}) response = self.client.get(url) - self.assertNotContains(response, "veuillez d'abord vous") + self.assertContains(response, "veuillez d'abord vous") self.assertNotContains(response, "Voir l'appel d'offres") # author self.client.force_login(self.user_buyer_1)