diff options
-rw-r--r-- | notes/catalyst-master-merge-todos.txt | 2 | ||||
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Report/New.pm | 17 | ||||
-rw-r--r-- | templates/web/default/header.html | 2 | ||||
-rw-r--r-- | templates/web/emptyhomes/header.html | 4 |
4 files changed, 22 insertions, 3 deletions
diff --git a/notes/catalyst-master-merge-todos.txt b/notes/catalyst-master-merge-todos.txt index 273e0c3cc..03627cd38 100644 --- a/notes/catalyst-master-merge-todos.txt +++ b/notes/catalyst-master-merge-todos.txt @@ -6,7 +6,5 @@ convert templates for new micro sites (or switch old code to use new headers and should we ditch flickr import? (does not seem to be getting huge usage and those using it would probably report using another method: http://www.flickr.com/search/?w=all&q=fixmystreet&m=tags) -add js to maps - add 'remember me on this computer' to auth login. What should default session lifetime be? diff --git a/perllib/FixMyStreet/App/Controller/Report/New.pm b/perllib/FixMyStreet/App/Controller/Report/New.pm index ffdd44f9d..5eb629e70 100644 --- a/perllib/FixMyStreet/App/Controller/Report/New.pm +++ b/perllib/FixMyStreet/App/Controller/Report/New.pm @@ -79,6 +79,9 @@ all_pins: related to map display - not relevant to creation of a new report sub report_new : Path : Args(0) { my ( $self, $c ) = @_; + # set up the page + $c->forward('setup_page'); + # create the report - loading a partial if available $c->forward('initialize_report'); @@ -270,6 +273,20 @@ sub report_import : Path('/import') { return 1; } +=head2 setup_page + +Setup the page - notably add the map js to the stash + +=cut + +sub setup_page : Private { + my ( $self, $c) = @_; + + $c->stash->{extra_js_verbatim} = FixMyStreet::Map::header_js(); + + return 1; +} + =head2 initialize_report Create the report and set up some basics in it. If there is a partial report diff --git a/templates/web/default/header.html b/templates/web/default/header.html index ce7caa8fb..e27abc473 100644 --- a/templates/web/default/header.html +++ b/templates/web/default/header.html @@ -5,6 +5,8 @@ <script type="text/javascript" src="/yui/utilities.js"></script> <script type="text/javascript" src="/js.js"></script> + [% extra_js_verbatim IF extra_js_verbatim %] + <title>[% title | html %] :: [% c.cobrand.site_title %]</title> <style type="text/css">@import url("/css/core.css"); @import url("/css/main.css");</style> <!--[if LT IE 7]> diff --git a/templates/web/emptyhomes/header.html b/templates/web/emptyhomes/header.html index 647ba6a50..f003a840a 100644 --- a/templates/web/emptyhomes/header.html +++ b/templates/web/emptyhomes/header.html @@ -5,7 +5,9 @@ <meta http-equiv="content-type" content="text/html; charset=utf-8"> <script type="text/javascript" src="/yui/utilities.js"></script> <script type="text/javascript" src="/js.js"></script> -<!-- FIXME {{ $map_js }} --> + +[% extra_js_verbatim IF extra_js_verbatim %] + <style type="text/css"> @import "/css/core.css"; @import "/css/cobrands/emptyhomes/emptyhomes.css"; |