Skip to content

Commit

Permalink
Siae detail: fix card height, move all info inside card. Aside: show …
Browse files Browse the repository at this point in the history
…buttons instead of links
  • Loading branch information
raphodn committed Jul 30, 2024
1 parent ee69e22 commit cbdb4b8
Show file tree
Hide file tree
Showing 7 changed files with 272 additions and 282 deletions.
209 changes: 206 additions & 3 deletions lemarche/templates/siaes/_card_detail.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{% load static %}
{% load static siae_sectors_display %}
{% load theme_inclusion %}

<div class="fr-card {% if siae.super_badge %}super-badge-card{% endif %}">
<div class="fr-card fr-card--horizontal fr-card--horizontal-tier {% if siae.super_badge %}super-badge-card{% endif %}">
<div class="fr-card__body">
<div class="fr-card__content">
<div class="fr-card__desc">
Expand Down Expand Up @@ -74,9 +75,211 @@ <h1>
</div>
</div>
</div>
{% include "siaes/_useful_infos.html" with siae=siae %}
</div>
<div class="fr-card__end">
{% include "siaes/_useful_infos.html" with siae=siae %}
<hr />
<div class="fr-grid-row">
<div class="fr-col-sm-12 img-left">
<div class="il-l">
<img src="{% static_theme_images 'ico-bicro-marche-descript-act.svg' %}"
alt=""
height="32" />
</div>
<div class="il-r">
<h3 class="h2 mb-1 mt-1">Présentation du prestataire</h3>
<div>
{% if siae.description %}
{{ siae.description|linebreaks }}
{% else %}
Non renseigné
{% endif %}
</div>
</div>
</div>
</div>
<!-- Second & Third Row : Secteurs, Références -->
<hr />
<div class="fr-grid-row">
<div class="fr-col-sm-6 img-left">
<div class="il-l">
<img src="{% static_theme_images 'ico-bicro-marche-secteur.svg' %}"
alt=""
height="32" />
</div>
<div class="il-r">
<h3 class="h2 mb-1 mt-1">Secteurs d'activité</h3>
<ul>
{% siae_sectors_display siae display_max=6 current_search_query=current_search_query output_format='li' %}
</ul>
{% if not siae.sector_count %}<p>Non renseigné</p>{% endif %}
</div>
</div>
</div>
<div id="image-grid" class="fr-grid-row">
{% for image in siae.images.all %}
<div class="fr-col-12 fr-col-sm-4 pb-3">
<!-- 3 per row -->
<img src="{{ image.image_url }}"
class="img-fluid"
title="{{ image.name|default:'' }}"
loading="lazy" />
</div>
{% endfor %}
</div>
{% if not siae.user_count and not user.is_authenticated %}
<div id="user_update_cta"
class="fr-grid-row justify-content-center mb-5 mb-lg-3 mt-lg-5">
<div class="fr-col-12 fr-col-lg-10">
<div class="card c-card--mini h-100 fr-p-3 p-lg-5 pr-lg-7">
<div class="fr-card__body text-center">
<h3 class="h2 fr-m-0">C'est votre structure et vous souhaitez modifier ses informations.</h3>
</div>
<div class="fr-card__end text-center">
<a href="{% url 'auth:signup' %}"
class="btn btn-primary btn-ico stretched-link">
<span>Inscrivez-vous dès maintenant</span>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16">
<path fill="currentColor" fill-rule="nonzero" stroke="currentColor" d="M1.964 8.95h11.03L9.51 12.737a.451.451 0 00.037.646.474.474 0 00.66-.037L14.386 8.8l.035-.043.033-.05.013-.05V8.539c0-.012.033-.02.033-.044v-.151l-.014-.05-.019-.03-.034-.045-4.193-4.566a.474.474 0 00-.66-.037.452.452 0 00-.036.646l3.45 3.777H1.963a.46.46 0 00-.464.455.46.46 0 00.464.455z">
</path>
</svg>
</a>
</div>
</div>
</div>
</div>
{% endif %}
<!-- Fourth Row : Prestations -->
{% if siae.offer_count %}
<hr />
<div class="fr-grid-row">
<div class="fr-col-sm-12 img-left">
<div class="il-l">
<img src="{% static_theme_images 'ico-bicro-marche-detail.svg' %}"
alt=""
height="32" />
</div>
</div>
</div>
{% endif %}
{% if not siae.user_count and not user.is_authenticated %}
<div id="user_update_cta"
class="fr-grid-row justify-content-center mb-5 mb-lg-3 mt-lg-5">
<div class="fr-col-12 fr-col-lg-10">
<div class="card c-card c-card--mini h-100 fr-p-3 p-lg-5 pr-lg-7">
<div class="card-body text-center">
<h3 class="h2 fr-m-0">C'est votre structure et vous souhaitez modifier ses informations.</h3>
<div class="fr-grid-row">
{% for offer in siae.offers.all %}
<article class="prests-post fr-col-12 {% if siae.offer_count > 1 %}col-lg-6{% endif %} mt-2">
<h3>
<img src="{% static 'img/prof_dot.png' %}" alt="" />
<span>{{ offer.name }}</span>
</h3>
<div>{{ offer.description|linebreaks }}</div>
</article>
{% endfor %}
</div>
</div>
</div>
</div>
</div>
{% endif %}
<!-- Fifth Row : Réseaux, Labels -->
{% if siae.network_count or siae.label_count %}
<hr />
<div class="fr-grid-row">
{% if siae.network_count %}
<div class="fr-col-12 fr-col-md-6 img-left">
<div class="il-l">
<img src="{% static_theme_images 'ico-bicro-marche-reseaux.svg' %}"
alt=""
height="32" />
</div>
<div class="il-r">
<h3 class="h2 mb-1 mt-1">Réseaux</h3>
<ul>
{% for network in siae.networks.all %}
<li>
<a href="{{ network.website }}"
class="network_link"
rel="noopener"
target="_blank">
<span>{{ network.name }}</span>
{% if network.brand %}<span>({{ network.brand }})</span>{% endif %}
</a>
</li>
{% endfor %}
</ul>
</div>
</div>
{% endif %}
{% if siae.label_count %}
<div class="fr-col-12 fr-col-md-6 img-left">
<div class="il-l">
<img src="{% static_theme_images 'ico-bicro-marche-labels.svg' %}"
alt=""
height="32" />
</div>
<div class="il-r">
<h3 class="h2 mb-1 mt-1">Labels & certifications</h3>
<ul>
{% for label in siae.labels_old.all %}<li>{{ label.name }}</li>{% endfor %}
</ul>
</div>
</div>
{% endif %}
</div>
{% endif %}
<!-- Sixth Row : Réalisations -->
{% if siae.images.count %}
<hr />
<div class="fr-grid-row">
<div class="fr-col-12 img-left">
<div class="il-l">
<img src="{% static_theme_images 'ico-bicro-marche-realisation.svg' %}"
alt=""
height="32" />
</div>
<div class="il-r">
<h3 class="h2 mb-1 mt-1">Nos réalisations</h3>
</div>
</div>
</div>
<div id="image-grid" class="fr-grid-row">
{% for image in siae.images.all %}
<div class="fr-col-12 fr-col-sm-4 pb-3">
<!-- 3 per row -->
<img src="{{ image.image_url }}"
class="img-fluid"
title="{{ image.name|default:'' }}"
loading="lazy" />
</div>
{% endfor %}
</div>
{% endif %}
{% if not siae.user_count and not user.is_authenticated %}
<div id="user_update_cta"
class="fr-grid-row justify-content-center mb-5 mb-lg-3 mt-lg-5">
<div class="fr-col-12 fr-col-lg-10">
<div class="card c-card c-card--mini h-100 p-3 p-lg-5 pr-lg-7">
<div class="card-body text-center">
<h3 class="h2 m-0">C'est votre structure et vous souhaitez modifier ses informations.</h3>
</div>
<div class="card-footer text-center">
<a href="{% url 'auth:signup' %}"
class="btn btn-primary btn-ico stretched-link">
<span>Inscrivez-vous dès maintenant</span>
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16">
<path fill="currentColor" fill-rule="nonzero" stroke="currentColor" d="M1.964 8.95h11.03L9.51 12.737a.451.451 0 00.037.646.474.474 0 00.66-.037L14.386 8.8l.035-.043.033-.05.013-.05V8.539c0-.012.033-.02.033-.044v-.151l-.014-.05-.019-.03-.034-.045-4.193-4.566a.474.474 0 00-.66-.037.452.452 0 00-.036.646l3.45 3.777H1.963a.46.46 0 00-.464.455.46.46 0 00.464.455z">
</path>
</svg>
</a>
</div>
</div>
</div>
</div>
{% endif %}
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion lemarche/templates/siaes/_card_suggest_tender.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ <h2 class="h3 fr-card__title">Vos sourcing et RFI sont chronophages ?</h2>
</p>
<a href="{% url 'tenders:create' %}"
id="siae-search-insert-tender-create-btn"
class="btn btn-primary btn-sm btn-ico d-block d-md-inline-block mb-2">
class="fr-btn btn-primary btn-sm btn-ico d-block d-md-inline-block mb-2">
<i class="ri-mail-send-line ri-lg"></i>&nbsp;Lancer un sourcing inversé
</a>
</div>
Expand Down
2 changes: 1 addition & 1 deletion lemarche/templates/siaes/_detail_cta.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ <h3 class="fr-card__title">Ce prestataire vous intéresse ?</h3>
</p>

