diff options
author | Matthew Somerville <matthew@mysociety.org> | 2013-02-08 17:21:30 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2013-02-08 17:21:30 +0000 |
commit | 42d06f366ee56a5a09f6c57bdfc47c1b2628425e (patch) | |
tree | 7e67c5a88b5464d1b034ffce403929a694b7d2a8 | |
parent | 30b2dd955a2be92dcdf733e790d8c7ceacd906af (diff) |
Add sort arrows on display.
-rw-r--r-- | templates/web/default/admin/report_blocks.html | 18 | ||||
-rw-r--r-- | templates/web/zurich/admin/index-dm.html | 7 | ||||
-rw-r--r-- | templates/web/zurich/admin/index-sdm.html | 7 | ||||
-rw-r--r-- | templates/web/zurich/admin/reports.html | 7 |
4 files changed, 26 insertions, 13 deletions
diff --git a/templates/web/default/admin/report_blocks.html b/templates/web/default/admin/report_blocks.html index 6308cec31..c2cffc352 100644 --- a/templates/web/default/admin/report_blocks.html +++ b/templates/web/default/admin/report_blocks.html @@ -23,4 +23,20 @@ [% ELSE %][% no_time || ' ' %][% END %][% no_time = '' %] [%- END %] -[% BLOCK sort_link %][% IF order == choice %][% c.uri_with( d => 1 - (c.req.params.d||0) ) %][% ELSE %][% c.uri_with( { o => choice, d => 0 } ) %][% END %][% END %] +[% BLOCK sort_link %][% IF order == choice %][% c.uri_with( d => 1 - dir ) %][% ELSE %][% c.uri_with( { o => choice, d => 0 } ) %][% END %][% END %] + +[% BLOCK sort_arrow %] + [% IF order == choice %] + <span style="font-size:50%"> + [% IF dir %] + ▼ + [% ELSE %] + ▲ + [% END %] + </span> + [% ELSE %] + <span style="font-size:50%; color: #999;"> + ▲ + </span> + [% END %] +[% END %] diff --git a/templates/web/zurich/admin/index-dm.html b/templates/web/zurich/admin/index-dm.html index f4fb6ea78..9bbbb6fd0 100644 --- a/templates/web/zurich/admin/index-dm.html +++ b/templates/web/zurich/admin/index-dm.html @@ -20,10 +20,9 @@ <tr> <th>[% loc('ID') %]</th> <th>[% loc('Description') %]</th> - <th><a href="[% INCLUDE sort_link choice = 'category' %]#[% hash %]">[% loc('Category') %]</a></th> - <th><a href="[% INCLUDE sort_link choice = 'created' %]#[% hash %]">[% loc('Submitted') %]</a></th> - <th><a href="[% INCLUDE sort_link choice = 'lastupdate' %]#[% hash %]">[% loc('Updated') %]</a></th> - <th><a href="[% INCLUDE sort_link choice = 'state' %]#[% hash %]">[% loc('Status') %]</a></th> + [% FOREACH col IN [ [ 'category', loc('Category') ], [ 'created', loc('Submitted') ], [ 'lastupdate', loc('Updated') ], [ 'state', loc('Status') ] ] %] + <th><a href="[% INCLUDE sort_link choice = col.0 %]#[% hash %]">[% col.1 %] [% INCLUDE sort_arrow choice = col.0 %]</a></th> + [% END %] [% IF include_subdiv %] <th>[% loc('Subdivision/Body') %]</th> [% END %] diff --git a/templates/web/zurich/admin/index-sdm.html b/templates/web/zurich/admin/index-sdm.html index 17e14872d..a45bd9445 100644 --- a/templates/web/zurich/admin/index-sdm.html +++ b/templates/web/zurich/admin/index-sdm.html @@ -18,10 +18,9 @@ <tr> <th>[% loc('ID') %]</th> <th>[% loc('Description') %]</th> - <th><a href="[% INCLUDE sort_link choice = 'category' %]#[% hash %]">[% loc('Category') %]</a></th> - <th><a href="[% INCLUDE sort_link choice = 'created' %]#[% hash %]">[% loc('Submitted') %]</a></th> - <th><a href="[% INCLUDE sort_link choice = 'lastupdate' %]#[% hash %]">[% loc('Updated') %]</a></th> - <th><a href="[% INCLUDE sort_link choice = 'state' %]#[% hash %]">[% loc('Status') %]</a></th> + [% FOREACH col IN [ [ 'category', loc('Category') ], [ 'created', loc('Submitted') ], [ 'lastupdate', loc('Updated') ], [ 'state', loc('Status') ] ] %] + <th><a href="[% INCLUDE sort_link choice = col.0 %]#[% hash %]">[% col.1 %] [% INCLUDE sort_arrow choice = col.0 %]</a></th> + [% END %] [% IF NOT no_edit %] <th>*</th> [% END %] diff --git a/templates/web/zurich/admin/reports.html b/templates/web/zurich/admin/reports.html index 6ba18c9e7..77fc61a65 100644 --- a/templates/web/zurich/admin/reports.html +++ b/templates/web/zurich/admin/reports.html @@ -10,10 +10,9 @@ <tr> <th>[% loc('ID') %]</th> <th>[% loc('Description') %]</th> - <th><a href="[% INCLUDE sort_link choice = 'category' %]">[% loc('Category') %]</a></th> - <th><a href="[% INCLUDE sort_link choice = 'created' %]">[% loc('Submitted') %]</a></th> - <th><a href="[% INCLUDE sort_link choice = 'lastupdate' %]">[% loc('Updated') %]</a></th> - <th><a href="[% INCLUDE sort_link choice = 'state' %]">[% loc('Status') %]</a></th> + [% FOREACH col IN [ [ 'category', loc('Category') ], [ 'created', loc('Submitted') ], [ 'lastupdate', loc('Updated') ], [ 'state', loc('Status') ] ] %] + <th><a href="[% INCLUDE sort_link choice = col.0 %]">[% col.1 %] [% INCLUDE sort_arrow choice = col.0 %]</a></th> + [% END %] <th>*</th> </tr> [% INCLUDE 'admin/problem_row.html' %] |