diff options
-rwxr-xr-x | templates/web/default/around/_report_banner.html | 10 | ||||
-rwxr-xr-x | templates/web/default/around/_updates.html | 12 | ||||
-rwxr-xr-x | templates/web/default/around/display_location.html | 135 | ||||
-rwxr-xr-x | templates/web/default/around/tabbed_lists.html | 23 | ||||
-rwxr-xr-x | templates/web/fixmystreet/around/_report_banner.html | 14 | ||||
-rwxr-xr-x | templates/web/fixmystreet/around/_updates.html | 5 | ||||
-rwxr-xr-x | templates/web/fixmystreet/around/display_location.html | 118 |
7 files changed, 119 insertions, 198 deletions
diff --git a/templates/web/default/around/_report_banner.html b/templates/web/default/around/_report_banner.html new file mode 100755 index 000000000..024fe08d9 --- /dev/null +++ b/templates/web/default/around/_report_banner.html @@ -0,0 +1,10 @@ +<p id="text_map" class="banner"> + [% loc( 'To <strong>report a problem</strong>, click on the map at the correct location.' ) %] + [% + tprintf( + loc("<small>If you cannot see the map, <a href='%s' rel='nofollow'>skip this step</a>.</small>"), + url_skip + ) + %] + <span id="text_map_arrow"></span> +</p> diff --git a/templates/web/default/around/_updates.html b/templates/web/default/around/_updates.html new file mode 100755 index 000000000..8110a6c7c --- /dev/null +++ b/templates/web/default/around/_updates.html @@ -0,0 +1,12 @@ +<h1>[% loc('Problems in this area') %]</h1> + +<p id="alert_links_area"> + <a id="email_alert" rel="nofollow" href="[% email_url | html %]"> + [%- loc('Email me new local problems') -%] +</a> | + <a href="[% rss_url | html %]" id="rss_alert"> + <span>[% rss_alt %]</span> + <img src="/i/feed.png" width="16" height="16" title="[% rss_title %]" alt="[% rss_alt %]" border="0" style="vertical-align: top"> + </a> +</p> + diff --git a/templates/web/default/around/display_location.html b/templates/web/default/around/display_location.html index 88f8b89ae..d50009299 100755 --- a/templates/web/default/around/display_location.html +++ b/templates/web/default/around/display_location.html @@ -32,97 +32,72 @@ INCLUDE 'header.html', title => loc('Viewing a location') rss => [ loc('Recent local problems, FixMyStreet'), rss_url ], + bodyclass => 'mappage', robots => 'noindex,nofollow'; + + allow_creation = !c.cobrand.only_authed_can_create || (c.user && c.user.from_council); %] +[% IF allow_creation %] <form action="[% c.uri_for('/report/new') %]" method="post" name="mapForm" id="mapForm" enctype="multipart/form-data" class="validate"> -[% IF c.req.params.map_override %] -<input type="hidden" name="map_override" value="[% c.req.params.map_override | html %]"> + [% IF c.req.params.map_override %] + <input type="hidden" name="map_override" value="[% c.req.params.map_override | html %]"> + [% END %] + <input type="hidden" name="pc" value="[% pc | html %]"> + + <input type="hidden" name="latitude" id="fixmystreet.latitude" value="[% short_latitude | html %]"> + <input type="hidden" name="longitude" id="fixmystreet.longitude" value="[% short_longitude | html %]"> [% END %] -<input type="hidden" name="pc" value="[% pc | html %]"> -<input type="hidden" name="latitude" id="fixmystreet.latitude" value="[% short_latitude | html %]"> -<input type="hidden" name="longitude" id="fixmystreet.longitude" value="[% short_longitude | html %]"> + [% map_html %] -[% map_html %] + <p id='sub_map_links'> + [% IF c.req.params.no_pins %] + <a id='hide_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => 0 } ) %]'>[% loc('Show pins') %]</a> + [% ELSE %] + <a id='hide_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => 1 } ) %]'>[% loc('Hide pins') %]</a> + [% END %] + [% IF c.cobrand.country == 'GB' || c.cobrand.country == 'NO' %] + <span class="hidden">|</span> + [% IF c.req.params.all_pins %] + <a id='all_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => undef, all_pins => undef } ) %]'>[% loc('Hide old') %]</a> + [% ELSE %] + <a id='all_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => undef, all_pins => 1 } ) %]'>[% loc('Show old') %]</a> + [% END %] + [% END %] + </p> -<p id='sub_map_links'> - [% IF c.req.params.no_pins %] - <a id='hide_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => 0 } ) %]'>[% loc('Show pins') %]</a> - [% ELSE %] - <a id='hide_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => 1 } ) %]'>[% loc('Hide pins') %]</a> - [% END %] - [% IF c.cobrand.country == 'GB' || c.cobrand.country == 'NO' %] - | - [% IF c.req.params.all_pins %] - <a id='all_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => undef, all_pins => undef } ) %]'>[% loc('Hide old') %]</a> - [% ELSE %] - <a id='all_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => undef, all_pins => 1 } ) %]'>[% loc('Show old') %]</a> + </div> + + + + + <div id="side"> + + [% IF allow_creation %] + [% INCLUDE 'around/_report_banner.html' %] + [% TRY %][% INCLUDE 'around/extra_text.html' %][% CATCH file %][% END %] [% END %] - [% END %] -</p> - -</div> -<div id="side"> - -<p id="text_map" class="banner"> - [% loc( 'To <strong>report a problem</strong>, click on the map at the correct location.' ) %] - [% - tprintf( - loc("<small>If you cannot see the map, <a href='%s' rel='nofollow'>skip this step</a>.</small>"), - url_skip - ) + + [% INCLUDE 'around/_updates.html' %] + + <section class="full-width"> + [% INCLUDE "around/tabbed_lists.html" %] + </section> + </div> + + [% IF allow_creation %] + <div style="display:none" id="side-form"> + [% INCLUDE "report/new/fill_in_details_form.html" + js = 1, + report.used_map = 1 + report.name = c.user.name %] - <span id="text_map_arrow"></span> -</p> - -[% TRY %][% INCLUDE 'around/extra_text.html' %][% CATCH file %][% END %] - -<h1>[% loc('Problems in this area') %]</h1> - -<p id="alert_links_area"> - <a id="email_alert" rel="nofollow" href="[% email_url | html %]"> - [%- loc('Email me new local problems') -%] -</a> | - <a href="[% rss_url | html %]" id="rss_alert"> - <span>[% rss_alt %]</span> - <img src="/i/feed.png" width="16" height="16" title="[% rss_title %]" alt="[% rss_alt %]" border="0" style="vertical-align: top"> - </a> -</p> - -<div id="nearby_lists"> - - <h2>[% loc('Reports on and around the map') %]</h2> - - <ul id="current"> - [% INCLUDE "around/on_map_list_items.html" %] - </ul> - - - <h2> - [% - tprintf( - loc( 'Closest nearby problems <small>(within %skm)</small>' ), - distance - ) - %] - </h2> - - <ul id="current_near"> - [% INCLUDE "around/around_map_list_items.html" %] - </ul> - -</div> - -</div> - -<div style="display:none" id="side-form"> -[% INCLUDE "report/new/fill_in_details_form.html" - js = 1, - report.used_map = 1 -%] -</div> + </div> + [% END %] +[% IF allow_creation %] </form> +[% END %] [% INCLUDE 'footer.html' %] diff --git a/templates/web/default/around/tabbed_lists.html b/templates/web/default/around/tabbed_lists.html new file mode 100755 index 000000000..4ad7b35fc --- /dev/null +++ b/templates/web/default/around/tabbed_lists.html @@ -0,0 +1,23 @@ +<div id="nearby_lists"> + + <h2>[% loc('Reports on and around the map') %]</h2> + + <ul id="current"> + [% INCLUDE "around/on_map_list_items.html" %] + </ul> + + <h2> + [% + tprintf( + loc( 'Closest nearby problems <small>(within %skm)</small>' ), + distance + ) + %] + </h2> + + <ul id="current_near"> + [% INCLUDE "around/around_map_list_items.html" %] + </ul> + +</div> + diff --git a/templates/web/fixmystreet/around/_report_banner.html b/templates/web/fixmystreet/around/_report_banner.html new file mode 100755 index 000000000..9edf6e171 --- /dev/null +++ b/templates/web/fixmystreet/around/_report_banner.html @@ -0,0 +1,14 @@ +<h1 class="big-green-banner"> + [% loc( 'Click map to report a problem' ) %] + [% IF c.cobrand.moniker == 'bromley' %] + <span>Yellow pins show existing reports</span> + [% END %] +</h1> +<p id="skip-this-step"> + [% + tprintf( + loc("Can't see the map? <a href='%s' rel='nofollow'>Skip this step</a>"), + url_skip + ) + %] +</p> diff --git a/templates/web/fixmystreet/around/_updates.html b/templates/web/fixmystreet/around/_updates.html new file mode 100755 index 000000000..75327c935 --- /dev/null +++ b/templates/web/fixmystreet/around/_updates.html @@ -0,0 +1,5 @@ +<div class="shadow-wrap"> + <ul id="key-tools" class="singleton"> + <li><a class="feed" id="key-tool-around-updates" href="[% email_url | html %]">Get updates</a></li> + </ul> +</div> diff --git a/templates/web/fixmystreet/around/display_location.html b/templates/web/fixmystreet/around/display_location.html deleted file mode 100755 index bad7c7af0..000000000 --- a/templates/web/fixmystreet/around/display_location.html +++ /dev/null @@ -1,118 +0,0 @@ -[% - - rss_alt = loc('RSS feed'); - rss_title = loc('RSS feed of recent local problems'); - - rss_url - = pc - ? c.uri_for( "/rss/pc", pc ) - : c.uri_for( "/rss/l/$short_latitude,$short_longitude" ); - - email_url = c.uri_for( - '/alert/list', - { - lat => short_latitude, - lon => short_longitude, - feed => "local:$short_latitude:$short_longitude", - } - ); - - url_skip = c.uri_for( - '/report/new', - { - pc => pc - latitude => short_latitude, - longitude => short_longitude, - skipped => 1, - } - ); - - PROCESS "maps/${map.type}.html"; - - INCLUDE 'header.html', - title => loc('Viewing a location') - rss => [ loc('Recent local problems, FixMyStreet'), rss_url ], - bodyclass => 'mappage', - robots => 'noindex,nofollow'; - - allow_creation = !c.cobrand.only_authed_can_create || (c.user && c.user.from_council); -%] - -[% IF allow_creation %] -<form action="[% c.uri_for('/report/new') %]" method="post" name="mapForm" id="mapForm" enctype="multipart/form-data" class="validate"> - [% IF c.req.params.map_override %] - <input type="hidden" name="map_override" value="[% c.req.params.map_override | html %]"> - [% END %] - <input type="hidden" name="pc" value="[% pc | html %]"> - - <input type="hidden" name="latitude" id="fixmystreet.latitude" value="[% short_latitude | html %]"> - <input type="hidden" name="longitude" id="fixmystreet.longitude" value="[% short_longitude | html %]"> -[% END %] - - [% map_html %] - - <p id='sub_map_links'> - [% IF c.req.params.no_pins %] - <a id='hide_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => 0 } ) %]'>[% loc('Show pins') %]</a> - [% ELSE %] - <a id='hide_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => 1 } ) %]'>[% loc('Hide pins') %]</a> - [% END %] - [% IF c.cobrand.country == 'GB' || c.cobrand.country == 'NO' %] - [% IF c.req.params.all_pins %] - <a id='all_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => undef, all_pins => undef } ) %]'>[% loc('Hide old') %]</a> - [% ELSE %] - <a id='all_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => undef, all_pins => 1 } ) %]'>[% loc('Show old') %]</a> - [% END %] - [% END %] - </p> - - </div> - - - - - <div id="side"> - - [% IF allow_creation %] - <h1 class="big-green-banner"> - [% loc( 'Click map to report a problem' ) %] - [% IF c.cobrand.moniker == 'bromley' %] - <span>Yellow pins show existing reports</span> - [% END %] - </h1> - <p id="skip-this-step"> - [% - tprintf( - loc("Can't see the map? <a href='%s' rel='nofollow'>Skip this step</a>"), - url_skip - ) - %] - </p> - [% END %] - - <div class="shadow-wrap"> - <ul id="key-tools" class="singleton"> - <li><a class="feed" id="key-tool-around-updates" href="[% email_url | html %]">Get updates</a></li> - </ul> - </div> - - <section class="full-width"> - [% INCLUDE "around/tabbed_lists.html" %] - </section> - </div> - - [% IF allow_creation %] - <div style="display:none" id="side-form"> - [% INCLUDE "report/new/fill_in_details_form.html" - js = 1, - report.used_map = 1 - report.name = c.user.name - %] - </div> - [% END %] - -[% IF allow_creation %] -</form> -[% END %] - -[% INCLUDE 'footer.html' %] |