Make user table in admin sortable via table headers
new GET param for /admin/user: 'o' value is db table to order by. values are limited by script. invalid values are discarded. preped with '-' to order descending. show unicode arrows in table headers to visually indicate sorting.
This commit is contained in:
parent
01a491c783
commit
6734aa5c28
3 changed files with 72 additions and 5 deletions
|
@ -54,7 +54,21 @@
|
|||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
{{foreach $th_users as $th}}<th>{{$th}}</th>{{/foreach}}
|
||||
{{foreach $th_users as $th}}
|
||||
<th>
|
||||
<a href="{{$baseurl}}/admin/users/?o={{if $order_direction_users == "+"}}-{{/if}}{{$th.1}}">
|
||||
{{if $order_users == $th.1}}
|
||||
{{if $order_direction_users == "+"}}
|
||||
↓
|
||||
{{else}}
|
||||
↑
|
||||
{{/if}}
|
||||
{{else}}
|
||||
↕
|
||||
{{/if}}
|
||||
{{$th.0}}</a>
|
||||
</th>
|
||||
{{/foreach}}
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue