From 4f3eb0d4a73eaa84bbb730977b358c54fa163ef5 Mon Sep 17 00:00:00 2001 From: Raphael Odini Date: Tue, 22 Aug 2023 12:20:34 +0200 Subject: [PATCH] =?UTF-8?q?D=C3=A9p=C3=B4t=20de=20besoin=20:=20CTA=20sur?= =?UTF-8?q?=20les=20fiches=20structures=20(#864)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Add card_suggest_tender to Siae detail * Adapt card below to homogenize --- .../templates/siaes/_card_suggest_tender.html | 56 +++++++++---------- .../templates/siaes/_detail_partner_cta.html | 30 +++++----- lemarche/templates/siaes/detail.html | 3 +- lemarche/templates/siaes/search_results.html | 2 +- 4 files changed, 47 insertions(+), 44 deletions(-) diff --git a/lemarche/templates/siaes/_card_suggest_tender.html b/lemarche/templates/siaes/_card_suggest_tender.html index f3dd84139..11288cb55 100644 --- a/lemarche/templates/siaes/_card_suggest_tender.html +++ b/lemarche/templates/siaes/_card_suggest_tender.html @@ -30,33 +30,33 @@
Lieu{{ perimeters_length|pluralize:"x" }} d'intervention
Afficher les {{ perimeters_length|add:"-2" }} autres lieux d'interventions
- {% endif %} - {% if forloop.counter == perimeters_length and perimeters_length > 2 %}
{% endif %} - {% endfor %} - {% endwith %} - {% endif %} - {% if current_sectors %} - {% with sectors_length=current_sectors|length %} -
Secteur{{ sectors_length|pluralize }} d'activité
- {% for sector in current_sectors %} - {{ sector.name|truncatechars:42 }} -
- {% if forloop.counter == 2 and sectors_length > 2 %} - -
- {% endif %} - {% if forloop.counter == sectors_length and sectors_length > 2 %}
{% endif %} - {% endfor %} - {% endwith %} - {% endif %} - + {% endif %} + {% if forloop.counter == perimeters_length and perimeters_length > 2 %}{% endif %} + {% endfor %} + {% endwith %} + {% endif %} + {% if current_sectors %} + {% with sectors_length=current_sectors|length %} +
Secteur{{ sectors_length|pluralize }} d'activité
+ {% for sector in current_sectors %} + {{ sector.name|truncatechars:42 }} +
+ {% if forloop.counter == 2 and sectors_length > 2 %} + +
+ {% endif %} + {% if forloop.counter == sectors_length and sectors_length > 2 %}
{% endif %} + {% endfor %} + {% endwith %} {% endif %} - + {% endif %} + + diff --git a/lemarche/templates/siaes/_detail_partner_cta.html b/lemarche/templates/siaes/_detail_partner_cta.html index 62a0e1fe1..7a407a3e7 100644 --- a/lemarche/templates/siaes/_detail_partner_cta.html +++ b/lemarche/templates/siaes/_detail_partner_cta.html @@ -1,19 +1,21 @@ {% load wagtailcore_tags %} -
-
-

Vous avez besoin d'être accompagné dans vos achats inclusifs par des partenaires reconnus ?

+
+
+
+

Vous avez besoin d'être accompagné dans vos achats inclusifs par des partenaires reconnus ?

- {% if siae.kind_is_esat_or_ea %} - - Découvrez-les maintenant - - - {% else %} - - Découvrez-les maintenant - - - {% endif %} + {% if siae.kind_is_esat_or_ea %} + + Découvrez-les maintenant + + + {% else %} + + Découvrez-les maintenant + + + {% endif %} +
diff --git a/lemarche/templates/siaes/detail.html b/lemarche/templates/siaes/detail.html index d3aeef823..4d8a5456d 100644 --- a/lemarche/templates/siaes/detail.html +++ b/lemarche/templates/siaes/detail.html @@ -132,7 +132,8 @@


-
+
+ {% include "siaes/_card_suggest_tender.html" %} {% include "siaes/_detail_partner_cta.html" with siae=siae %}
diff --git a/lemarche/templates/siaes/search_results.html b/lemarche/templates/siaes/search_results.html index bc9d4a72d..bb0445d8e 100644 --- a/lemarche/templates/siaes/search_results.html +++ b/lemarche/templates/siaes/search_results.html @@ -224,7 +224,7 @@

{% include "siaes/_card_search_result.html" with siae=siae %} {% if forloop.counter in position_promote_tenders and page_obj.number == 1 %} - {% include "siaes/_card_suggest_tender.html" %} + {% include "siaes/_card_suggest_tender.html" with current_perimeters=current_perimeters current_sectors=current_sectors %} {% endif %} {% endfor %} {% include "includes/_pagination.html" %}