diff options
Diffstat (limited to 'perllib/FixMyStreet/App/View/Web.pm')
-rw-r--r-- | perllib/FixMyStreet/App/View/Web.pm | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/View/Web.pm b/perllib/FixMyStreet/App/View/Web.pm index 496463700..93aa0e2fb 100644 --- a/perllib/FixMyStreet/App/View/Web.pm +++ b/perllib/FixMyStreet/App/View/Web.pm @@ -18,6 +18,7 @@ __PACKAGE__->config( expose_methods => [ 'tprintf', 'prettify_dt', 'version', 'decode', + 'prettify_state', ], FILTERS => { add_links => \&add_links, @@ -167,5 +168,11 @@ sub decode { return $text; } +sub prettify_state { + my ($self, $c, $text, $single_fixed) = @_; + + return FixMyStreet::DB->resultset("State")->display($text, $single_fixed); +} + 1; |