aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/FixMyStreet/App/Controller/My.pm7
-rw-r--r--perllib/FixMyStreet/Cobrand/Default.pm3
-rw-r--r--perllib/FixMyStreet/Map/FMS.pm2
-rw-r--r--templates/web/default/my/my.html14
-rw-r--r--web/css/core.css5
-rw-r--r--web/css/core.scss5
-rw-r--r--web/js/map-bing-ol.js6
7 files changed, 37 insertions, 5 deletions
diff --git a/perllib/FixMyStreet/App/Controller/My.pm b/perllib/FixMyStreet/App/Controller/My.pm
index 8cb807e09..74f7a6d52 100644
--- a/perllib/FixMyStreet/App/Controller/My.pm
+++ b/perllib/FixMyStreet/App/Controller/My.pm
@@ -25,6 +25,9 @@ sub my : Path : Args(0) {
$c->detach( '/auth/redirect' ) unless $c->user;
+ # Even though front end doesn't yet have it, have it on this page, it's better!
+ FixMyStreet::Map::set_map_class( 'FMS' );
+
my $pins = [];
my $problems = {};
foreach my $problem ( $c->user->problems ) {
@@ -39,6 +42,10 @@ sub my : Path : Args(0) {
}
$c->stash->{problems} = $problems;
+ my @updates = $c->user->comments->search( {
+ state => 'confirmed',
+ } )->all;
+ $c->stash->{updates} = \@updates;
FixMyStreet::Map::display_map(
$c,
diff --git a/perllib/FixMyStreet/Cobrand/Default.pm b/perllib/FixMyStreet/Cobrand/Default.pm
index 864415b4c..4ea572093 100644
--- a/perllib/FixMyStreet/Cobrand/Default.pm
+++ b/perllib/FixMyStreet/Cobrand/Default.pm
@@ -405,7 +405,8 @@ sub uri {
$uri = URI->new( $uri );
$uri->query_param( zoom => 3 )
if $uri->query_param('lat') && !$uri->query_param('zoom');
- $uri->query_param( map => $map_class ); # FIXME Only on /around, /report?
+
+ # $uri->query_param( map => $map_class ); # FIXME Only on /around, /report?
return $uri;
}
diff --git a/perllib/FixMyStreet/Map/FMS.pm b/perllib/FixMyStreet/Map/FMS.pm
index a5a2dd9f0..c54ee8f3b 100644
--- a/perllib/FixMyStreet/Map/FMS.pm
+++ b/perllib/FixMyStreet/Map/FMS.pm
@@ -21,7 +21,7 @@ sub map_template {
}
sub copyright {
- return _('Map contains Ordnance Survey data © Crown copyright and database right 2010. Microsoft');
+ return _('Map contains Ordnance Survey data &copy; Crown copyright and database right 2010.<br>&copy; 2011 <a href="http://www.bing.com/maps/">Microsoft</a>. &copy; AND, Navteq, Ordnance Survey.');
}
sub get_quadkey {
diff --git a/templates/web/default/my/my.html b/templates/web/default/my/my.html
index 4393316c5..08b6a6693 100644
--- a/templates/web/default/my/my.html
+++ b/templates/web/default/my/my.html
@@ -1,5 +1,4 @@
[%
- pre_map = '<h2>' _ loc('Your latest problem') _ '</h2>';
PROCESS "maps/${map.type}.html" IF c.user.problems;
INCLUDE 'header.html', title = loc('Your Reports')
%]
@@ -31,6 +30,17 @@
INCLUDE problem;
END %]
+[% FOREACH u IN updates %]
+ [% IF loop.first %]<h2>[% loc('Your updates') %]</h2><ul>[% END %]
+ <li>&ldquo;[% u.text | html %]&rdquo;
+ &ndash; <a href="[% c.uri_for( '/report', u.problem_id ) %]#update_[% u.id %]">[% u.problem.title | html %]</a>.
+ <em class="council_sent_info">
+ [% tprintf( loc("Added %s"), prettify_epoch( u.confirmed_local.epoch, 'date' ) ) %]
+ </em>
+ </li>
+ [% "</ul>" IF loop.last %]
+[% END %]
+
</div>
[% INCLUDE 'footer.html' %]
@@ -38,7 +48,7 @@ END %]
[% BLOCK problem %]
[% "<ul>" IF loop.first %]
- <li><a href="[% c.uri_for( '/report', p.id ) %]">[% p.title | html %]</a>
+ <li><a href="[% c.uri_for( '/report', p.id ) %]">[% p.title | html %]</a>.
<em class="council_sent_info">
[% IF p.whensent %]
[% tprintf( loc("Reported %s to %s"), prettify_epoch( p.confirmed_local.epoch, 'date' ), p.body(c) ) %]
diff --git a/web/css/core.css b/web/css/core.css
index 576437251..a67c54f17 100644
--- a/web/css/core.css
+++ b/web/css/core.css
@@ -377,6 +377,11 @@
margin-top: 2em;
}
+.olControlAttribution {
+ bottom: 3px !important;
+ left: 3px;
+}
+
@media print {
#mysociety #map_box {
float: none;
diff --git a/web/css/core.scss b/web/css/core.scss
index 246a33167..74e62f481 100644
--- a/web/css/core.scss
+++ b/web/css/core.scss
@@ -507,6 +507,11 @@ $map_width: 500px;
}
+.olControlAttribution {
+ bottom: 3px !important;
+ left: 3px;
+}
+
// Printing, SCSS doesn't handle @media nesting
@media print {
diff --git a/web/js/map-bing-ol.js b/web/js/map-bing-ol.js
index c3c3b994e..75bce80d3 100644
--- a/web/js/map-bing-ol.js
+++ b/web/js/map-bing-ol.js
@@ -1,5 +1,6 @@
function set_map_config(perm) {
fixmystreet.controls = [
+ new OpenLayers.Control.Attribution(),
new OpenLayers.Control.ArgParser(),
new OpenLayers.Control.Navigation(),
perm,
@@ -9,6 +10,9 @@ function set_map_config(perm) {
}
OpenLayers.Layer.Bing = OpenLayers.Class(OpenLayers.Layer.XYZ, {
+ attribution: '<a href="http://www.bing.com/maps/">' +
+ '<img border=0 src="http://dev.virtualearth.net/Branding/logo_powered_by.png"></a>',
+
initialize: function(name, options) {
var url = [];
options = OpenLayers.Util.extend({
@@ -18,7 +22,7 @@ OpenLayers.Layer.Bing = OpenLayers.Class(OpenLayers.Layer.XYZ, {
transitionEffect: "resize",
sphericalMercator: true,
buffer: 0,
- attribution: "© Microsoft / OS 2010"
+ //attribution: "© Microsoft / OS 2010"
}, options);
var newArguments = [name, url, options];
OpenLayers.Layer.XYZ.prototype.initialize.apply(this, newArguments);