diff options
-rw-r--r-- | locale/nb_NO.UTF-8/LC_MESSAGES/FixMyStreet.po | 4 | ||||
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Admin.pm | 11 | ||||
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Reports.pm | 12 | ||||
-rwxr-xr-x | perllib/FixMyStreet/App/Controller/Rss.pm | 4 | ||||
-rw-r--r-- | templates/web/default/admin/index.html | 2 | ||||
-rw-r--r-- | templates/web/default/maps/openlayers.html | 14 |
6 files changed, 32 insertions, 15 deletions
diff --git a/locale/nb_NO.UTF-8/LC_MESSAGES/FixMyStreet.po b/locale/nb_NO.UTF-8/LC_MESSAGES/FixMyStreet.po index a08db82c9..dd4aa6cc4 100644 --- a/locale/nb_NO.UTF-8/LC_MESSAGES/FixMyStreet.po +++ b/locale/nb_NO.UTF-8/LC_MESSAGES/FixMyStreet.po @@ -287,11 +287,11 @@ msgstr "<strong>Nei</strong>, det gjør jeg ikke. La meg logge inn med e-post:" #: templates/web/default/report/new/fill_in_details_form.html:154 msgid "<strong>No</strong>, let me confirm my report by email:" -msgstr "<strong>No</strong>, la meg bekrefte min rapport med e-post:" +msgstr "<strong>Nei</strong>, la meg bekrefte min rapport med e-post:" #: templates/web/default/report/display.html:160 msgid "<strong>No</strong>, let me confirm my update by email:" -msgstr "<strong>No</strong>, la meg bekrefte min oppdatering med e-post:" +msgstr "<strong>Nei</strong>, la meg bekrefte min oppdatering med e-post:" #: templates/web/default/auth/general.html:37 #: templates/web/default/report/display.html:142 diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm index 3282ae831..8e4f4b5de 100644 --- a/perllib/FixMyStreet/App/Controller/Admin.pm +++ b/perllib/FixMyStreet/App/Controller/Admin.pm @@ -171,11 +171,16 @@ sub questionnaire : Path('questionnaire') : Args(0) { $c->forward('check_page_allowed'); my $questionnaires = $c->model('DB::Questionnaire')->search( - { whenanswered => \'is not null' }, { group_by => [ 'ever_reported' ], select => [ 'ever_reported', { count => 'me.id' } ], as => [qw/reported questionnaire_count/] } + { whenanswered => { '!=', undef } }, + { group_by => [ 'ever_reported' ], + select => [ 'ever_reported', { count => 'me.id' } ], + as => [ qw/reported questionnaire_count/ ] } ); - - my %questionnaire_counts = map { ( $_->get_column( 'reported' ) || -1 ) => $_->get_column( 'questionnaire_count' ) } $questionnaires->all; + my %questionnaire_counts = map { + ( defined $_->get_column( 'reported' ) ? $_->get_column( 'reported' ) : -1 ) + => $_->get_column( 'questionnaire_count' ) + } $questionnaires->all; $questionnaire_counts{1} ||= 0; $questionnaire_counts{0} ||= 0; $questionnaire_counts{total} = $questionnaire_counts{0} + $questionnaire_counts{1}; diff --git a/perllib/FixMyStreet/App/Controller/Reports.pm b/perllib/FixMyStreet/App/Controller/Reports.pm index f7fb5dec5..93af3393c 100644 --- a/perllib/FixMyStreet/App/Controller/Reports.pm +++ b/perllib/FixMyStreet/App/Controller/Reports.pm @@ -319,8 +319,20 @@ sub load_and_group_problems : Private { }; if ($c->stash->{ward}) { $where->{areas} = { 'like', '%,' . $c->stash->{ward}->{id} . ',%' }; + $where->{council} = [ + undef, + $c->stash->{council}->{id}, + { 'like', $c->stash->{council}->{id} . ',%' }, + { 'like', '%,' . $c->stash->{council}->{id} }, + ]; } elsif ($c->stash->{council}) { $where->{areas} = { 'like', '%,' . $c->stash->{council}->{id} . ',%' }; + $where->{council} = [ + undef, + $c->stash->{council}->{id}, + { 'like', $c->stash->{council}->{id} . ',%' }, + { 'like', '%,' . $c->stash->{council}->{id} }, + ]; } my $problems = $c->cobrand->problems->search( $where, diff --git a/perllib/FixMyStreet/App/Controller/Rss.pm b/perllib/FixMyStreet/App/Controller/Rss.pm index 767d38c21..23345df65 100755 --- a/perllib/FixMyStreet/App/Controller/Rss.pm +++ b/perllib/FixMyStreet/App/Controller/Rss.pm @@ -194,7 +194,7 @@ sub generate : Private { my $out = $c->stash->{rss}->as_string; my $uri = $c->uri_for( '/' . $c->req->path ); - $out =~ s{<link>(.*?)</link>}{"<link>" . $c->uri_for( $1 ) . "</link><uri>$uri</uri>"}e; + $out =~ s{(<link>.*?</link>)}{$1<uri>$uri</uri>}; $c->response->header('Content-Type' => 'application/xml; charset=utf-8'); $c->response->body( $out ); @@ -306,7 +306,7 @@ sub add_parameters : Private { $c->stash->{rss}->channel( title => ent($title), - link => $link . ($c->stash->{qs} || ''), + link => $c->uri_for($link) . ($c->stash->{qs} || ''), description => ent($desc), language => 'en-gb', ); diff --git a/templates/web/default/admin/index.html b/templates/web/default/admin/index.html index d1ed09114..b1eddaa3a 100644 --- a/templates/web/default/admin/index.html +++ b/templates/web/default/admin/index.html @@ -21,7 +21,7 @@ [% IF c.cobrand.admin_show_creation_graph -%] <p> - <a href="">[% loc('Graph of problem creation by status over time') %]</a> + <a href="[% c.config.BASE_URL %]/bci-live-creation.png">[% loc('Graph of problem creation by status over time') %]</a> </p> [% END -%] diff --git a/templates/web/default/maps/openlayers.html b/templates/web/default/maps/openlayers.html index 41e1c40d6..aab5180b6 100644 --- a/templates/web/default/maps/openlayers.html +++ b/templates/web/default/maps/openlayers.html @@ -65,13 +65,13 @@ var fixmystreet = { SET zoom_out = '#' IF map.zoom <= 0; %] <div style="position: absolute; left: 4px; top: 4px; z-index: 1007;" class="olControlPanZoom olControlNoSelect" unselectable="on"> - <div style="position: absolute; left: 13px; top: 4px; width: 18px; height: 18px;"><a href="[% north %]"><img style="position: relative; width: 18px; height: 18px;" src="/jslib/OpenLayers-2.10/img/north-mini.png" border="0"></a></div> - <div style="position: absolute; left: 4px; top: 22px; width: 18px; height: 18px;"><a href="[% west %]"><img style="position: relative; width: 18px; height: 18px;" src="/jslib/OpenLayers-2.10/img/west-mini.png" border="0"></a></div> - <div style="position: absolute; left: 22px; top: 22px; width: 18px; height: 18px;"><a href="[% east %]"><img style="position: relative; width: 18px; height: 18px;" src="/jslib/OpenLayers-2.10/img/east-mini.png" border="0"></a></div> - <div style="position: absolute; left: 13px; top: 40px; width: 18px; height: 18px;"><a href="[% south %]"><img style="position: relative; width: 18px; height: 18px;" src="/jslib/OpenLayers-2.10/img/south-mini.png" border="0"></a></div> - <div style="position: absolute; left: 13px; top: 63px; width: 18px; height: 18px;"><a href="[% zoom_in %]"><img style="position: relative; width: 18px; height: 18px;" src="/jslib/OpenLayers-2.10/img/zoom-plus-mini.png" border="0"></a></div> - <div style="position: absolute; left: 13px; top: 81px; width: 18px; height: 18px;"><a href="[% world %]"><img style="position: relative; width: 18px; height: 18px;" src="/jslib/OpenLayers-2.10/img/zoom-world-mini.png" border="0"></a></div> - <div style="position: absolute; left: 13px; top: 99px; width: 18px; height: 18px;"><a href="[% zoom_out %]"><img style="position: relative; width: 18px; height: 18px;" src="/jslib/OpenLayers-2.10/img/zoom-minus-mini.png" border="0"></a></div> + <div style="position: absolute; left: 13px; top: 4px; width: 18px; height: 18px;"><a rel="nofollow" href="[% north %]"><img style="position: relative; width: 18px; height: 18px;" src="/jslib/OpenLayers-2.10/img/north-mini.png" border="0"></a></div> + <div style="position: absolute; left: 4px; top: 22px; width: 18px; height: 18px;"><a rel="nofollow" href="[% west %]"><img style="position: relative; width: 18px; height: 18px;" src="/jslib/OpenLayers-2.10/img/west-mini.png" border="0"></a></div> + <div style="position: absolute; left: 22px; top: 22px; width: 18px; height: 18px;"><a rel="nofollow" href="[% east %]"><img style="position: relative; width: 18px; height: 18px;" src="/jslib/OpenLayers-2.10/img/east-mini.png" border="0"></a></div> + <div style="position: absolute; left: 13px; top: 40px; width: 18px; height: 18px;"><a rel="nofollow" href="[% south %]"><img style="position: relative; width: 18px; height: 18px;" src="/jslib/OpenLayers-2.10/img/south-mini.png" border="0"></a></div> + <div style="position: absolute; left: 13px; top: 63px; width: 18px; height: 18px;"><a rel="nofollow" href="[% zoom_in %]"><img style="position: relative; width: 18px; height: 18px;" src="/jslib/OpenLayers-2.10/img/zoom-plus-mini.png" border="0"></a></div> + <div style="position: absolute; left: 13px; top: 81px; width: 18px; height: 18px;"><a rel="nofollow" href="[% world %]"><img style="position: relative; width: 18px; height: 18px;" src="/jslib/OpenLayers-2.10/img/zoom-world-mini.png" border="0"></a></div> + <div style="position: absolute; left: 13px; top: 99px; width: 18px; height: 18px;"><a rel="nofollow" href="[% zoom_out %]"><img style="position: relative; width: 18px; height: 18px;" src="/jslib/OpenLayers-2.10/img/zoom-minus-mini.png" border="0"></a></div> </div> [% END %] |