diff options
author | Matthew Somerville <matthew@mysociety.org> | 2011-06-24 17:45:58 +0100 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2011-06-28 15:01:03 +0100 |
commit | 85a3050d6e5e0f7f0bd9d3c827533f5d84d0b396 (patch) | |
tree | 542f579cb076f7b70d30848afe92313450d964e4 /perllib/FixMyStreet/DB/Result/Problem.pm | |
parent | 9c662a2c3ba48a75e114ba4cff9826438441a949 (diff) |
Sort problems, and have a map, maybe.
Diffstat (limited to 'perllib/FixMyStreet/DB/Result/Problem.pm')
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Problem.pm | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm index da23802c3..ff730958a 100644 --- a/perllib/FixMyStreet/DB/Result/Problem.pm +++ b/perllib/FixMyStreet/DB/Result/Problem.pm @@ -364,8 +364,7 @@ sub meta_line { return $meta; } -# TODO Some/much of this could be moved to the template -sub duration_string { +sub body { my ( $problem, $c ) = @_; my $body; if ($problem->external_body) { @@ -387,6 +386,13 @@ sub duration_string { } @councils ); } + return $body; +} + +# TODO Some/much of this could be moved to the template +sub duration_string { + my ( $problem, $c ) = @_; + my $body = $problem->body( $c ); return sprintf(_('Sent to %s %s later'), $body, Utils::prettify_duration($problem->whensent_local->epoch - $problem->confirmed_local->epoch, 'minute') ); |