- Déjà {{ tender.siae_detail_display_date_count_all }} prestataire{{ tender.siae_detail_display_date_count_all|pluralize }} inclusif{{ tender.siae_detail_display_date_count_all|pluralize }}
- {{ tender.siae_detail_display_date_count_all|pluralize:"a,ont" }} vu le besoin de ce client.
+ Déjà {{ tender.siae_email_link_click_date_or_detail_display_date_count }} prestataire{{ tender.siae_email_link_click_date_or_detail_display_date_count|pluralize }} inclusif{{ tender.siae_email_link_click_date_or_detail_display_date_count|pluralize }}
+ {{ tender.siae_email_link_click_date_or_detail_display_date_count|pluralize:"a,ont" }} vu le besoin de ce client.
{% endif %}
diff --git a/lemarche/tenders/admin.py b/lemarche/tenders/admin.py
index 4a4119d62..e2cc5286b 100644
--- a/lemarche/tenders/admin.py
+++ b/lemarche/tenders/admin.py
@@ -133,6 +133,7 @@ class TenderAdmin(FieldsetsInlineMixin, admin.ModelAdmin):
# "siae_email_send_count_with_link",
"siae_email_link_click_count_with_link",
"siae_detail_display_count_with_link",
+ # "siae_email_link_click_or_detail_display_count_with_link",
"siae_detail_contact_click_count_with_link",
"siae_transactioned",
"created_at",
@@ -176,6 +177,7 @@ class TenderAdmin(FieldsetsInlineMixin, admin.ModelAdmin):
"siae_email_send_count_with_link",
"siae_email_link_click_count_with_link",
"siae_detail_display_count_with_link",
+ "siae_email_link_click_or_detail_display_count_with_link",
"siae_detail_contact_click_count_with_link",
"logs_display",
"extra_data_display",
@@ -281,6 +283,7 @@ class TenderAdmin(FieldsetsInlineMixin, admin.ModelAdmin):
"siae_email_send_count_with_link",
"siae_email_link_click_count_with_link",
"siae_detail_display_count_with_link",
+ "siae_email_link_click_or_detail_display_count_with_link",
"siae_detail_contact_click_count_with_link",
)
},
@@ -446,6 +449,20 @@ def siae_detail_display_count_with_link(self, tender):
siae_detail_display_count_with_link.short_description = "S. vues"
siae_detail_display_count_with_link.admin_order_field = "siae_detail_display_count"
+ def siae_email_link_click_or_detail_display_count_with_link(self, tender):
+ url = (
+ reverse("admin:siaes_siae_changelist")
+ + f"?tenders__in={tender.id}&tendersiae__detail_display_date__isnull=False"
+ )
+ return format_html(
+ f'