diff options
| -rw-r--r-- | perllib/FixMyStreet/App/Controller/Photo.pm | 6 | ||||
| -rw-r--r-- | templates/web/base/alert/index.html | 22 | ||||
| -rw-r--r-- | templates/web/base/alert/list.html | 32 | ||||
| -rw-r--r-- | web/cobrands/sass/_base.scss | 20 | 
4 files changed, 48 insertions, 32 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Photo.pm b/perllib/FixMyStreet/App/Controller/Photo.pm index e8025e0a1..f4866cc26 100644 --- a/perllib/FixMyStreet/App/Controller/Photo.pm +++ b/perllib/FixMyStreet/App/Controller/Photo.pm @@ -61,12 +61,6 @@ sub index :LocalRegex('^(c/)?(\d+)(?:\.(\d+))?(?:\.(full|tn|fp))?\.jpeg$') {              photo => { '!=', undef },          } );      } else { -        # GoogleBot-Image is doing this for some reason? -        if ( $id =~ m{ ^(\d+) \D .* $ }x ) { -            return $c->res->redirect( $c->uri_with( { id => $1 } ), 301 ); -        } - -        $c->detach( 'no_photo' ) if $id =~ /\D/;          ($item) = $c->cobrand->problems->search( {              id => $id,              state => [ FixMyStreet::DB::Result::Problem->visible_states() ], diff --git a/templates/web/base/alert/index.html b/templates/web/base/alert/index.html index 2b12182df..7057c83a3 100644 --- a/templates/web/base/alert/index.html +++ b/templates/web/base/alert/index.html @@ -1,4 +1,4 @@ -[% INCLUDE 'header.html', title = loc('Local RSS feeds and email alerts'), bodyclass = 'twothirdswidthpage' %] +[% INCLUDE 'header.html', title = loc('Local RSS feeds and email alerts'), bodyclass = 'fullwidthpage' %]  <h1>[% loc('Local RSS feeds and email alerts') %]</h1> @@ -37,16 +37,16 @@ within a certain distance of a particular location.', "%s is the site name"), si  </form>  [% IF photos.size %] -<div id="alert_recent"> -  <aside> -    <h2>[% loc('Some photos of recent reports') %]</h2> -    [% FOREACH p IN photos; -        photo = p.get_photo_params; -    %] -        <a href="/report/[% p.id %]"><img border="0" height="100" -            src="[% photo.url_tn %]" alt="[% p.title | html %]" title="[% p.title | html %]"></a> -    [% END %] -  </aside> +<h2>[% loc('Some photos of recent reports') %]</h2> +<div class="alerts__nearby-activity__photos"> +  [% FOREACH p IN photos; +    photo = p.get_photo_params; +  %] +    <a href="/report/[% p.id %]"> +        <img border="0" height="100" src="[% photo.url_tn %]" +        alt="[% p.title | html %]" title="[% p.title | html %]"> +    </a> +  [% END %]  </div>  [% END %] diff --git a/templates/web/base/alert/list.html b/templates/web/base/alert/list.html index 7b262f9e7..289eb40af 100644 --- a/templates/web/base/alert/list.html +++ b/templates/web/base/alert/list.html @@ -6,7 +6,7 @@      END;  %] -[% INCLUDE 'header.html', title = title, bodyclass = 'twothirdswidthpage' %] +[% INCLUDE 'header.html', title = title, bodyclass = 'fullwidthpage' %]  [% IF pretty_pc %]      [% @@ -18,21 +18,23 @@  <h1>[% title %]</h1> -<form id="alerts" name="alerts" method="post" action="/alert/subscribe"> - -  [% IF photos.size %] -    <div id="alert_photos"> -      <aside> -        <h2>[% loc('Photos of recent nearby reports') %]</h2> -        [% FOREACH p IN photos; -            photo = p.get_photo_params; -        %] -            <a href="/report/[% p.id %]"><img border="0" height="100" -                src="[% photo.url_tn %]" alt="[% p.title | html %]" title="[% p.title | html %]"></a> -        [% END %] -      </aside> +[% IF photos.size %] +<div class="alerts__nearby-activity"> +    <h2>[% loc('Photos of recent nearby reports') %]</h2> +    <div class="alerts__nearby-activity__photos"> +      [% FOREACH p IN photos; +        photo = p.get_photo_params; +      %] +        <a href="/report/[% p.id %]"> +            <img border="0" height="100" src="[% photo.url_tn %]" +            alt="[% p.title | html %]" title="[% p.title | html %]"> +        </a> +      [% END %]      </div> -  [% END %] +</div> +[% END %] + +<form id="alerts" name="alerts" method="post" action="/alert/subscribe">    [% INCLUDE 'alert/_list.html' %] diff --git a/web/cobrands/sass/_base.scss b/web/cobrands/sass/_base.scss index 2a2a40a16..79ed91d97 100644 --- a/web/cobrands/sass/_base.scss +++ b/web/cobrands/sass/_base.scss @@ -1575,6 +1575,26 @@ table.nicetable {      }  } +.alerts__nearby-activity { +    background-color: #f6f6f6; +    margin: 1em -1em; +    padding: 1em; + +    & > :first-child { +        margin-top: 0; +    } +} + +.alerts__nearby-activity__photos { +    white-space: nowrap; +    overflow: hidden; + +    a { +        margin-right: 0.5em; +        text-decoration: none; // avoid underline showing between images +    } +} +  .confirmation-header {    padding: 140px 0 2em;    text-align: center;  | 
