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
ef42e22e
Verified
Commit
ef42e22e
authored
Jul 09, 2018
by
Sébastiaan Versteeg
Browse files
Fix sorting of registration dates in event admin
parent
bc470873
Changes
2
Hide whitespace changes
Inline
Side-by-side
website/events/static/events/js/admin.js
View file @
ef42e22e
...
...
@@ -57,6 +57,17 @@ django.jQuery(function () {
type
:
"
numeric
"
});
$
.
tablesorter
.
addParser
({
id
:
"
date
"
,
is
:
function
(
s
)
{
return
false
;
},
format
:
function
(
s
,
t
,
node
)
{
return
$
(
node
).
attr
(
"
data-sortval
"
);
},
type
:
"
text
"
});
$
(
"
table
"
).
tablesorter
({
sortList
:
[[
1
,
0
]],
cssHeader
:
'
sortable
'
,
...
...
website/events/templates/events/admin/registrations_table.html
View file @
ef42e22e
...
...
@@ -4,9 +4,9 @@
<thead>
<tr>
<th
scope=
"col"
>
{% trans "name"|capfirst %}
<span
class=
"toggle"
></span></th>
<th
scope=
"col"
>
{% trans "registration date"|capfirst %}
<span
class=
"toggle"
></span></th>
<th
scope=
"col"
data-meta=
"{sorter: 'date'}"
>
{% trans "registration date"|capfirst %}
<span
class=
"toggle"
></span></th>
{% if cancellations %}
<th
scope=
"col"
>
{% trans "cancellation date"|capfirst %}
<span
class=
"toggle"
></span></th>
<th
scope=
"col"
data-meta=
"{sorter: 'date'}"
>
{% trans "cancellation date"|capfirst %}
<span
class=
"toggle"
></span></th>
{% endif %}
{% for field in fields %}
<th
scope=
"col"
>
{{ field.name }}
<span
class=
"toggle"
></span></th>
...
...
@@ -37,9 +37,9 @@
{% else %}
<td>
{{ registration.name }}
</td>
{% endif %}
<td>
{{ registration.date }}
</td>
<td
data-sortval=
"{{ registration.date|date:'c' }}"
>
{{ registration.date }}
</td>
{% if cancellations %}
<td>
{{ registration.date_cancelled }}
</td>
<td
data-sortval=
"{{ registration.date|date:'c' }}"
>
{{ registration.date_cancelled }}
</td>
{% endif %}
{% for field in registration.information_fields %}
{% if not field.value %}
...
...
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