Skip to content
GitLab
Menu
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
d0321a6e
Verified
Commit
d0321a6e
authored
Oct 11, 2017
by
Sébastiaan Versteeg
Browse files
Fix events table values in admin
parent
10d422fd
Changes
4
Show whitespace changes
Inline
Side-by-side
website/events/locale/nl/LC_MESSAGES/django.mo
View file @
d0321a6e
No preview for this file type
website/events/locale/nl/LC_MESSAGES/django.po
View file @
d0321a6e
...
...
@@ -301,7 +301,7 @@ msgstr "Niet betaald"
#: models.py:266
msgid "Paid with cash"
msgstr "Conta
c
t betaald"
msgstr "Conta
n
t betaald"
#: models.py:267
msgid "Paid with card"
...
...
@@ -504,7 +504,7 @@ msgstr "niet betaald"
#: templates/events/admin/registrations_table.html:13
msgid "paid cash"
msgstr "conta
c
t betaald"
msgstr "conta
n
t betaald"
#: templates/events/admin/registrations_table.html:14
msgid "paid card"
...
...
website/events/models.py
View file @
d0321a6e
...
...
@@ -161,11 +161,15 @@ class Event(models.Model, metaclass=ModelTranslateMeta):
@
property
def
participants
(
self
):
if
self
.
max_participants
is
not
None
:
return
self
.
registrations
.
order_by
(
'date'
)[:
self
.
max_participants
]
return
self
.
registrations
.
order_by
(
'date'
)
@
property
def
queue
(
self
):
if
self
.
max_participants
is
not
None
:
return
self
.
registrations
.
order_by
(
'date'
)[
self
.
max_participants
:]
return
[]
@
property
def
cancellations
(
self
):
...
...
website/events/templates/events/admin/details.html
View file @
d0321a6e
...
...
@@ -35,9 +35,9 @@
<div
class=
"module"
>
{% with event.registrationinformationfield_set.all as fields %}
<h2>
{% trans "registrations"|capfirst %}
</h2>
{% include 'events/admin/registrations_table.html' with registrations=event.
registration
s %}
{% include 'events/admin/registrations_table.html' with registrations=event.
participant
s %}
<br>
{% if
waiting
%}
{% if
event.queue.count > 0
%}
<h2>
{% trans "waiting"|capfirst %}
</h2>
{% trans "queued" as queued %}
{% include 'events/admin/registrations_table.html' with registrations=event.queue verb=queued addlink=False %}
...
...
@@ -87,7 +87,7 @@
{% endif %}
<dt>
{% trans "number of registrations"|capfirst %}
</dt>
<dd>
{% blocktrans count counter=registrations|length trimmed %}
{% blocktrans count counter=
event.
registrations|length trimmed %}
{{ counter }} registration
{% plural %}
{{ counter }} registrations
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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