Skip to content

Commit

Permalink
Fix bill list name based sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
joneskoo committed Nov 7, 2015
1 parent ae119e4 commit 33c10e8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion membership/templates/membership/bill_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<ul id="billlist">
<li class="list_header">
<span class="name"><a href="{% sorturl "name" %}">{% trans "Member"|capfirst %}</a></span>
<span class="name"><a href="{% sorturl "bill_name" %}">{% trans "Member"|capfirst %}</a></span>
<span class="cycle">
<a href="{% sorturl "cycle" %}">{% trans "Cycle" %}</a>
</span>
Expand Down
4 changes: 4 additions & 0 deletions membership/templatetags/sorturl.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@
sort_cycles = {
'id': ['id', '-id'],
'status': ['status', '-status'],
'bill_name': ['membership__person__first_name',
'membership__person__last_name',
'-membership__person__first_name',
'-membership__person__last_name'],
'name': ['person__first_name', 'person__last_name', '-person__first_name', '-person__last_name'],
'payer_name': ['payer_name', '-payer_name'],
'amount': ['amount', '-amount'],
Expand Down

0 comments on commit 33c10e8

Please sign in to comment.