aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xtemplates/web/fixmybarangay/around/display_location.html115
-rw-r--r--templates/web/fixmybarangay/header.html3
-rw-r--r--web/cobrands/fixmybarangay/position_map.js22
3 files changed, 139 insertions, 1 deletions
diff --git a/templates/web/fixmybarangay/around/display_location.html b/templates/web/fixmybarangay/around/display_location.html
new file mode 100755
index 000000000..5dbc13d05
--- /dev/null
+++ b/templates/web/fixmybarangay/around/display_location.html
@@ -0,0 +1,115 @@
+[%
+
+ 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' ) %]
+ </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' %]
diff --git a/templates/web/fixmybarangay/header.html b/templates/web/fixmybarangay/header.html
index 9779a4919..49fd48e6c 100644
--- a/templates/web/fixmybarangay/header.html
+++ b/templates/web/fixmybarangay/header.html
@@ -18,7 +18,8 @@
<link rel="stylesheet" href="[% version('/cobrands/fixmybarangay/layout.css') %]">
<![endif]-->
- <script src="[% version('/js/modernizr.custom.76759.js') %]" charset="utf-8"></script>
+ <script src="[% version('/js/modernizr.custom.js') %]" charset="utf-8"></script>
+ <script src="[% version('/cobrands/fixmybarangay/position_map.js') %]" charset="utf-8"></script>
[% INCLUDE 'common_header_tags.html', js_override = '/cobrands/fixmystreet/fixmystreet.js' %]
<script src="[% version('/js/fancybox/jquery.fancybox-1.3.4.pack.js') %]" charset="utf-8"></script>
<script src="[% version('/cobrands/fixmybarangay/messages.js') %]" charset="utf-8"></script>
diff --git a/web/cobrands/fixmybarangay/position_map.js b/web/cobrands/fixmybarangay/position_map.js
new file mode 100644
index 000000000..753b5f854
--- /dev/null
+++ b/web/cobrands/fixmybarangay/position_map.js
@@ -0,0 +1,22 @@
+function position_map_box() {
+ var $html = $('html');
+ if ($html.hasClass('ie6')) {
+ $('#map_box').prependTo('.wrapper').css({
+ zIndex: 0, position: 'absolute',
+ top: 0, left: 0, right: 0, bottom: 0,
+ width: '100%', height: $(window).height(),
+ margin: 0
+ });
+ } else {
+ $('#map_box').prependTo('.wrapper').css({
+ zIndex: 0, position: 'fixed',
+ top: 0, left: 0, right: 0, bottom: 0,
+ width: '100%', height: '100%',
+ margin: 0
+ });
+ }
+}
+
+function map_fix() {}
+var slide_wards_down = 0;
+