diff options
author | Edmund von der Burg <evdb@mysociety.org> | 2011-04-01 11:31:38 +0100 |
---|---|---|
committer | Edmund von der Burg <evdb@mysociety.org> | 2011-04-01 11:32:07 +0100 |
commit | bd0ceef9ca66e1fc2a2e88d37165fe85eec3fe3e (patch) | |
tree | 1e37838a01fa149fb8a5fd93195f1408947b19e9 /perllib/FixMyStreet/App/Controller | |
parent | ded9698102ad0bde486dd414d4cca5a679c9172d (diff) |
Add in map js to headers
Diffstat (limited to 'perllib/FixMyStreet/App/Controller')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Report/New.pm | 17 |
1 files changed, 17 insertions, 0 deletions
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 |