Skip to content

Commit

Permalink
Siae detail: fix image display, and missing blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
raphodn committed Aug 1, 2024
1 parent 0a79597 commit 6c817b7
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 77 deletions.
145 changes: 76 additions & 69 deletions lemarche/templates/siaes/_card_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<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">
<!-- siae basic info -->
<div class="fr-card__desc">
<div class="fr-col-auto">
{% if siae.logo_url %}
Expand Down Expand Up @@ -93,8 +94,10 @@ <h1>
</div>
{% include "siaes/_useful_infos.html" with siae=siae %}
</div>
<!-- siae details -->
<div class="fr-card__end">
<hr />
<!-- First row : Description -->
<div class="fr-grid-row">
<div class="fr-col-sm-12 img-left">
<div class="il-l">
Expand All @@ -114,58 +117,69 @@ <h3 class="h2 mb-1 mt-1">Présentation du prestataire</h3>
</div>
</div>
</div>
<!-- Second & Third Row : Secteurs, Références -->
<!-- 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" />
<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 %}
{% if user.is_authenticated and user.is_admin %}
{% for activity in siae.activities.all %}
{% include "siaes/_siae_activity_content.html" with activity=activity with_collapse=True %}
{% endfor %}
{% else %}
{% if not siae.sector_count %}
<p>Non renseigné</p>
{% else %}
<ul>
{% siae_sectors_display siae display_max=6 current_search_query=current_search_query output_format='li' %}
</ul>
{% endif %}
{% 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>
{% if siae.client_reference_count %}
<div class="fr-col-sm-6 img-left">
<div class="il-l">
<img src="{% static_theme_images 'ico-bicro-marche-ref-clients.svg' %}" alt="" height="32" />
</div>
<div class="il-r">
<h3 class="h2 mb-1 mt-1">Références clients</h3>
{% if siae.client_reference_count <= 6 %}
<div class="fr-grid-row">
{% for image in siae.client_references.all %}
<div class="fr-col-12 fr-col-sm-4">
<img class="fr-responsive-img" src="{{ image.logo_url }}" alt="{{ image.name }}" />
</div>
{% endfor %}
</div>
{% else %}
<div class="fr-grid-row">
{% for image in siae.client_references.all|slice:":6" %}
<div class="fr-col-12 fr-col-sm-4">
<img class="fr-responsive-img" src="{{ image.logo_url }}" alt="{{ image.name }}" />
</div>
{% endfor %}
</div>
<div id="collapseMoreRefClients" class="collapse">
<div class="fr-grid-row">
{% for image in siae.client_references.all|slice:"6:" %}
<div class="fr-col-12 fr-col-sm-4">
<img class="fr-responsive-img" src="{{ image.logo_url }}" alt="{{ image.name }}" />
</div>
{% endfor %}
</div>
</div>
<a class="mt-3 is-collapse-caret-clients has-collapse-caret collapsed" data-toggle="collapse" href="#collapseMoreRefClients" role="button" aria-expanded="false" aria-controls="collapseMoreRefClients" title="Plus de références clients">de références clients</a>
{% endif %}
</div>
</div>
</div>
{% endif %}
<!-- Fourth Row : Prestations -->
{% endif %}
</div>
<!-- Fourth row : Prestations -->
{% if siae.offer_count %}
<hr />
<div class="fr-grid-row">
Expand All @@ -175,33 +189,24 @@ <h3 class="h2 fr-m-0">C'est votre structure et vous souhaitez modifier ses infor
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 class="il-r">
<h3 class="h2 mb-1 mt-1">Détails des prestations effectuées <small>(matériels, lieux, savoir-faire)</small></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">
<h4>
<img src="{% static 'img/prof_dot.png' %}" alt="" />
<span>{{ offer.name }}</span>
</h4>
<div>{{ offer.description|linebreaks }}</div>
</article>
{% endfor %}
</div>
</div>
</div>
</div>
{% endif %}
<!-- Fifth Row : Réseaux, Labels -->
<!-- Fifth row : Réseaux, Labels -->
{% if siae.network_count or siae.label_count %}
<hr />
<div class="fr-grid-row">
Expand Down Expand Up @@ -240,14 +245,16 @@ <h3 class="h2 mb-1 mt-1">Réseaux</h3>
<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 %}
{% for label in siae.labels_old.all %}
<li>{{ label.name }}</li>
{% endfor %}
</ul>
</div>
</div>
{% endif %}
</div>
{% endif %}
<!-- Sixth Row : Réalisations -->
<!-- Sixth row : Réalisations -->
{% if siae.images.count %}
<hr />
<div class="fr-grid-row">
Expand All @@ -262,12 +269,12 @@ <h3 class="h2 mb-1 mt-1">Nos réalisations</h3>
</div>
</div>
</div>
<div id="image-grid" class="fr-grid-row">
<div class="fr-grid-row">
{% for image in siae.images.all %}
<div class="fr-col-12 fr-col-sm-4 pb-3">
<div class="fr-col-12 fr-col-sm-4">
<!-- 3 per row -->
<img src="{{ image.image_url }}"
class="img-fluid"
class="fr-responsive-img"
title="{{ image.name|default:'' }}"
loading="lazy" />
</div>
Expand All @@ -280,7 +287,7 @@ <h3 class="h2 mb-1 mt-1">Nos réalisations</h3>
<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>
<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' %}"
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
@@ -1,7 +1,7 @@
<div class="fr-card">
<div class="fr-card__body">
<div class="fr-card__content">
<h2>Vos sourcing et RFI sont chronophages ?</h2>
<h3 class="fr-card__title">Vos sourcing et RFI sont chronophages ?</h3>
<div class="fr-card__desc">
<div class="fr-grid-row">
<div class="fr-col-md">
Expand Down
2 changes: 1 addition & 1 deletion lemarche/templates/siaes/_detail_admin_extra_info.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="fr-card alert-warning">
<div class="fr-card__body">
<div class="fr-card__content">
<h2 class="h3 fr-card__title">Informations Admin</h2>
<h3 class="fr-card__title">Informations Admin</h3>
<div class="fr-card__desc">
<div class="fr-grid-row">
<div class="fr-col-12">
Expand Down
2 changes: 0 additions & 2 deletions lemarche/templates/siaes/_detail_cta.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@
<div class="fr-card__body">
<div class="fr-card__content">
<h3 class="fr-card__title">Ce prestataire vous intéresse ?</h3>

