aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/View/Web.pm
diff options
context:
space:
mode:
authorMarius Halden <marius.h@lden.org>2017-11-03 16:13:59 +0100
committerMarius Halden <marius.h@lden.org>2017-11-03 16:13:59 +0100
commit42d874db498d0fabae92d0c87acf99054d92391b (patch)
treed0cf5afdee3d244c4e5da6fe1ab9acba620634df /perllib/FixMyStreet/App/View/Web.pm
parent19a7c5dda85a47a68040c742791e9cd9d3e52be6 (diff)
parentdc7613329c275cd158fdde8faf1c0e301f5b7202 (diff)
Merge tag 'v2.2' into fiksgatami-dev
Diffstat (limited to 'perllib/FixMyStreet/App/View/Web.pm')
-rw-r--r--perllib/FixMyStreet/App/View/Web.pm7
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;