feat: add warning when someone is interested
This commit is contained in:
@@ -496,6 +496,12 @@ class AdoptionNotice(models.Model):
|
|||||||
return False
|
return False
|
||||||
return self.adoptionnoticestatus.is_closed
|
return self.adoptionnoticestatus.is_closed
|
||||||
|
|
||||||
|
@property
|
||||||
|
def is_interested(self):
|
||||||
|
if not hasattr(self, 'adoptionnoticestatus'):
|
||||||
|
return False
|
||||||
|
return self.adoptionnoticestatus.is_interested
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_disabled_unchecked(self):
|
def is_disabled_unchecked(self):
|
||||||
if not hasattr(self, 'adoptionnoticestatus'):
|
if not hasattr(self, 'adoptionnoticestatus'):
|
||||||
@@ -609,6 +615,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_interested(self):
|
||||||
|
return self.major_status == self.ACTIVE and self.minor_status == "interested"
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def is_disabled_unchecked(self):
|
def is_disabled_unchecked(self):
|
||||||
return self.major_status == self.DISABLED and self.minor_status == "unchecked"
|
return self.major_status == self.DISABLED and self.minor_status == "unchecked"
|
||||||
|
@@ -26,20 +26,7 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
{% if adoption_notice.is_closed %}
|
{% include "fellchensammlung/partials/partial-adoption-notice-status.html" %}
|
||||||
<article class="message is-warning">
|
|
||||||
<div class="message-header">
|
|
||||||
<p>{% translate 'Vermittlung deaktiviert' %}</p>
|
|
||||||
</div>
|
|
||||||
<div class="message-body content">
|
|
||||||
{% blocktranslate %}
|
|
||||||
Diese Vermittlung wurde deaktiviert. Typischerweise passiert das, wenn die Tiere erfolgreich
|
|
||||||
vermittelt wurden.
|
|
||||||
In den Kommentaren findest du ggf. mehr Informationen.
|
|
||||||
{% endblocktranslate %}
|
|
||||||
</div>
|
|
||||||
</article>
|
|
||||||
{% endif %}
|
|
||||||
<div class="columns">
|
<div class="columns">
|
||||||
<div class="column is-two-thirds">
|
<div class="column is-two-thirds">
|
||||||
<!--- Title level (including action dropdown) -->
|
<!--- Title level (including action dropdown) -->
|
||||||
|
@@ -0,0 +1,30 @@
|
|||||||
|
{% load custom_tags %}
|
||||||
|
{% load i18n %}
|
||||||
|
|
||||||
|
{% if adoption_notice.is_closed %}
|
||||||
|
<article class="message is-warning">
|
||||||
|
<div class="message-header">
|
||||||
|
<p>{% translate 'Vermittlung deaktiviert' %}</p>
|
||||||
|
</div>
|
||||||
|
<div class="message-body content">
|
||||||
|
{% blocktranslate %}
|
||||||
|
Diese Vermittlung wurde deaktiviert. Typischerweise passiert das, wenn die Tiere erfolgreich
|
||||||
|
vermittelt wurden.
|
||||||
|
In den Kommentaren findest du ggf. mehr Informationen.
|
||||||
|
{% endblocktranslate %}
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
|
{% elif adoption_notice.is_interested %}
|
||||||
|
<article class="message is-info">
|
||||||
|
<div class="message-header">
|
||||||
|
<p>{% translate 'Tiere sind reserviert' %}</p>
|
||||||
|
</div>
|
||||||
|
<div class="message-body content">
|
||||||
|
{% blocktranslate %}
|
||||||
|
Diese Tiere sind bereits reserviert.
|
||||||
|
In den Kommentaren findest du ggf. mehr Informationen.
|
||||||
|
{% endblocktranslate %}
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
|
{% endif %}
|
||||||
|
|
Reference in New Issue
Block a user