Skip to content

Commit

Permalink
fix: Affichage du détail du dépôt de besoin (#1515)
Browse files Browse the repository at this point in the history
  • Loading branch information
madjid-asa authored Nov 13, 2024
1 parent 21e97c4 commit b0b3a70
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 43 deletions.
8 changes: 8 additions & 0 deletions lemarche/static/itou_marche/itou_marche.scss
Original file line number Diff line number Diff line change
Expand Up @@ -204,3 +204,11 @@ ul.summary-grid-list {
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
padding: 8px;
}

.text-center {
text-align: center;
}

.bg-gray {
background-color: var(--g300);
}
18 changes: 11 additions & 7 deletions lemarche/templates/layouts/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
{% if SITE_CONFIG.mourning %}data-fr-mourning{% endif %}>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<meta name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no" />
{% dsfr_favicon %}
{% dsfr_css %}
{% compress css %}
Expand All @@ -25,7 +26,11 @@
{% block extra_css %}
{% endblock extra_css %}
{% block title %}
<title>{% block page_title %}— Le marché de l'inclusion{% endblock page_title %}</title>
<title>
{% block page_title %}
— Le marché de l'inclusion
{% endblock page_title %}
</title>
{% endblock title %}
{% block meta_description %}
<meta name="description"
Expand All @@ -46,12 +51,10 @@
{% if SITE_CONFIG.notice %}
{% dsfr_notice title=SITE_CONFIG.notice %}
{% endif %}

{% block breadcrumb %}
{% comment %} empty because managed for each type of page {% endcomment %}
{% comment %} empty because managed for each type of page {% endcomment %}
{% endblock breadcrumb %}

<main id="content" role="main">
<main id="content" class="fr-mb-6w" role="main">
{% block messages %}
{% dsfr_django_messages wrapper_classes="fr-container fr-my-4v" %}
{% endblock messages %}
Expand All @@ -74,7 +77,8 @@
src="{% static 'vendor/alphagov-accessible-autocomplete-2.0.3/accessible-autocomplete.min.js' %}"></script>
<script type="text/javascript"
src="{% static 'vendor/leaflet-1.7.1/leaflet.js' %}"></script>
<script type="text/javascript" src="{% static 'vendor/htmx-1.9.12/htmx.min.js' %}"></script>
<script type="text/javascript"
src="{% static 'vendor/htmx-1.9.12/htmx.min.js' %}"></script>
<script type="text/javascript" src="{% static 'js/utils.js'%}"></script>
{% if BITOUBI_ENV not in "dev" %}
{% include "includes/_tracker_tarteaucitron.html" %}
Expand Down
12 changes: 5 additions & 7 deletions lemarche/templates/tenders/_closed_badge.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<span>
{% if tender.deadline_date_is_outdated_annotated %}
<p class="fr-badge fr-badge--sm">
{{ tender_kind_display|default:tender.get_kind_display }} clôturé{% if tender.kind == "QUOTE" %}e{% endif %}
{% if tender.deadline_date_is_outdated_annotated or tender.deadline_date_outdated %}
<p class="fr-badge fr-badge--sm fr-badge--warning">
{{ tender_kind_display|default:tender.get_kind_display }}
clôturé{% if tender.kind == "QUOTE" %}e{% endif %}
le {{ tender.deadline_date|default:"" }}
</p>
{% else %}
Expand All @@ -12,9 +13,6 @@
{{ tender.get_kind_display }}
{% endif %}
</p>
Disponible <strong>jusqu'au : {{ tender.deadline_date|default:"" }}</strong>
{% if is_new_for_siaes %}
<p class="fr-badge fr-badge--sm fr-badge--green-emeraude">Nouveau</p>
{% endif %}
{% if is_new_for_siaes %}<p class="fr-badge fr-badge--sm fr-badge--green-emeraude">Nouveau</p>{% endif %}
{% endif %}
</span>
58 changes: 29 additions & 29 deletions lemarche/templates/tenders/_detail_card.html
Original file line number Diff line number Diff line change
@@ -1,21 +1,7 @@
{% load static humanize %}

<div class="fr-card">
<div class="fr-card fr-mb-2w">
<div class="fr-card__body fr-py-4w">
<div class="fr-grid-row">
<div class="fr-col-md-12">
{% include "tenders/_closed_badge.html" with tender=tender is_new_for_siaes=is_new_for_siaes %}
</div>
</div>
<!-- title & header -->
<div class="fr-grid-row">
<div class="fr-col-md-12">
<h1>
{{ tender.title }}
</h1>
</div>
</div>
<div class="fr-grid-row text-bold">
<div class="fr-grid-row text-center bg-gray fr-text--xs fr-py-2w">
{% if tender.contact_company_name_display %}
<div class="fr-col-md-4" title="Entreprise">
<span class="fr-icon-building-line" aria-hidden="true"></span>
Expand All @@ -26,37 +12,51 @@ <h1>
<span class="fr-icon-map-pin-2-line" aria-hidden="true"></span>
{{ tender.location_display|safe }}
</div>
<div class="fr-col-md-4" title="Secteurs d'activité : {{ tender.sectors_full_list_string|safe }}">
<div class="fr-col-md-4"
title="Secteurs d'activité : {{ tender.sectors_full_list_string|safe }}">
<span class="fr-icon-award-line" aria-hidden="true"></span>
{{ tender.sectors_list_string|safe }}
</div>
</div>
<div class="fr-grid-row fr-py-2w">
<div class="fr-col-md-12">
{% include "tenders/_closed_badge.html" with tender=tender is_new_for_siaes=is_new_for_siaes %}
</div>
</div>
<!-- title & header -->
<div class="fr-grid-row">
<div class="fr-col-md-12">
<h1>{{ tender.title }}</h1>
</div>
</div>
<!-- contact details -->
{% if not source_form %}
{% if user.is_authenticated %}
{% if user == tender.author %}
<hr class="fr-my-4w">
<hr>
{% include "tenders/_detail_contact.html" with tender=tender %}
{% elif user_partner_can_display_tender_contact_details %}
<hr class="fr-my-4w">
<hr>
{% include "tenders/_detail_contact.html" with tender=tender %}
{% elif siae_has_detail_contact_click_date and not tender.deadline_date_outdated %}
<!-- for SIAE, contact details are displayed above (see tenders/detail.html) -->
{% endif %}
{% endif %}
{% endif %}
<!-- tender description -->
<hr class="fr-my-4w">
<h2>
Description
</h2>
{% if tender.start_working_date %}
<p class="fr-text--sm">Début d'intervention : {{ tender.start_working_date }}</p>
<p class="fr-text--sm">
{% if tender.deadline_date_is_outdated_annotated or not tender.deadline_date_outdated %}
Disponible <strong>jusqu'au {{ tender.deadline_date|default:"" }}</strong>
<br>
{% endif %}
Début d'intervention : {{ tender.start_working_date }}
</p>
{% endif %}
<p>{{ tender.description|safe|linebreaks }}</p>
<p>{{ tender.description|safe }}</p>
<!-- tender questions -->
{% if source_form or not source_form and tender.questions_list|length %}
<hr class="fr-my-4w">
<hr>
<h2>
{% if source_form or user == tender.author %}
Questions à poser aux prestataires ciblés
Expand All @@ -70,13 +70,13 @@ <h2>
{% endif %}
<!-- tender constraints -->
{% if tender.constraints %}
<hr class="fr-my-4w">
<hr>
<h2>Comment répondre à cette demande ?</h2>
<p>{{ tender.constraints|default:"-"|safe|linebreaks }}</p>
<p>{{ tender.constraints|safe }}</p>
{% endif %}
<!-- tender amount -->
{% if source_form or user == tender.author or tender.accept_share_amount %}
<hr class="fr-my-4w">
<hr>
<h2>
{% if source_form or user == tender.author %}
Montant du marché
Expand Down

0 comments on commit b0b3a70

Please sign in to comment.