Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dépôt de besoin : CTA sur les fiches structures #864

Merged
merged 2 commits into from
Aug 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 28 additions & 28 deletions lemarche/templates/siaes/_card_suggest_tender.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,33 +30,33 @@ <h5 class="mb-2">Lieu{{ perimeters_length|pluralize:"x" }} d'intervention</h5>
Afficher les {{ perimeters_length|add:"-2" }} autres lieux d'interventions
</a>
<div id="perimetersSearchHidden" class="collapse">
{% endif %}
{% if forloop.counter == perimeters_length and perimeters_length > 2 %}</div>{% endif %}
{% endfor %}
{% endwith %}
{% endif %}
{% if current_sectors %}
{% with sectors_length=current_sectors|length %}
<h5 class="{% if current_perimeters %}mt-4{% endif %} mb-2">Secteur{{ sectors_length|pluralize }} d'activité</h5>
{% for sector in current_sectors %}
<span class="badge badge-base badge-outline-primary ml-0 mb-1">{{ sector.name|truncatechars:42 }}</span>
<br>
{% if forloop.counter == 2 and sectors_length > 2 %}
<a class="w-100 d-block text-decoration-none has-collapse-caret collapsed"
data-toggle="collapse"
href="#sectorsSearchHidden"
role="button"
aria-expanded="false"
aria-controls="sectorsSearchHidden">
Afficher les {{ sectors_length|add:"-2" }} autres secteurs
</a>
<div id="sectorsSearchHidden" class="collapse">
{% endif %}
{% if forloop.counter == sectors_length and sectors_length > 2 %}</div>{% endif %}
{% endfor %}
{% endwith %}
{% endif %}
</div>
{% endif %}
{% if forloop.counter == perimeters_length and perimeters_length > 2 %}</div>{% endif %}
{% endfor %}
{% endwith %}
{% endif %}
{% if current_sectors %}
{% with sectors_length=current_sectors|length %}
<h5 class="{% if current_perimeters %}mt-4{% endif %} mb-2">Secteur{{ sectors_length|pluralize }} d'activité</h5>
{% for sector in current_sectors %}
<span class="badge badge-base badge-outline-primary ml-0 mb-1">{{ sector.name|truncatechars:42 }}</span>
<br />
{% if forloop.counter == 2 and sectors_length > 2 %}
<a class="w-100 d-block text-decoration-none has-collapse-caret collapsed"
data-toggle="collapse"
href="#sectorsSearchHidden"
role="button"
aria-expanded="false"
aria-controls="sectorsSearchHidden">
Afficher les {{ sectors_length|add:"-2" }} autres secteurs
</a>
<div id="sectorsSearchHidden" class="collapse">
{% endif %}
{% if forloop.counter == sectors_length and sectors_length > 2 %}</div>{% endif %}
{% endfor %}
{% endwith %}
{% endif %}
</div>
</div>
{% endif %}
</div>
</div>
30 changes: 16 additions & 14 deletions lemarche/templates/siaes/_detail_partner_cta.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
{% load wagtailcore_tags %}

<div class="card c-card rounded-lg shadow-lg">
<div class="card-body">
<h4>Vous avez besoin d'être accompagné dans vos achats inclusifs par des partenaires reconnus ?</h2>
<div class="c-box">
<div class="row">
<div class="col">
<h4>Vous avez besoin d'être accompagné dans vos achats inclusifs par des partenaires reconnus ?</h2>

{% if siae.kind_is_esat_or_ea %}
<a href="{% slugurl "faciltez-vous-les-achats-responsables" %}" id="track_siae_detail_partners_esat_ea" class="btn btn-link btn-ico">
<span>Découvrez-les maintenant</span>
<i class="ri-arrow-right-up-line ri-lg"></i>
</a>
{% else %}
<a href="{% url 'pages:partenaires' %}" id="track_siae_detail_partners" class="btn btn-link btn-ico">
<span>Découvrez-les maintenant</span>
<i class="ri-arrow-right-up-line ri-lg"></i>
</a>
{% endif %}
{% if siae.kind_is_esat_or_ea %}
<a href="{% slugurl "faciltez-vous-les-achats-responsables" %}" target="_blank" id="track_siae_detail_partners_esat_ea" class="btn btn-sm btn-outline-primary btn-ico">
<span>Découvrez-les maintenant</span>
<i class="ri-arrow-right-up-line ri-lg"></i>
</a>
{% else %}
<a href="{% url 'pages:partenaires' %}" target="_blank" id="track_siae_detail_partners" class="btn btn-sm btn-outline-primary btn-ico">
<span>Découvrez-les maintenant</span>
<i class="ri-arrow-right-up-line ri-lg"></i>
</a>
{% endif %}
</div>
</div>
</div>
3 changes: 2 additions & 1 deletion lemarche/templates/siaes/detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ <h1 class="h2">
</div>
<hr class="mt-5 d-block d-lg-none">
</div>
<div class="partners d-none d-lg-block">
<div class="d-none d-lg-block">
{% include "siaes/_card_suggest_tender.html" %}
{% include "siaes/_detail_partner_cta.html" with siae=siae %}
</div>
</aside>
Expand Down
2 changes: 1 addition & 1 deletion lemarche/templates/siaes/search_results.html
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ <h1 class="h4 mb-0">
{% include "siaes/_card_search_result.html" with siae=siae %}
<!-- insert to nudge tender creation -->
{% 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" %}
Expand Down