aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--perllib/FixMyStreet/App.pm5
-rw-r--r--perllib/FixMyStreet/Cobrand/Base.pm2
-rw-r--r--templates/web/fixmystreet/alert/updates.html5
-rwxr-xr-xtemplates/web/fixmystreet/around/display_location.html10
-rw-r--r--templates/web/fixmystreet/report/display.html43
-rwxr-xr-xtemplates/web/fixmystreet/reports/council.html4
-rw-r--r--web/cobrands/fixmystreet/base.scss3
-rw-r--r--web/cobrands/fixmystreet/fixmystreet.js17
8 files changed, 43 insertions, 46 deletions
diff --git a/perllib/FixMyStreet/App.pm b/perllib/FixMyStreet/App.pm
index 18cad6b89..0582d88c9 100644
--- a/perllib/FixMyStreet/App.pm
+++ b/perllib/FixMyStreet/App.pm
@@ -151,8 +151,7 @@ sub setup_request {
my $cobrand = $c->cobrand;
# append the cobrand templates to the include path
- $c->stash->{additional_template_paths} =
- [ $cobrand->path_to_web_templates->stringify ]
+ $c->stash->{additional_template_paths} = $cobrand->path_to_web_templates
unless $cobrand->is_default;
# work out which language to use
@@ -411,7 +410,7 @@ call), use this method.
sub render_fragment {
my ($c, $template, $vars) = @_;
- $vars->{additional_template_paths} = [ $c->cobrand->path_to_web_templates->stringify ]
+ $vars->{additional_template_paths} = $c->cobrand->path_to_web_templates
if $vars && !$c->cobrand->is_default;
$c->view('Web')->render($c, $template, $vars);
}
diff --git a/perllib/FixMyStreet/Cobrand/Base.pm b/perllib/FixMyStreet/Cobrand/Base.pm
index 42a891cb4..fada33b78 100644
--- a/perllib/FixMyStreet/Cobrand/Base.pm
+++ b/perllib/FixMyStreet/Cobrand/Base.pm
@@ -62,7 +62,7 @@ Returns the path to the templates for this cobrand - by default
sub path_to_web_templates {
my $self = shift;
- return FixMyStreet->path_to( 'templates/web', $self->moniker );
+ return [ FixMyStreet->path_to( 'templates/web', $self->moniker )->stringify ];
}
1;
diff --git a/templates/web/fixmystreet/alert/updates.html b/templates/web/fixmystreet/alert/updates.html
index 73d3727e6..2240844e4 100644
--- a/templates/web/fixmystreet/alert/updates.html
+++ b/templates/web/fixmystreet/alert/updates.html
@@ -5,6 +5,11 @@
[% INCLUDE 'errors.html' %]
+<p><a href="[% c.uri_for( '/rss', problem_id ) %]">
+ <img src="/i/feed.png" width="16" height="16" title="[% loc('RSS feed') %]" alt="[% loc('RSS feed of updates to this problem' ) %]" border="0" style="float:right">
+ </a>
+</p>
+
<p>
[% loc('Receive email when updates are left on this problem.') %]
</p>
diff --git a/templates/web/fixmystreet/around/display_location.html b/templates/web/fixmystreet/around/display_location.html
index 051ea85a3..c98982a60 100755
--- a/templates/web/fixmystreet/around/display_location.html
+++ b/templates/web/fixmystreet/around/display_location.html
@@ -82,18 +82,10 @@
<div class="shadow-wrap">
<ul id="key-tools" class="singleton">
- <li><a class="feed" id="updates_link" href="[% email_url | html %]">Get updates</a></li>
+ <li><a class="feed" id="key-tool-around-updates" href="[% email_url | html %]">Get updates</a></li>
</ul>
</div>
-<!-- <div id="email_alert_box">
- <ul>
- <li><a href="[% rss_url | html %]" id="rss_alert">[% rss_alt %]</a></li>
- <li><a rel="nofollow" href="[% email_url | html %]">[%- loc('Email me new local problems') -%]</a></li>
- </ul>
- </div> -->
-
-
<section class="full-width">
<menu id="problems-nav" class="tab-nav">
<ul>
diff --git a/templates/web/fixmystreet/report/display.html b/templates/web/fixmystreet/report/display.html
index 78dee48a5..afb7857d0 100644
--- a/templates/web/fixmystreet/report/display.html
+++ b/templates/web/fixmystreet/report/display.html
@@ -22,35 +22,32 @@
[% INCLUDE 'report/_main.html' %]
-
-
-
+<div id="report-updates-data" class="hidden-js">
+ <form action="[% c.uri_for( '/alert/subscribe' ) %]" method="post">
+ <p><a href="[% c.uri_for( '/rss', problem.id ) %]">
+ <img src="/i/feed.png" width="16" height="16" title="[% loc('RSS feed') %]" alt="[% loc('RSS feed of updates to this problem' ) %]" border="0" style="float: right">
+ </a></p>
+ <p>[% loc('Receive email when updates are left on this problem.' ) %]</p>
+ <fieldset>
+ <label class="hidden n" for="alert_rznvy">[% loc('Your email') %]</label>
+ <div class="form-txt-submit-box">
+ <input type="email" name="rznvy" id="alert_rznvy" value="[% email | html %]" size="30" placeholder="[% loc('Your email') %]">
+ <input class="green-btn" type="submit" value="[% loc('Subscribe') %]">
+ </div>
+ <input type="hidden" name="id" value="[% problem.id %]">
+ <input type="hidden" name="type" value="updates">
+ </fieldset>
+ </form>
+</div>
<div class="shadow-wrap">
<ul id="key-tools">
- <li><a rel="nofollow" class="abuse" href="[% c.uri_for( '/contact', { id => problem.id } ) %]">[% loc('Report abuse' ) %]</a></li>
- <li><a rel="nofollow" id="email_alert" class="feed" href="[% c.uri_for( '/alert/subscribe', { id => problem.id } ) %]">[% loc('Get updates' ) %]</a></li>
- <li><a class="chevron" href="[% c.uri_for( '/around', { lat => short_latitude, lon => short_longitude } ) %]">[% loc( 'Problems nearby' ) %]</a></li>
+ <li><a rel="nofollow" id="key-tool-report-abuse" class="abuse" href="[% c.uri_for( '/contact', { id => problem.id } ) %]">[% loc('Report abuse' ) %]</a></li>
+ <li><a rel="nofollow" id="key-tool-report-updates" class="feed" href="[% c.uri_for( '/alert/subscribe', { id => problem.id } ) %]">[% loc('Get updates' ) %]</a></li>
+ <li><a class="chevron" id="key-tool-problems-nearby" href="[% c.uri_for( '/around', { lat => short_latitude, lon => short_longitude } ) %]">[% loc( 'Problems nearby' ) %]</a></li>
</ul>
-</div>
-<!-- <div id="alert_links">
- <a rel="nofollow" id="email_alert" href="[% c.uri_for( '/alert/subscribe', { id => problem.id } ) %]">[% loc('Email me updates' ) %]</a>
-
- <form action="[% c.uri_for( '/alert/subscribe' ) %]" method="post" id="email_alert_box">
- <p>[% loc('Receive email when updates are left on this problem.' ) %]</p>
- <label class="n" for="alert_rznvy">[% loc('Email:') %]</label>
- <input type="email" name="rznvy" id="alert_rznvy" value="[% email | html %]" size="30">
- <input type="hidden" name="id" value="[% problem.id %]">
- <input type="hidden" name="type" value="updates">
- <input type="submit" value="[% loc('Subscribe') %]">
- </form>
- &nbsp;
- <a href="[% c.uri_for( '/rss', problem.id ) %]">
- <img src="/i/feed.png" width="16" height="16" title="[% loc('RSS feed') %]" alt="[% loc('RSS feed of updates to this problem' ) %]" border="0" style="vertical-align: middle">
- </a>
</div>
- -->
[% INCLUDE 'report/updates.html' %]
diff --git a/templates/web/fixmystreet/reports/council.html b/templates/web/fixmystreet/reports/council.html
index 8beddfed2..275fe35d4 100755
--- a/templates/web/fixmystreet/reports/council.html
+++ b/templates/web/fixmystreet/reports/council.html
@@ -50,9 +50,9 @@
[% ELSE %]
<div class="shadow-wrap">
<ul id="key-tools"[% IF NOT children.size %] class="singleton"[% END %]>
- <li><a rel="nofollow" id="email_alert" class="feed" href="[% rss_url %]">[% tprintf(loc('Get updates of problems in this %s'), thing) %]</a></li>
+ <li><a rel="nofollow" id="key-tool-updates-area" class="feed" href="[% rss_url %]">[% tprintf(loc('Get updates of problems in this %s'), thing) %]</a></li>
[% IF children.size %]
- <li><a href="#council_wards" id="council_wards_link" class="chevron">[% loc('Wards of this council') %]</a>
+ <li><a href="#council_wards" id="key-tool-wards" class="chevron">[% loc('Wards of this council') %]</a>
[% END %]
</ul>
</div>
diff --git a/web/cobrands/fixmystreet/base.scss b/web/cobrands/fixmystreet/base.scss
index c4b3ea283..9fb8f165e 100644
--- a/web/cobrands/fixmystreet/base.scss
+++ b/web/cobrands/fixmystreet/base.scss
@@ -1151,6 +1151,9 @@ a:hover.button-left {
color: #222222;
font-size:0.75em !important;
}
+.olControlAttribution img {
+ vertical-align: bottom;
+}
.olControlPermalink {
bottom: 3px !important;
right: 3px;
diff --git a/web/cobrands/fixmystreet/fixmystreet.js b/web/cobrands/fixmystreet/fixmystreet.js
index 68e870201..1d18b4d98 100644
--- a/web/cobrands/fixmystreet/fixmystreet.js
+++ b/web/cobrands/fixmystreet/fixmystreet.js
@@ -153,11 +153,6 @@ $(function(){
$('#another_qn').hide('fast');
});
- var timer;
- function email_alert_close() {
- $('#email_alert_box').hide('fast');
- }
-
// FIXME - needs to use translated string
jQuery.validator.addMethod('validCategory', function(value, element) {
return this.optional(element) || value != '-- Pick a category --'; }, validation_strings.category );
@@ -382,9 +377,14 @@ $.fn.drawer = function(id, ajax) {
if (!d.length) {
d = $('<div id="' + id + '">');
}
+ var max_height = $(window).height() - $('.content').offset().top - $('.shadow-wrap').height();
+ var height = d.height();
+ if (!height || height > max_height) {
+ height = max_height;
+ }
d.css({
backgroundColor: 'white',
- height: $(window).height() - $('.content').offset().top - $('.shadow-wrap').height(),
+ height: height,
display: 'none', zIndex: 1001, position: 'relative',
overflow: 'auto',
padding: '1em'
@@ -405,8 +405,9 @@ $.fn.drawer = function(id, ajax) {
});
};
- $('#council_wards_link').drawer('council_wards', false);
- $('#updates_link').drawer('updates_ajax', true);
+ $('#key-tool-wards').drawer('council_wards', false);
+ $('#key-tool-around-updates').drawer('updates_ajax', true);
+ $('#key-tool-report-updates').drawer('report-updates-data', false);
// Go directly to RSS feed if RSS button clicked on alert page
// (due to not wanting around form to submit, though good thing anyway)