aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2019-09-05 12:39:34 +0100
committerMatthew Somerville <matthew@mysociety.org>2019-09-19 13:48:24 +0100
commite0fe32b6e9f4b35dbd52b933d5d3b0a50807df6a (patch)
tree51bed70430674f0c251efe38915991b4791c839a
parentc41bb2fcb792b3b0231c2ca2580d003fc8a9c36c (diff)
Factor out alert index text.
-rw-r--r--templates/web/base/alert/_index_text.html25
-rw-r--r--templates/web/base/alert/index.html25
2 files changed, 26 insertions, 24 deletions
diff --git a/templates/web/base/alert/_index_text.html b/templates/web/base/alert/_index_text.html
new file mode 100644
index 000000000..92e84478e
--- /dev/null
+++ b/templates/web/base/alert/_index_text.html
@@ -0,0 +1,25 @@
+<p>
+[% IF c.cobrand.is_council %]
+[% tprintf(loc('%s has a variety of RSS feeds and email alerts for local
+problems, including alerts for all problems within a particular ward, or all
+problems within a certain distance of a particular location.', "%s is the site name"), site_name) %]
+[% ELSE %]
+[% tprintf(loc('%s has a variety of RSS feeds and email alerts for local problems, including
+alerts for all problems within a particular ward or council, or all problems
+within a certain distance of a particular location.', "%s is the site name"), site_name) %]
+[% END %]
+</p>
+
+[% IF location_error %]
+ <div class="error">[% location_error %]</div>
+[% ELSE %]
+ [% INCLUDE 'errors.html' %]
+[% END %]
+
+<p>
+[% IF c.cobrand.is_council %]
+[% tprintf(loc('To find out what local alerts we have for you, please enter your %s postcode or street name and area:'), c.cobrand.council_area) %]
+[% ELSE %]
+[% loc('To find out what local alerts we have for you, please enter your postcode or street name and area' ) %]
+[% END %]
+</p>
diff --git a/templates/web/base/alert/index.html b/templates/web/base/alert/index.html
index ba3c64baf..7578a3329 100644
--- a/templates/web/base/alert/index.html
+++ b/templates/web/base/alert/index.html
@@ -3,31 +3,8 @@
<h1>[% loc('Local RSS feeds and email alerts') %]</h1>
-<p>
-[% IF c.cobrand.is_council %]
-[% tprintf(loc('%s has a variety of RSS feeds and email alerts for local
-problems, including alerts for all problems within a particular ward, or all
-problems within a certain distance of a particular location.', "%s is the site name"), site_name) %]
-[% ELSE %]
-[% tprintf(loc('%s has a variety of RSS feeds and email alerts for local problems, including
-alerts for all problems within a particular ward or council, or all problems
-within a certain distance of a particular location.', "%s is the site name"), site_name) %]
-[% END %]
-</p>
-
-[% IF location_error %]
- <div class="error">[% location_error %]</div>
-[% ELSE %]
- [% INCLUDE 'errors.html' %]
-[% END %]
+[% PROCESS 'alert/_index_text.html' %]
-<p>
-[% IF c.cobrand.is_council %]
-[% tprintf(loc('To find out what local alerts we have for you, please enter your %s postcode or street name and area:'), c.cobrand.council_area) %]
-[% ELSE %]
-[% loc('To find out what local alerts we have for you, please enter your postcode or street name and area' ) %]
-[% END %]
-</p>
<form method="get" action="/alert/list" class="form-box js-geolocate">
<fieldset>
<label for="pc">[% loc('Postcode or street name and area') %]</label>