diff options
Diffstat (limited to 'templates/web/default/alert')
-rw-r--r-- | templates/web/default/alert/_list.html | 100 | ||||
-rw-r--r-- | templates/web/default/alert/choose.html | 2 | ||||
-rw-r--r-- | templates/web/default/alert/index.html | 41 | ||||
-rw-r--r-- | templates/web/default/alert/list.html | 106 |
4 files changed, 135 insertions, 114 deletions
diff --git a/templates/web/default/alert/_list.html b/templates/web/default/alert/_list.html new file mode 100644 index 000000000..2ffcfae39 --- /dev/null +++ b/templates/web/default/alert/_list.html @@ -0,0 +1,100 @@ + <input type="hidden" name="type" value="local"> + <input type="hidden" name="pc" value="[% pc | html %]"> + + <p> + [% IF pretty_pc %] + [% tprintf( loc('Here are the types of local problem alerts for ‘%s’.'), 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> + [% IF c.cobrand.is_council %] + Or you can subscribe to an alert for all council problems or one based upon what ward you’re in: + [% ELSE %] + [% loc("Or you can subscribe to an alert based upon what ward or council you’re in:") %] + [% END %] + </p> + + [% IF reported_to_options %] + <div id="rss_list"> + <p><strong> + [% loc('Problems within the boundary of:') %] + </strong></p> + <ul class="plain-list"> + [% ELSE %] + <div><ul id="rss_feed"> + [% END %] + + [% FOREACH option IN options %] + <li[% IF ! (loop.count % 2) %] class="a"[% END %]> + <input type="radio" name="feed" id="[% option.id %]" value="[% option.id %]"[% IF option.id == selected_feed %] checked[% END %]> + <label class="inline" 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 class="plain-list"> + [% FOREACH option IN reported_to_options %] + <li[% IF ! (loop.count % 2) %] class="a"[% END %]> + <input type="radio" name="feed" id="[% option.id %]" value="[% option.id %]"[% IF option.id == selected_feed %] checked[% END %]> + <label class="inline" 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’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> <!-- ???? --> + diff --git a/templates/web/default/alert/choose.html b/templates/web/default/alert/choose.html index fad365088..312b9f520 100644 --- a/templates/web/default/alert/choose.html +++ b/templates/web/default/alert/choose.html @@ -4,7 +4,7 @@ [% 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"> + <ul class="pc_alternatives plain-list"> [% FOREACH match IN possible_location_matches %] <li><a href="[% choose_target_uri %]?latitude=[% match.latitude | uri %];longitude=[% match.longitude | uri %]">[% match.address | html %]</a></li> [% END %] diff --git a/templates/web/default/alert/index.html b/templates/web/default/alert/index.html index 274d61780..1f0635ae4 100644 --- a/templates/web/default/alert/index.html +++ b/templates/web/default/alert/index.html @@ -1,37 +1,50 @@ -[% INCLUDE 'header.html', title => loc('Local RSS feeds and email alerts') %] +[% INCLUDE 'header.html', title = loc('Local RSS feeds and email alerts'), bodyclass = 'twothirdswidthpage' %] <h1>[% loc('Local RSS feeds and email alerts') %]</h1> <p> +[% IF c.cobrand.is_council %] +FixMyStreet 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. +[% ELSE %] [% 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.') %] +[% END %] </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 %]</li></ul> +[% IF location_error %] + <div class="error">[% location_error %]</div> [% 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') %]"> - </p> +<p> +[% IF c.cobrand.is_council %] +To find out what local alerts we have for you, please enter your [% c.cobrand.council_area %] postcode or street name and 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="full-width"> + <fieldset> + <div class="form-txt-submit-box"> + <input type="text" name="pc" value="[% pc | html %]" placeholder="[% tprintf(loc('e.g. ā%sā or ā%sā'), c.cobrand.example_places) %]"> + <input class="green-btn" type="submit" value="[% loc('Go') %]"> + </div> + </fieldset> </form> [% IF photos.size %] -<div id="alert_recent"> - <h2>[% loc('Some photos of recent reports') %]</h2> +<div class="sticky-sidebar" id="alert_recent"> + <aside> + <h2>[% loc('Some photos of recent reports') %]</h2> [% FOREACH p IN photos %] <a href="/report/[% p.id %]"><img border="0" height="100" src="/photo/[% p.id %].tn.jpeg" alt="[% p.title | html %]" title="[% p.title | html %]"></a> [% END %] + </aside> </div> [% END %] diff --git a/templates/web/default/alert/list.html b/templates/web/default/alert/list.html index 9f2bd69d0..20ebbf455 100644 --- a/templates/web/default/alert/list.html +++ b/templates/web/default/alert/list.html @@ -6,7 +6,7 @@ END; %] -[% INCLUDE 'header.html', title => title %] +[% INCLUDE 'header.html', title = title, bodyclass = 'twothirdswidthpage' %] [% IF pretty_pc %] [% @@ -19,113 +19,21 @@ <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 %]"> [% IF photos.size %] - <div id="alert_photos"> - <h2>[% loc('Photos of recent nearby reports') %]</h2> + <div id="alert_photos" class="sticky-sidebar"> + <aside> + <h2>[% loc('Photos of recent nearby reports') %]</h2> [% FOREACH p IN photos %] <a href="/report/[% p.id %]"><img border="0" height="100" src="/photo/[% p.id %].tn.jpeg" alt="[% p.title | html %]" title="[% p.title | html %]"></a> [% END %] + </aside> </div> [% END %] - <p> - [% IF pretty_pc %] - [% tprintf( loc('Here are the types of local problem alerts for ‘%s’.'), 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’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’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 %] + [% INCLUDE 'alert/_list.html' %] - <p> - <input type="submit" name="alert" value="[% loc('Subscribe me to an email alert') %]"> - </p> - </div> <!-- ???? --> - </form> +</form> [% INCLUDE 'footer.html' %] |