From c598a212b8356da72fe8e472152a01245bc8b6f9 Mon Sep 17 00:00:00 2001 From: Raphael Odini Date: Mon, 16 Oct 2023 16:47:48 +0200 Subject: [PATCH] =?UTF-8?q?[D=C3=A9p=C3=B4t=20de=20besoin]=20R=C3=A9pare?= =?UTF-8?q?=20l'affichage=20(ou=20pas)=20du=20montant=20(#944)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Refactor tender detail row in seperate template * Add tests on amount visibility --- .../tenders/_list_item_detail_row.html | 28 +++++++++ .../templates/tenders/_list_item_network.html | 60 +++++++------------ .../templates/tenders/_list_item_siae.html | 29 +-------- lemarche/www/dashboard_networks/tests.py | 6 +- lemarche/www/tenders/tests.py | 9 ++- 5 files changed, 62 insertions(+), 70 deletions(-) create mode 100644 lemarche/templates/tenders/_list_item_detail_row.html diff --git a/lemarche/templates/tenders/_list_item_detail_row.html b/lemarche/templates/tenders/_list_item_detail_row.html new file mode 100644 index 000000000..248da605f --- /dev/null +++ b/lemarche/templates/tenders/_list_item_detail_row.html @@ -0,0 +1,28 @@ +{% load get_verbose_name %} + +
+ {% if tender.contact_company_name_display %} +
+ + {{ tender.contact_company_name_display }} +
+ {% endif %} +
+ {% if tender.perimeters_list_string %} + + {{ tender.location_display|safe }} + {% endif %} +
+
+ {% if tender.sectors.count %} + + {{ tender.sectors_list_string|safe }} + {% endif %} +
+ {% if tender.accept_share_amount %} +
+ + {{ tender.get_amount_display|default:"-" }} +
+ {% endif %} +
diff --git a/lemarche/templates/tenders/_list_item_network.html b/lemarche/templates/tenders/_list_item_network.html index 540f12f29..147904f8b 100644 --- a/lemarche/templates/tenders/_list_item_network.html +++ b/lemarche/templates/tenders/_list_item_network.html @@ -1,54 +1,34 @@ -{% load static humanize get_verbose_name %} +{% load static humanize %}