aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2020-01-29 11:19:15 +0000
committerM Somerville <matthew-github@dracos.co.uk>2020-10-01 16:04:15 +0100
commitf4df25a3067a880d753b81df3eb4d3d843dc0ba0 (patch)
treed0e902a1095a5c335c03375d7060a1ccb1393ec4
parent598bb52cb46aaca98e85328d34b58bbcb7581d71 (diff)
Factor out all reports body name template.
-rw-r--r--templates/web/base/reports/_body_name.html1
-rwxr-xr-xtemplates/web/base/reports/body.html7
-rw-r--r--templates/web/hounslow/reports/_body_name.html1
-rw-r--r--templates/web/isleofwight/reports/_body_name.html1
4 files changed, 4 insertions, 6 deletions
diff --git a/templates/web/base/reports/_body_name.html b/templates/web/base/reports/_body_name.html
new file mode 100644
index 000000000..42392e4cd
--- /dev/null
+++ b/templates/web/base/reports/_body_name.html
@@ -0,0 +1 @@
+[% body.name %]
diff --git a/templates/web/base/reports/body.html b/templates/web/base/reports/body.html
index d723a7992..d6f9558a3 100755
--- a/templates/web/base/reports/body.html
+++ b/templates/web/base/reports/body.html
@@ -1,9 +1,4 @@
-[% SET body_name = body.name %]
-[% IF c.cobrand.moniker == 'hounslow' %]
- [% SET body_name = 'Hounslow Highways' %]
-[% ELSIF c.cobrand.moniker == 'isleofwight' %]
- [% SET body_name = 'Island Roads' %]
-[% END %]
+[% body_name = PROCESS 'reports/_body_name.html' | trim %]
[% IF ward %]
[% name = "$ward.name, $body_name"
diff --git a/templates/web/hounslow/reports/_body_name.html b/templates/web/hounslow/reports/_body_name.html
new file mode 100644
index 000000000..6cb43da82
--- /dev/null
+++ b/templates/web/hounslow/reports/_body_name.html
@@ -0,0 +1 @@
+Hounslow Highways
diff --git a/templates/web/isleofwight/reports/_body_name.html b/templates/web/isleofwight/reports/_body_name.html
new file mode 100644
index 000000000..764623032
--- /dev/null
+++ b/templates/web/isleofwight/reports/_body_name.html
@@ -0,0 +1 @@
+Island Roads