feat: add warning when an is waiting for review
This commit is contained in:
@@ -502,6 +502,12 @@ class AdoptionNotice(models.Model):
|
|||||||
return False
|
return False
|
||||||
return self.adoptionnoticestatus.is_interested
|
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
|
@property
|
||||||
def is_disabled_unchecked(self):
|
def is_disabled_unchecked(self):
|
||||||
if not hasattr(self, 'adoptionnoticestatus'):
|
if not hasattr(self, 'adoptionnoticestatus'):
|
||||||
@@ -615,6 +621,10 @@ class AdoptionNoticeStatus(models.Model):
|
|||||||
def is_closed(self):
|
def is_closed(self):
|
||||||
return self.major_status == self.CLOSED
|
return self.major_status == self.CLOSED
|
||||||
|
|
||||||
|
@property
|
||||||
|
def is_awaiting_action(self):
|
||||||
|
return self.major_status == self.AWAITING_ACTION
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_interested(self):
|
def is_interested(self):
|
||||||
return self.major_status == self.ACTIVE and self.minor_status == "interested"
|
return self.major_status == self.ACTIVE and self.minor_status == "interested"
|
||||||
|
@@ -26,5 +26,18 @@
|
|||||||
{% endblocktranslate %}
|
{% endblocktranslate %}
|
||||||
</div>
|
</div>
|
||||||
</article>
|
</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 %}
|
{% endif %}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user