diff options
author | Matthew Somerville <matthew@mysociety.org> | 2013-02-08 16:35:41 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2013-02-08 16:35:41 +0000 |
commit | c3e5268e9769c2399da2a68260233345dd6d266b (patch) | |
tree | 7a074b513ea1d6480e57650512d0dd4cc6345681 /templates | |
parent | 6fc5665f17fcfe9e6266ad67108616930fe46717 (diff) |
Allow sorting of more Zurich admin tables.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/web/default/admin/report_blocks.html | 2 | ||||
-rw-r--r-- | templates/web/zurich/admin/index-dm.html | 2 | ||||
-rw-r--r-- | templates/web/zurich/admin/index-sdm.html | 8 | ||||
-rw-r--r-- | templates/web/zurich/admin/reports.html | 9 |
4 files changed, 10 insertions, 11 deletions
diff --git a/templates/web/default/admin/report_blocks.html b/templates/web/default/admin/report_blocks.html index bb9f34cb9..0ceefa4ea 100644 --- a/templates/web/default/admin/report_blocks.html +++ b/templates/web/default/admin/report_blocks.html @@ -22,3 +22,5 @@ [% this_date.strftime('%d.%m.%Y') %] [% 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 } ) %][% END %][% END %] diff --git a/templates/web/zurich/admin/index-dm.html b/templates/web/zurich/admin/index-dm.html index 5b2141d36..4da29ffc7 100644 --- a/templates/web/zurich/admin/index-dm.html +++ b/templates/web/zurich/admin/index-dm.html @@ -15,8 +15,6 @@ [% INCLUDE 'admin/footer.html' %] -[% BLOCK sort_link %][% IF order == choice %][% c.uri_with( d => 1 - (c.req.params.d||0) ) %][% ELSE %][% c.uri_with( { o => choice } ) %][% END %][% END %] - [% BLOCK list %] <table cellspacing="0" cellpadding="2" border="1"> <tr> diff --git a/templates/web/zurich/admin/index-sdm.html b/templates/web/zurich/admin/index-sdm.html index 9fa1b7714..a25fcd296 100644 --- a/templates/web/zurich/admin/index-sdm.html +++ b/templates/web/zurich/admin/index-sdm.html @@ -18,10 +18,10 @@ <tr> <th>[% loc('ID') %]</th> <th>[% loc('Description') %]</th> - <th>[% loc('Category') %]</th> - <th>[% loc('Submitted') %]</th> - <th>[% loc('Updated') %]</th> - <th>[% loc('Status') %]</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> [% IF NOT no_edit %] <th>*</th> [% END %] diff --git a/templates/web/zurich/admin/reports.html b/templates/web/zurich/admin/reports.html index 5122f7b5a..6ba18c9e7 100644 --- a/templates/web/zurich/admin/reports.html +++ b/templates/web/zurich/admin/reports.html @@ -5,16 +5,15 @@ <p><label for="search">[% loc('Search:') %]</label> <input type="text" name="search" size="30" id="search" value="[% searched | html %]"> </form> - [% IF problems.size %] <table cellspacing="0" cellpadding="2" border="1"> <tr> <th>[% loc('ID') %]</th> <th>[% loc('Description') %]</th> - <th>[% loc('Category') %]</th> - <th>[% loc('Submitted') %]</th> - <th>[% loc('Updated') %]</th> - <th>[% loc('Status') %]</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> <th>*</th> </tr> [% INCLUDE 'admin/problem_row.html' %] |