Verified Commit e9511f9d authored by Tom van Bussel's avatar Tom van Bussel Committed by Sébastiaan Versteeg
Browse files

Fix conditions for showing presence and payment

on the event page
parent 94b86635
......@@ -354,6 +354,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