Skip to content

Commit

Permalink
integrate all infos
Browse files Browse the repository at this point in the history
  • Loading branch information
madjid-asa committed Jul 24, 2024
1 parent 3fa7e5d commit a55947a
Showing 1 changed file with 81 additions and 7 deletions.
88 changes: 81 additions & 7 deletions lemarche/templates/siaes/_card_search_result.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,97 @@
<div class="fr-card__body">
<div class="fr-card__content">
<h3 class="fr-card__title">
<a href="#">{{ siae.name_display }}</a>
<a href="{% url 'siae:detail' siae.slug %}">{{ siae.name_display }}</a>
</h3>
<p class="fr-card__desc">
<span class="fr-tag">{{ siae.get_kind_display }}</span>
Lorem [...] elit ut.
</p>
<div class="fr-card__desc">
<p>
<span class="fr-tag">{{ siae.get_kind_display }}</span>
{{ siae.presta_type_display }}
</p>
<div class="fr-grid-row">
<div class="fr-col-1 fr-pr-2w">
{% if siae.logo_url %}
<img src="{{ siae.logo_url }}"
class="fr-responsive-img"
alt="Logo de la structure {{ siae.name }}"
loading="lazy" />
{% else %}
<img src="{% static 'img/default-listing.png' %}"
class="fr-responsive-img"
alt="{{ siae.name }}"
loading="lazy" />
{% endif %}
</div>
<div class="fr-col-11">
<p>{% siae_sectors_display siae display_max=3 current_search_query=current_search_query %}</p>
</div>
</div>
</div>
<div class="fr-card__start">
<ul class="fr-tags-group lemarche--align-right">
<li>{% include "includes/_super_badge.html" with siae=siae %}</li>
{% if siae.is_qpv %}
<li>
<span class="fr-tag"
title="Quartier prioritaire de la politique de la ville">QPV</span>
</li>
{% endif %}
{% if siae.is_zrr %}
<li>
<span class="fr-tag" title="Zone de revitalisation rurale">ZRR</span>
</li>
{% endif %}
{% comment %} favorites {% endcomment %}
<li>
<p class="fr-tag">label tag</p>
{% if user.is_authenticated %}
{% if from_profile or siae.in_user_favorite_list_count_annotated %}
<a href="#"
id="favorite-remove-modal-btn"
class="btn btn-favorite"
data-toggle="modal"
data-target="#favorite_item_remove_modal"
data-siae-id="{{ siae.id }}"
data-siae-slug="{{ siae.slug }}"
data-siae-name-display="{{ siae.name_display }}"
title="Dans votre liste d'achat">
<i class="ri-star-fill ri-xl"></i>
</a>
{% else %}
<a href="#"
id="favorite-add-modal-btn"
class="btn btn-favorite"
data-toggle="modal"
data-target="#favorite_item_add_modal"
data-siae-id="{{ siae.id }}"
data-siae-slug="{{ siae.slug }}"
data-siae-name-display="{{ siae.name_display }}"
title="Ajouter à votre liste d'achat">
<i class="ri-star-line ri-xl"></i>
</a>
{% endif %}
{% else %}
<a href="#"
id="favorite-modal-btn"
class="btn btn-favorite"
data-toggle="modal"
data-target="#login_or_signup_modal"
data-next-params="{% url 'siae:search_results' %}?{{ current_search_query_escaped }}"
title="Ajouter à votre liste d'achat">
<i class="ri-star-line ri-xl"></i>
</a>
{% endif %}
</li>
</ul>
</div>
<div class="fr-card__end">
<p class="fr-mt-0">
<i class="fr-icon-map-pin-2-line" aria-hidden="true"></i>
<span class="sr-only">{{ siae.city }}</span>
<i class="fr-icon-map-pin-2-line fr-ml-2w" aria-hidden="true"></i>
<span>{{ siae.geo_range_pretty_display }}</span>
</p>
{% if user.is_authenticated and user.is_admin and not siae.user_count %}
<p class="fr-card__detail fr-icon-warning-fill">pas encore inscrite</p>
<p class="fr-card__detail fr-icon-warning-fill fr-mt-3w">pas encore inscrite</p>
{% endif %}
</div>
</div>
Expand Down

0 comments on commit a55947a

Please sign in to comment.