<div class="fr-card__desc">
<p>
Accédez gratuitement aux coordonnées de ce prestataire
afin de prendre contact avec leur responsable commerciale.
</p>

{% if user.is_authenticated %}
<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>
Expand Down
2 changes: 1 addition & 1 deletion lemarche/templates/siaes/_detail_partner_cta.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div class="fr-card">
<div class="fr-card__body">
<div class="fr-card__content">
<h2 class="h3 fr-card__title">Vous avez besoin d'être accompagné dans vos achats inclusifs par des partenaires reconnus ?</h2>
<h3 class="fr-card__title">Vous avez besoin d'être accompagné dans vos achats inclusifs par des partenaires reconnus ?</h3>
<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="fr-btn btn-sm btn-outline-primary btn-ico">
Expand Down
4 changes: 1 addition & 3 deletions lemarche/templates/siaes/detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,8 @@
<div class="fr-container">
<div class="fr-grid-row fr-grid-row--gutters">
<div class="fr-col-12 fr-col-md-8">
<!-- siae basic info -->
<!-- siae basic info & details -->
{% include "siaes/_card_detail.html" with siae=siae %}
<!-- siae details -->
<!-- First fr-grid-row : Description -->
</div>
<div class="fr-col-12 fr-col-md-4">
<!-- profile-detail sidebar -->
Expand Down

0 comments on commit 6c817b7

Please sign in to comment.