aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/default/around
diff options
context:
space:
mode:
Diffstat (limited to 'templates/web/default/around')
-rw-r--r--templates/web/default/around/around_index.html50
-rw-r--r--templates/web/default/around/around_map_list_items.html16
-rwxr-xr-xtemplates/web/default/around/display_location.html124
-rw-r--r--templates/web/default/around/on_map_list_items.html13
4 files changed, 203 insertions, 0 deletions
diff --git a/templates/web/default/around/around_index.html b/templates/web/default/around/around_index.html
new file mode 100644
index 000000000..8c144e469
--- /dev/null
+++ b/templates/web/default/around/around_index.html
@@ -0,0 +1,50 @@
+[% INCLUDE 'header.html', title => loc('Reporting a problem') %]
+
+[%
+ # NOTE ON PARTIAL REPORTS:
+ #
+ # partial reports get a bit of extra text added, the form goes to
+ # '/report/new' and the partial hidden field is added to the form.
+%]
+
+[%
+ question
+ = c.cobrand.enter_postcode_text()
+ || loc("Enter a nearby GB postcode, or street name and area");
+%]
+
+<form action="[% c.uri_for('/around') %]" method="get" name="postcodeForm" id="postcodeForm">
+ <label for="pc">[% question %]:</label>&nbsp;<input type="text" name="pc" value="[% pc | html %]" id="pc" size="10" maxlength="200">&nbsp;<input type="submit" value="[% loc('Go') %]" id="submit">
+[% c.cobrand.form_elements('postcodeForm') %]
+
+[% IF partial_token %]
+ <input type="hidden" name="partial" value="[% partial_token.token %]">
+[% END %]
+
+</form>
+
+[% IF location_offshore %]
+ <p class="error">[% loc('That spot does not appear to be covered by a council. If you have tried to report an issue past the shoreline, for example, please specify the closest point on land.') %]</p>
+[% ELSIF location_error %]
+ <p class="error">[% location_error %]</p>
+[% END %]
+
+[% 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="/around?pc=[% match | uri %]">[% match | html %]</a></li>
+ [% END %]
+ </ul>
+[% END %]
+
+[% IF partial_token %]
+ <p style="margin-top: 0; color: #cc0000;">
+ <img align="right" src="/photo?id=[% report.id %]" hspace="5">
+ [% loc("Thanks for uploading your photo. We now need to locate your problem, so please enter a nearby street name or postcode in the box below&nbsp;:") %]
+ </p>
+[% END %]
+
+
+
+[% INCLUDE 'footer.html' %]
diff --git a/templates/web/default/around/around_map_list_items.html b/templates/web/default/around/around_map_list_items.html
new file mode 100644
index 000000000..a98f25dbe
--- /dev/null
+++ b/templates/web/default/around/around_map_list_items.html
@@ -0,0 +1,16 @@
+[% IF around_map.size %]
+ [% FOREACH p IN around_map %]
+
+ [% dist = tprintf("%.1f", (p.distance || 0) ) %]
+
+ <li>
+ <a href="[% c.uri_for('/report', p.problem.id ) %]">[% p.problem.title | html %]</a>
+ <small>[% prettify_epoch( p.problem.confirmed_local.epoch, 1 ) %], [% dist %]km</small>
+ [% IF p.problem.state == 'fixed' %]
+ <small>[% loc('(fixed)') %]</small>
+ [% END %]
+ </li>
+ [% END %]
+[% ELSE %]
+ <li>[% loc('No problems found.') %]</li>
+[% END %]
diff --git a/templates/web/default/around/display_location.html b/templates/web/default/around/display_location.html
new file mode 100755
index 000000000..395054645
--- /dev/null
+++ b/templates/web/default/around/display_location.html
@@ -0,0 +1,124 @@
+[%
+
+ 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 ],
+ robots => 'noindex,nofollow';
+%]
+
+<form action="[% c.uri_for('/report/new') %]" method="post" name="mapForm" id="mapForm">
+[% 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 %]">
+[% c.cobrand.form_elements('mapForm') %]
+
+<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 %]
+
+<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' %]
+ |
+ [% 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 stale reports') %]</a>
+ [% ELSE %]
+ <a id='all_pins_link' rel='nofollow' href='[% c.uri_with( { no_pins => undef, all_pins => 1 } ) %]'>[% loc('Include stale reports') %]</a>
+ [% END %]
+ [% END %]
+</p>
+
+</div>
+<div id="side">
+
+<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>
+
+[% IF location_error %]
+ <ul class="error">
+ <li>[% location_error | html %]</li>
+ </ul>
+[% END %]
+
+<p id="text_map">
+ [% loc( 'To report a problem, simply <strong>click on the map</strong> 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
+ )
+ %]
+</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&nbsp;%skm)</small>' ),
+ distance
+ )
+ %]
+ </h2>
+
+ <ul id="current_near">
+ [% INCLUDE "around/around_map_list_items.html" %]
+ </ul>
+
+</div>
+
+</div>
+</form>
+
+[% INCLUDE 'footer.html' %]
diff --git a/templates/web/default/around/on_map_list_items.html b/templates/web/default/around/on_map_list_items.html
new file mode 100644
index 000000000..2db7d00d2
--- /dev/null
+++ b/templates/web/default/around/on_map_list_items.html
@@ -0,0 +1,13 @@
+[% IF on_map.size %]
+ [% FOREACH p IN on_map %]
+ <li>
+ <a href="[% c.uri_for('/report', p.id ) %]">[% p.title | html %]</a>
+ <small>[% prettify_epoch( p.confirmed_local.epoch, 1 ) %]</small>
+ [% IF p.state == 'fixed' %]
+ <small>[% loc('(fixed)') %]</small>
+ [% END %]
+ </li>
+ [% END %]
+[% ELSE %]
+ <li>[% loc('No problems have been reported yet.') %]</li>
+[% END %]