Skip to content

Commit

Permalink
Dépôt de besoin : détail : template pour le message affiché aux utili…
Browse files Browse the repository at this point in the history
…sateurs SIAE sans structures (#1060)
  • Loading branch information
raphodn authored Jan 29, 2024
1 parent 91b9489 commit 0b1b9b8
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 14 deletions.
12 changes: 12 additions & 0 deletions lemarche/templates/tenders/_detail_siae_user_without_siae.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<div class="alert alert-info" role="alert">
<p class="mb-1">
<i class="ri-lightbulb-line ri-lg"></i>
<strong>Comment contacter le client ?</strong>
</p>
<p class="mb-0">
Pour accéder aux coordonnées du client, veuillez d'abord vous <a id="add-siae-btn" href="{% url 'dashboard_siaes:siae_search_by_siret' %}">rattacher à votre structure</a>.
</p>
<p>
Besoin d'aide ? contacter le support via le chat en ligne qui se trouve en bas à droite.
</p>
</div>
17 changes: 4 additions & 13 deletions lemarche/templates/tenders/_detail_sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,7 @@
<!-- siae info & actions -->
{% elif user.kind == user.KIND_SIAE %}
{% if not user.has_siae %}
<div class="alert alert-info" role="alert">
<p class="mb-1">
<i class="ri-lightbulb-line ri-lg"></i>
<strong>Comment contacter le client ?</strong>
</p>
<p class="mb-0">
Pour accéder aux coordonnées du client, veuillez d'abord vous <a id="add-siae-btn" href="{% url 'dashboard_siaes:siae_search_by_siret' %}">rattacher à votre structure</a>.
</p>
<p>
Besoin d'aide ? contacter le support via le chat en ligne qui se trouve en bas à droite.
</p>
</div>
{% 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" %}
Expand All @@ -72,7 +61,9 @@
<!-- anonymous tender -->
{% 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" %}
Expand Down
2 changes: 1 addition & 1 deletion lemarche/www/tenders/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 0b1b9b8

Please sign in to comment.