From 370ad2ce66f0a9001ff6aca9c448f201779afcb8 Mon Sep 17 00:00:00 2001 From: moanos Date: Wed, 30 Jul 2025 06:57:31 +0200 Subject: [PATCH] feat: add warning when an is waiting for review --- src/fellchensammlung/models.py | 10 ++++++++++ .../partials/partial-adoption-notice-status.html | 13 +++++++++++++ 2 files changed, 23 insertions(+) diff --git a/src/fellchensammlung/models.py b/src/fellchensammlung/models.py index 458bbbf..765a4c0 100644 --- a/src/fellchensammlung/models.py +++ b/src/fellchensammlung/models.py @@ -502,6 +502,12 @@ class AdoptionNotice(models.Model): return False return self.adoptionnoticestatus.is_interested + @property + def is_awaiting_action(self): + if not hasattr(self, 'adoptionnoticestatus'): + return False + return self.adoptionnoticestatus.is_awaiting_action + @property def is_disabled_unchecked(self): if not hasattr(self, 'adoptionnoticestatus'): @@ -615,6 +621,10 @@ class AdoptionNoticeStatus(models.Model): def is_closed(self): return self.major_status == self.CLOSED + @property + def is_awaiting_action(self): + return self.major_status == self.AWAITING_ACTION + @property def is_interested(self): return self.major_status == self.ACTIVE and self.minor_status == "interested" diff --git a/src/fellchensammlung/templates/fellchensammlung/partials/partial-adoption-notice-status.html b/src/fellchensammlung/templates/fellchensammlung/partials/partial-adoption-notice-status.html index bb3355e..4d7eaff 100644 --- a/src/fellchensammlung/templates/fellchensammlung/partials/partial-adoption-notice-status.html +++ b/src/fellchensammlung/templates/fellchensammlung/partials/partial-adoption-notice-status.html @@ -26,5 +26,18 @@ {% endblocktranslate %} +{% elif adoption_notice.is_awaiting_action %} +
+
+

{% translate 'Warten auf Aktivierung' %}

+
+
+ {% blocktranslate %} + Diese Vermittlung muss noch durch Moderator*innen aktiviert werden und taucht daher nicht auf der + Startseite auf. + Ggf. fehlen noch relevante Informationen. + {% endblocktranslate %} +
+
{% endif %}