Commit 700a5baf authored by Sébastiaan Versteeg's avatar Sébastiaan Versteeg
Browse files

Merge branch 'fix/presence-payment' into 'master'

Fix conditions for showing presence and payment on the event page

See merge request !845
parents 2092340a 2e6f1ce5
......@@ -404,6 +404,11 @@ class Registration(models.Model):
pass
return 0
@property
def is_invited(self):
return (self.is_registered and
self.queue_position == 0)
def is_external(self):
return bool(self.name)
......
......@@ -89,30 +89,32 @@
</td>
</tr>
{% endif %}
{% endif %}
{% if registration and event.start < date_now %}
<tr>
<th>{% trans "presence"|capfirst %}</th>
<td>
{% if registration.present %}
{% trans "You were present" %}
{% else %}
{% trans "You were not present" %}
{% endif %}
</td>
</tr>
{% endif %}
{% if event.price > 0 %}
<tr>
<th>{% trans "payment status"|capfirst %}</th>
<td>
{% if registration.is_paid %}
{% trans "You have paid" %}
{% else %}
{% trans "You have not paid yet" %}
{% endif %}
</td>
</tr>
{% if registration.is_invited %}
{% if event.start < date_now %}
<tr>
<th>{% trans "presence"|capfirst %}</th>
<td>
{% if registration.present %}
{% trans "You were present" %}
{% else %}
{% trans "You were not present" %}
{% endif %}
</td>
</tr>
{% endif %}
{% if event.price > 0 %}
<tr>
<th>{% trans "payment status"|capfirst %}</th>
<td>
{% if registration.is_paid %}
{% trans "You have paid" %}
{% else %}
{% trans "You have not paid yet" %}
{% endif %}
</td>
</tr>
{% endif %}
{% endif %}
{% endif %}
<tr>
<td></td>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment