aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/default/alert
diff options
context:
space:
mode:
Diffstat (limited to 'templates/web/default/alert')
-rw-r--r--templates/web/default/alert/choose.html14
-rw-r--r--templates/web/default/alert/index.html39
-rw-r--r--templates/web/default/alert/list.html133
-rw-r--r--templates/web/default/alert/updates.html22
4 files changed, 208 insertions, 0 deletions
diff --git a/templates/web/default/alert/choose.html b/templates/web/default/alert/choose.html
new file mode 100644
index 000000000..ef632e2d1
--- /dev/null
+++ b/templates/web/default/alert/choose.html
@@ -0,0 +1,14 @@
+[% INCLUDE 'header.html', title => loc('Local RSS feeds and email alerts') %]
+
+<h1>[% loc('Local RSS feeds and email alerts') %]</h1>
+
+[% IF possible_location_matches %]
+ <p>[% loc('We found more than one match for that location. We show up to ten matches, please try a different search if yours is not here.') %]</p>
+ <ul class="pc_alternatives">
+ [% FOREACH match IN possible_location_matches %]
+ <li><a href="[% choose_target_uri %]?pc=[% match | uri %]">[% match | html %]</a></li>
+ [% END %]
+ </ul>
+[% END %]
+
+[% INCLUDE 'footer.html' %]
diff --git a/templates/web/default/alert/index.html b/templates/web/default/alert/index.html
new file mode 100644
index 000000000..4d63e7f34
--- /dev/null
+++ b/templates/web/default/alert/index.html
@@ -0,0 +1,39 @@
+[% INCLUDE 'header.html', title => loc('Local RSS feeds and email alerts') %]
+
+<h1>[% loc('Local RSS feeds and email alerts') %]</h1>
+
+<p>
+[% loc('FixMyStreet 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.') %]
+</p>
+
+[% IF location_offshore %]
+ <ul class="error"><li>[% loc('That location does not appear to be covered by a council, perhaps it is offshore - please try somewhere more specific.') %]</li></ul>
+[% ELSIF location_error %]
+ <ul class="error"><li>[% location_error | html %]</li></ul>
+[% ELSE %]
+ [% INCLUDE 'errors.html' %]
+[% END %]
+
+<form method="get" action="/alert/list">
+ <p>
+ [% loc('To find out what local alerts we have for you, please enter your GB
+postcode or street name and area:' ) %]
+ <input type="text" name="pc" value="[% pc | html %]">
+ <input type="submit" value="[% loc('Go') %]">
+ [% cobrand_form_elements %]
+ </p>
+</form>
+
+[% IF photos.size %]
+<div id="alert_recent">
+ <h2>[% loc('Some photos of recent reports') %]</h2>
+ [% FOREACH p IN photos %]
+ <a href="/report/[% p.id %]"><img border="0" height="100"
+ src="/photo?tn=1;id=[% p.id %]" alt="[% p.title | html %]" title="[% p.title | html %]"></a>
+ [% END %]
+</div>
+[% END %]
+
+[% INCLUDE 'footer.html' %]
diff --git a/templates/web/default/alert/list.html b/templates/web/default/alert/list.html
new file mode 100644
index 000000000..36bfaffd9
--- /dev/null
+++ b/templates/web/default/alert/list.html
@@ -0,0 +1,133 @@
+[%
+ IF pretty_pc;
+ title = tprintf( loc("Local RSS feeds and email alerts for ā€˜%s’"), pretty_pc );
+ ELSE;
+ title = loc('Local RSS feeds and email alerts');
+ END;
+%]
+
+[% INCLUDE 'header.html', title => title %]
+
+[% IF pretty_pc %]
+ [%
+ pretty_pc = pretty_pc | html | replace(' ', '&nbsp;');
+ title = tprintf( loc("Local RSS feeds and email alerts for ā€˜%s’"), pretty_pc );
+ %]
+[% END %]
+
+
+<h1>[% title %]</h1>
+
+<form id="alerts" name="alerts" method="post" action="/alert/subscribe">
+ <input type="hidden" name="type" value="local">
+ <input type="hidden" name="pc" value="[% pc | html %]">
+
+ [% cobrand_form_elements %]
+
+ [% IF photos.size %]
+ <div id="alert_photos">
+ <h2>[% loc('Photos of recent nearby reports') %]</h2>
+ [% FOREACH p IN photos %]
+ <a href="/report/[% p.id %]"><img border="0" height="100"
+ src="/photo?tn=1;id=[% p.id %]" alt="[% p.title | html %]" title="[% p.title | html %]"></a>
+ [% END %]
+ </div>
+ [% END %]
+
+ <p>
+ [% IF pretty_pc %]
+ [% tprintf( loc('Here are the types of local problem alerts for &lsquo;%s&rsquo;.'), pretty_pc ) %]
+ [% END %]
+ [% loc('Select which type of alert you\'d like and click the button for an RSS feed, or enter your email address to subscribe to an email alert.') %]
+ </p>
+
+ [% INCLUDE 'errors.html' %]
+
+ <p>
+ [% loc('The simplest alert is our geographic one:') %]
+ </p>
+
+ <p id="rss_local">
+ <input type="radio" name="feed" id="[% rss_feed_id %]" value="[% rss_feed_id %]"[% IF rss_feed_id == selected_feed || selected_feed == '' %] checked[% END %]>
+ <label for="[% rss_feed_id %]">[% tprintf( loc('Problems within %.1fkm of this location'), population_radius ) %]</label>
+ [% loc('(a default distance which covers roughly 200,000 people)') %] <a href='[% rss_feed_uri %]'>
+ <img src='/i/feed.png' width='16' height='16' title='[% loc('RSS feed of nearby problems') %]' alt='[% loc('RSS feed') %]' border='0'></a>
+ </p>
+
+ <p id="rss_local_alt">
+ [% loc('(alternatively the RSS feed can be customised, within') %]
+ <a href="[% rss_feed_2k %]">2km</a> / <a href="[% rss_feed_5k %]">5km</a> / <a href="[% rss_feed_10k %]">10km</a> / <a href="[% rss_feed_20k %]">20km</a>)
+ </p>
+
+ <p>
+ [% loc("Or you can subscribe to an alert based upon what ward or council you&rsquo;re in:") %]
+ </p>
+
+ [% IF reported_to_options %]
+ <div id="rss_list">
+ <p><strong>
+ [% loc('Problems within the boundary of:') %]
+ </strong></p>
+ <ul>
+ [% ELSE %]
+ <div><ul id="rss_feed">
+ [% END %]
+
+ [% FOREACH option IN options %]
+ <li>
+ <input type="radio" name="feed" id="[% option.id %]" value="[% option.id %]"[% IF option.id == selected_feed %] checked[% END %]>
+ <label for="[% option.id %]">[% option.text %]</label>
+ <a href="[% option.uri %]"><img src="/i/feed.png" width="16" height="16"
+title="[% option.rss_text %]" alt="RSS feed" border="0"></a>
+ </li>
+ [% END %]
+</ul>
+ [% IF reported_to_options %]
+ <p><strong>
+ [% loc('Or problems reported to:') %]
+ </strong></p>
+ <ul>
+ [% FOREACH option IN reported_to_options %]
+ <li>
+ <input type="radio" name="feed" id="[% option.id %]" value="[% option.id %]"[% IF option.id == selected_feed %] checked[% END %]>
+ <label for="[% option.id %]">[% option.text %]</label>
+ <a href="[% option.uri %]"><img src="/i/feed.png" width="16" height="16"
+ title="[% option.rss_text %]" alt="RSS feed" border="0"></a>
+ </li>
+ [% END %]
+ </ul>
+ <p><small>
+ [% loc( 'FixMyStreet sends different categories of problem
+to the appropriate council, so problems within the boundary of a particular council
+might not match the problems sent to that council. For example, a graffiti report
+will be sent to the district council, so will appear in both of the district
+council&rsquo;s alerts, but will only appear in the "Within the boundary" alert
+for the county council.' ) %]
+ </small></p>
+</div>
+<div id="rss_buttons">
+ [% END %]
+
+ <p>
+ <input type="submit" name="rss" value="[% loc('Give me an RSS feed') %]">
+ <p>
+
+ <p id="alert_or">
+ [% loc('or') %]
+ </p>
+
+[% UNLESS c.user_exists %]
+
+ <p>
+ [% loc('Your email:') %] <input type="text" id="rznvy" name="rznvy" value="[% rznvy | html %]" size="30">
+ </p>
+
+[% END %]
+
+ <p>
+ <input type="submit" name="alert" value="[% loc('Subscribe me to an email alert') %]">
+ </p>
+ </div> <!-- ???? -->
+ </form>
+
+[% INCLUDE 'footer.html' %]
diff --git a/templates/web/default/alert/updates.html b/templates/web/default/alert/updates.html
new file mode 100644
index 000000000..76b5ef23e
--- /dev/null
+++ b/templates/web/default/alert/updates.html
@@ -0,0 +1,22 @@
+[% title = loc('Local RSS feeds and email alerts') %]
+
+[% INCLUDE 'header.html', title => title %]
+
+
+[% INCLUDE 'errors.html' %]
+
+<p>
+[% loc('Receive email when updates are left on this problem.') %]
+</p>
+
+<form action="/alert/subscribe" method="post">
+<label class="n" for="alert_rznvy">[% loc('Email:') %]</label>
+<input type="email" name="rznvy" id="alert_rznvy" value="[% email | html %]" size="30">
+<input type="hidden" name="id" value="[% problem_id | html %]">
+<input type="hidden" name="type" value="updates">
+<input type="submit" value="[% loc('Subscribe') %]">
+[% cobrand_form_elements %]
+</form>
+
+
+[% INCLUDE 'footer.html' %]