aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStruan Donald <struan@exo.org.uk>2013-01-17 13:03:39 +0000
committerStruan Donald <struan@exo.org.uk>2013-01-17 13:03:39 +0000
commit51e2cb1945508d904e907cb4424cc2344c3fd96c (patch)
tree0887c22e88f04ae3283a81db747066d30342131d
parent00d711fc3cb01050d69862e1c7dce5ff8dee6e34 (diff)
parentd3491b7ebc217c32b7da50d7c9b76e26fa0b6c4f (diff)
Merge remote-tracking branch 'origin/zurich' into zurich
-rw-r--r--perllib/FixMyStreet/App/Controller/Reports.pm5
-rw-r--r--perllib/FixMyStreet/DB/ResultSet/AlertType.pm3
-rw-r--r--templates/email/zurich/alert-update.txt11
-rw-r--r--templates/web/zurich/footer.html7
-rw-r--r--templates/web/zurich/header.html11
-rw-r--r--web/cobrands/zurich/base.scss5
-rw-r--r--web/cobrands/zurich/layout.scss21
7 files changed, 51 insertions, 12 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Reports.pm b/perllib/FixMyStreet/App/Controller/Reports.pm
index 39f9117e8..f4093ef21 100644
--- a/perllib/FixMyStreet/App/Controller/Reports.pm
+++ b/perllib/FixMyStreet/App/Controller/Reports.pm
@@ -5,6 +5,7 @@ use namespace::autoclean;
use File::Slurp;
use List::MoreUtils qw(zip);
use POSIX qw(strcoll);
+use RABX;
use mySociety::MaPit;
BEGIN { extends 'Catalyst::Controller'; }
@@ -393,6 +394,10 @@ sub load_and_group_problems : Private {
while ( my @problem = $problems->next ) {
my %problem = zip @cols, @problem;
$problem{is_fixed} = FixMyStreet::DB::Result::Problem->fixed_states()->{$problem{state}};
+ if ($problem{extra} && $c->cobrand->moniker eq 'zurich') { # Inflate
+ utf8::encode($problem{extra}) if utf8::is_utf8($problem{extra});
+ $problem{extra} = RABX::unserialise($problem{extra});
+ }
$c->log->debug( $problem{'cobrand'} . ', cobrand is ' . $c->cobrand->moniker );
if ( !$c->stash->{body}->id ) {
# An external_body entry
diff --git a/perllib/FixMyStreet/DB/ResultSet/AlertType.pm b/perllib/FixMyStreet/DB/ResultSet/AlertType.pm
index a502a4a25..5b6b33d94 100644
--- a/perllib/FixMyStreet/DB/ResultSet/AlertType.pm
+++ b/perllib/FixMyStreet/DB/ResultSet/AlertType.pm
@@ -94,8 +94,9 @@ sub email_alerts ($) {
}
# this is currently only for new_updates
if ($row->{item_text}) {
- if ( $row->{alert_user_id} == $row->{user_id} ) {
+ if ( $cobrand->moniker ne 'zurich' && $row->{alert_user_id} == $row->{user_id} ) {
# This is an alert to the same user who made the report - make this a login link
+ # Don't bother with Zurich which has no accounts
my $user = FixMyStreet::App->model('DB::User')->find( {
id => $row->{alert_user_id}
} );
diff --git a/templates/email/zurich/alert-update.txt b/templates/email/zurich/alert-update.txt
new file mode 100644
index 000000000..3f8da5f66
--- /dev/null
+++ b/templates/email/zurich/alert-update.txt
@@ -0,0 +1,11 @@
+Subject: New update on report - '<?=$values['title']?>'
+
+The following update has been left on this report:
+
+<?=$values['data']?>
+
+To view this report on the site, please visit the following URL:
+ <?=$values['problem_url']?>
+
+<?=$values['signature']?>
+
diff --git a/templates/web/zurich/footer.html b/templates/web/zurich/footer.html
index 2e4717360..499923b1c 100644
--- a/templates/web/zurich/footer.html
+++ b/templates/web/zurich/footer.html
@@ -5,6 +5,12 @@
<div class="nav-wrapper">
<div class="nav-wrapper-2">
<div id="main-nav" role="navigation">
+ [% IF c.user_exists %]
+ <p>
+ [% tprintf(loc('Hi %s'), c.user.name || c.user.email) %]
+ </p><p><a href="/auth/sign_out">[% loc('sign out') %]</a>
+ </p>
+ [% ELSE %]
<ul id="main-menu">
<li><[% IF c.req.uri.path == '/' %]span[% ELSE %]a href="/"[% END %]
>[% loc("Report a problem") %]</[% c.req.uri.path == '/' ? 'span' : 'a' %]></li>[%
@@ -13,6 +19,7 @@
%]<li><[% IF c.req.uri.path == '/faq' %]span[% ELSE %]a href="/faq"[% END
%]>[% loc("Help") %]</[% c.req.uri.path == '/faq' ? 'span' : 'a' %]></li>
</ul>
+ [% END %]
</div>
</div>
</div>
diff --git a/templates/web/zurich/header.html b/templates/web/zurich/header.html
index fdc4f1800..d47a05a0d 100644
--- a/templates/web/zurich/header.html
+++ b/templates/web/zurich/header.html
@@ -43,17 +43,6 @@
</div>
</header>
- <div id="user-meta">
- [% IF c.user_exists %]
- <p>
- [% tprintf(loc('Hi %s'), c.user.name || c.user.email) %]
- <a href="/auth/sign_out">[% loc('sign out') %]</a>
- </p>
- [% ELSE %]
- <!-- <a href="/auth">[% loc('Sign in') %]</a> -->
- [% END %]
- </div>
-
[% pre_container_extra %]
<div class="container">
diff --git a/web/cobrands/zurich/base.scss b/web/cobrands/zurich/base.scss
index b187c0d8e..61bcbacb7 100644
--- a/web/cobrands/zurich/base.scss
+++ b/web/cobrands/zurich/base.scss
@@ -63,5 +63,10 @@ h4.static-with-rule {
border-bottom: none;
li {
background: none;
+ .text {
+ .img {
+ padding-right: 1em;
+ }
+ }
}
}
diff --git a/web/cobrands/zurich/layout.scss b/web/cobrands/zurich/layout.scss
index b6e8337e1..cfd945034 100644
--- a/web/cobrands/zurich/layout.scss
+++ b/web/cobrands/zurich/layout.scss
@@ -47,6 +47,27 @@ body.mappage {
}
}
+.nav-wrapper-2 p:first-child {
+ font-weight: bold;
+ margin-top: 0.75em;
+}
+.nav-wrapper-2 p {
+ line-height: 1.2;
+ color: white;
+ clear: right;
+ float: right;
+ margin: 0 1em 0 0;
+ font-size: 85%;
+ a {
+ color: white;
+ font-size: 85%;
+ }
+ a:hover {
+ color: white;
+ }
+}
+
+/* TODO Change the main-nav to be what is wanted */
#main-nav {
ul#main-menu {
li {