Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
thalia
concrexit
Commits
2e6f1ce5
Commit
2e6f1ce5
authored
Jul 04, 2018
by
Tom van Bussel
Browse files
Fix conditions for showing presence and payment
on the event page
parent
2092340a
Changes
2
Hide whitespace changes
Inline
Side-by-side
website/events/models.py
View file @
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
)
...
...
website/events/templates/events/event.html
View file @
2e6f1ce5
...
...
@@ -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>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment