feat: add warning when an is waiting for review

This commit is contained in:
2025-07-30 06:57:31 +02:00
parent f25c425d85
commit 370ad2ce66
2 changed files with 23 additions and 0 deletions

View File

@@ -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"

View File

@@ -26,5 +26,18 @@
{% endblocktranslate %}
</div>
</article>
{% elif adoption_notice.is_awaiting_action %}
<article class="message is-warning">
<div class="message-header">
<p>{% translate 'Warten auf Aktivierung' %}</p>
</div>
<div class="message-body content">
{% blocktranslate %}
Diese Vermittlung muss noch durch Moderator*innen aktiviert werden und taucht daher nicht auf der
Startseite auf.
Ggf. fehlen noch relevante Informationen.
{% endblocktranslate %}
</div>
</article>
{% endif %}