Skip to content

Commit

Permalink
fix the closed badge
Browse files Browse the repository at this point in the history
  • Loading branch information
madjid-asa committed Mar 13, 2024
1 parent 14c2e05 commit f3fa1b7
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 21 deletions.
24 changes: 20 additions & 4 deletions lemarche/templates/tenders/_closed_badge.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,20 @@
<span class="badge badge-xs badge-base badge-pill badge-{{ tender.kind|lower }}">
{{ tender_kind_display|default:tender.get_kind_display }} clôturé{% if tender.kind == "QUOTE" %}e{% endif %}
le {{ tender.deadline_date|default:"" }}
</span>
<p class="mb-1">
{% if tender.deadline_date_is_outdated_annotated %}
<span class="badge badge-xs badge-base badge-pill badge-{{ tender.kind|lower }}">
{{ tender_kind_display|default:tender.get_kind_display }} clôturé{% if tender.kind == "QUOTE" %}e{% endif %}
le {{ tender.deadline_date|default:"" }}
</span>
{% else %}
<span class="badge badge-base badge-pill mr-1 badge-{{ tender.kind|lower }}">
{% if tender.kind == "PROJ" %}
{{ title_kind_sourcing_siae|default:tender.get_kind_display }}
{% else %}
{{ tender.get_kind_display }}
{% endif %}
</span>
Disponible <strong>jusqu'au : {{ tender.deadline_date|default:"" }}</strong>
{% if not tender.tendersiae_set.first.detail_display_date %}
<span class="float-right badge badge-sm badge-pill badge-new">Nouveau</span>
{% endif %}
{% endif %}
</p>
19 changes: 2 additions & 17 deletions lemarche/templates/tenders/_list_item_siae.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,8 @@
<div class="card-body">
<div class="row">
<div class="col-md-12">
<p class="mb-1">
{% if tender.deadline_date_is_outdated_annotated %}
<span class="badge badge-sm badge-base badge-pill badge-nuance-08">Clôturé le {{ tender.deadline_date|default:"" }}</span>
{% else %}
<span class="badge badge-base badge-pill mr-1 badge-{{ tender.kind|lower }}">
{% if tender.kind == "PROJ" %}
{{ title_kind_sourcing_siae|default:tender.get_kind_display }}
{% else %}
{{ tender.get_kind_display }}
{% endif %}
</span>
Disponible <strong>jusqu'au : {{ tender.deadline_date|default:"" }}</strong>
{% if not tender.tendersiae_set.first.detail_display_date %}
<span class="float-right badge badge-sm badge-pill badge-new">Nouveau</span>
{% endif %}
{% endif %}
</p>
{% include "tenders/_closed_badge.html" with tender=tender %}

</div>
</div>

Expand Down

0 comments on commit f3fa1b7

Please sign in to comment.