diff options
author | Dave Whiteland <dave@mysociety.org> | 2013-01-11 15:17:39 +0000 |
---|---|---|
committer | Dave Whiteland <dave@mysociety.org> | 2013-01-11 16:11:13 +0000 |
commit | eb96fc3700e4d8197b8459baa61edc1cb7e86716 (patch) | |
tree | 1f70d87dd7a22a8716d3b76e11e798908ac8895f | |
parent | 7597a45be22a2666097c87ef2677f1bd6d187c6b (diff) |
use YYYY/MM/DD format in tables
-rw-r--r-- | templates/web/default/admin/report_blocks.html | 8 | ||||
-rw-r--r-- | templates/web/zurich/admin/index-dm.html | 2 | ||||
-rw-r--r-- | templates/web/zurich/admin/index-sdm.html | 2 |
3 files changed, 10 insertions, 2 deletions
diff --git a/templates/web/default/admin/report_blocks.html b/templates/web/default/admin/report_blocks.html index f08529ce7..efcac7dff 100644 --- a/templates/web/default/admin/report_blocks.html +++ b/templates/web/default/admin/report_blocks.html @@ -15,3 +15,11 @@ [% BLOCK flag_button -%] [% IF user.flagged || user_flagged %]<input type="submit" name="removeuserflag" value="[% loc('Remove flag') %]">[% ELSE %]<input type="submit" name="flaguser" value="[% loc('Flag user') %]" />[% END %] [%- END %] + +[%- USE date_format = DateTime::Format('DateTime::Format::Strptime', { pattern => "%d/%m/%Y" }) %] + +[% BLOCK format_date -%] + [%- IF this_date %] + [% date_format.format(this_date) %] + [% ELSE %][% no_time || ' ' %][% END %][% no_time = '' %] +[%- END %] diff --git a/templates/web/zurich/admin/index-dm.html b/templates/web/zurich/admin/index-dm.html index db0972398..6b7fbab85 100644 --- a/templates/web/zurich/admin/index-dm.html +++ b/templates/web/zurich/admin/index-dm.html @@ -42,7 +42,7 @@ <td>[% PROCESS value_or_nbsp value=problem.title %]</td> <td>[% states.${problem.state} %]</td> <td>[% problem.category %]</td> - <td>[% PROCESS format_time time=problem.created %]</td> + <td>[% PROCESS format_date this_date=problem.created %]</td> <td><a href="[% c.uri_for( 'report_edit', problem.id ) %]">[% loc('Edit') %]</a></td> </tr> [%- END -%] diff --git a/templates/web/zurich/admin/index-sdm.html b/templates/web/zurich/admin/index-sdm.html index b55bf5bf1..d7277dd7d 100644 --- a/templates/web/zurich/admin/index-sdm.html +++ b/templates/web/zurich/admin/index-sdm.html @@ -31,7 +31,7 @@ <td class="record-id">[% problem.id %]</td> <td>[% PROCESS value_or_nbsp value=problem.title %]</td> <td>[% problem.category %]</td> - <td>[% PROCESS format_time time=problem.created %]</td> + <td>[% PROCESS format_date this_date=problem.created %]</td> [% IF NOT no_edit %] <td><a href="[% c.uri_for( 'report_edit', problem.id ) %]">[% loc('Edit') %]</a></td> [% END %] |