{% if user.is_authenticated %}
<button type="button" id="show_data" class="btn btn-primary btn-block btn-ico" data-toggle="collapse" data-target="#collapseCoordonnees" aria-expanded="false" aria-controls="collapseCoordonnees">
<button type="button" id="show_data" class="fr-btn btn-primary btn-block btn-ico" data-toggle="collapse" data-target="#collapseCoordonnees" aria-expanded="false" aria-controls="collapseCoordonnees">
<i class="ri-mail-send-line"></i>
<span>Accéder aux coordonnées&nbsp;</span>
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" id="collapse__ico-down"><path fill="none" d="M0 0h24v24H0z"/><path fill="currentColor" d="M12 16l-6-6h12z"/></svg>
Expand Down
2 changes: 1 addition & 1 deletion lemarche/templates/siaes/_detail_cta_v2.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ <h3 class="fr-card__title">Ce prestataire vous intéresse ?</h3>
<p>
Contactez gratuitement cette structure et échangez par e-mail avec elle.
</p>
<a href="#" id="show_data-modal-btn" class="btn btn-primary btn-block btn-ico" style="justify-content:center;" data-toggle="modal" data-target="#form_contact_modal" data-next-params="{% url 'siae:detail' siae.slug %}">
<a href="#" id="show_data-modal-btn" class="fr-btn btn-primary btn-block btn-ico" style="justify-content:center;" data-toggle="modal" data-target="#form_contact_modal" data-next-params="{% url 'siae:detail' siae.slug %}">
<i class="ri-mail-send-line"></i>
<span>Contacter la structure</span>
</a>
Expand Down
4 changes: 2 additions & 2 deletions lemarche/templates/siaes/_detail_partner_cta.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
<h2 class="h3 fr-card__title">Vous avez besoin d'être accompagné dans vos achats inclusifs par des partenaires reconnus ?</h2>
<div class="fr-card__desc">
{% if siae.kind_is_esat_or_ea_or_eatt %}
<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">
<a href="{% slugurl "faciltez-vous-les-achats-responsables" %}" target="_blank" id="track_siae_detail_partners_esat_ea" class="fr-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">
<a href="{% url 'pages:partenaires' %}" target="_blank" id="track_siae_detail_partners" class="fr-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>
Expand Down
Loading

0 comments on commit cbdb4b8

Please sign in to comment.