diff options
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Tokens.pm | 1 | ||||
-rw-r--r-- | perllib/FixMyStreet/DB/Result/Problem.pm | 3 | ||||
-rw-r--r-- | templates/web/fixmystreet.com/next_steps.html | 5 | ||||
-rw-r--r-- | web/cobrands/fixmystreet.com/layout.scss | 4 |
4 files changed, 11 insertions, 2 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Tokens.pm b/perllib/FixMyStreet/App/Controller/Tokens.pm index ba15162ce..c10904f8f 100644 --- a/perllib/FixMyStreet/App/Controller/Tokens.pm +++ b/perllib/FixMyStreet/App/Controller/Tokens.pm @@ -34,6 +34,7 @@ sub confirm_problem : Path('/P') { title => 'Title of Report', bodies_str => 'True', url => '/report/123', + service => $c->get_param('service'), }; return; } diff --git a/perllib/FixMyStreet/DB/Result/Problem.pm b/perllib/FixMyStreet/DB/Result/Problem.pm index 449bb5be8..237785820 100644 --- a/perllib/FixMyStreet/DB/Result/Problem.pm +++ b/perllib/FixMyStreet/DB/Result/Problem.pm @@ -363,7 +363,8 @@ around lastupdate => $stz; around service => sub { my ( $orig, $self ) = ( shift, shift ); - my $s = $self->$orig(@_); + # service might be undef if e.g. unsaved code report + my $s = $self->$orig(@_) || ""; $s =~ s/_/ /g; return $s; }; diff --git a/templates/web/fixmystreet.com/next_steps.html b/templates/web/fixmystreet.com/next_steps.html index 5a26a67fe..2bfc23ddb 100644 --- a/templates/web/fixmystreet.com/next_steps.html +++ b/templates/web/fixmystreet.com/next_steps.html @@ -2,8 +2,10 @@ [% DEFAULT share_url = c.cobrand.base_url %] [% DEFAULT twitter_comment = 'I just used @fixmystreet, you should try it!' %] +[% SET app_step = 1 IF NOT report OR NOT report.service %] -<div class="next-steps"> +<div class="next-steps[% ' next-steps--two' IF NOT app_step %]"> + [% IF app_step %] <div class="next-steps__step next-steps__step--apps"> [% IF just_interacted %] <h2>[% loc('Next time, try our mobile app!') %]</h2> @@ -16,6 +18,7 @@ <a href="https://play.google.com/store/apps/details?id=org.mysociety.FixMyStreet"><img src="/cobrands/fixmystreet.com/images/next-step-google.png" alt="Android app on Google Play" width="120" height="37"></a> </p> </div> + [% END %] <div class="next-steps__step next-steps__step--social"> [% IF just_interacted %] <h2>[% loc('Great work. Now spread the word!') %]</h2> diff --git a/web/cobrands/fixmystreet.com/layout.scss b/web/cobrands/fixmystreet.com/layout.scss index 9e8bb5baf..55ebe1743 100644 --- a/web/cobrands/fixmystreet.com/layout.scss +++ b/web/cobrands/fixmystreet.com/layout.scss @@ -262,6 +262,10 @@ body.twothirdswidthpage { } } +.next-steps--two .next-steps__step { + width: 50%; +} + body.unresponsive-council { .container .content { padding: 0; |