diff options
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Admin.pm | 15 | ||||
-rw-r--r-- | templates/web/zurich/admin/header.html | 38 | ||||
-rw-r--r-- | templates/web/zurich/admin/report_edit.html | 12 | ||||
-rw-r--r-- | templates/web/zurich/header.html | 35 | ||||
-rw-r--r-- | web/cobrands/fixmystreet/position_map.js | 4 | ||||
-rw-r--r-- | web/cobrands/zurich/layout.scss | 14 |
6 files changed, 78 insertions, 40 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Admin.pm b/perllib/FixMyStreet/App/Controller/Admin.pm index de69880c1..7869b21b7 100644 --- a/perllib/FixMyStreet/App/Controller/Admin.pm +++ b/perllib/FixMyStreet/App/Controller/Admin.pm @@ -606,6 +606,21 @@ sub report_edit : Path('report_edit') : Args(1) { } if ( $c->cobrand->moniker eq 'zurich' ) { + + FixMyStreet::Map::display_map( + $c, + latitude => $problem->latitude, + longitude => $problem->longitude, + pins => $problem->used_map + ? [ { + latitude => $problem->latitude, + longitude => $problem->longitude, + colour => 'yellow', + type => 'big', + } ] + : [], + ); + my $done = $c->cobrand->admin_report_edit(); return if $done; } diff --git a/templates/web/zurich/admin/header.html b/templates/web/zurich/admin/header.html index d0c399a83..ce252beb4 100644 --- a/templates/web/zurich/admin/header.html +++ b/templates/web/zurich/admin/header.html @@ -1,5 +1,7 @@ -[% INCLUDE 'header.html' admin = 1, bodyclass = 'fullwidthpage admin' %] [% + SET bodyclass = bodyclass || 'fullwidthpage'; + INCLUDE 'header.html' admin = 1, bodyclass = bodyclass _ ' admin'; + states = { 'unconfirmed' = loc('Submitted'), 'confirmed' = loc('Open'), @@ -18,38 +20,4 @@ dd { margin-left: 8em; } select { width: auto; } </style> - <!--<strong>[% loc('FixMyStreet admin:') %]</strong>--> - <div class="admin-nav"> - <ul> - [% pagename = c.req.uri.path %] - [% pagename = pagename.replace('/admin/?(\w*).*', '$1') %] - - <li [% IF pagename == 'summary' OR pagename == '' %]class="current"[% END %]> - <a href="/admin/summary">[% loc('Summary') %]</a> - </li> - <li [% IF pagename == 'reports' OR pagename == 'report_edit' %]class="current"[% END %]> - <a href="/admin/reports">[% loc('Reports') %]</a> - </li> - [% IF admin_type == 'dm' OR admin_type == 'super' %] - <li [% IF pagename == 'bodies' OR pagename == 'body' %]class="current"[% END %]> - <a href="/admin/bodies">[% loc('Bodies') %]</a> - </li> - [% END %] - [% IF admin_type == 'super' %] - <li [% IF pagename == 'users' OR pagename == 'user_edit' %]class="current"[% END %]> - <a href="/admin/users">[% loc('Users') %]</a> - </li> - [% END %] - <li class="search-box"> - <form method="get" action="[% c.uri_for('reports') %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> - <input type="text" name="search" size="20" id="search" placeholder="[% loc('Search reports') %]"> - </form> - </li> - </ul> - </div> - <!-- | <a href="timeline">Timeline</a> --> - <!-- | <a href="questionnaire">Survey</a> --> - <!-- | <a href="flagged">Flagged</a> --> - <!-- | <a href="stats">Stats</a> --> - <h1 style="clear:both;">[% title %]</h1> diff --git a/templates/web/zurich/admin/report_edit.html b/templates/web/zurich/admin/report_edit.html index eb543a777..3a7305b9a 100644 --- a/templates/web/zurich/admin/report_edit.html +++ b/templates/web/zurich/admin/report_edit.html @@ -1,5 +1,13 @@ -[% INCLUDE 'admin/header.html' title=tprintf(loc('Editing problem %d'), problem.id ) -%] -[% PROCESS 'admin/report_blocks.html' %] +[% + PROCESS "maps/zurich.html"; + INCLUDE 'admin/header.html' + title = tprintf(loc('Editing problem %d'), problem.id ), + bodyclass = 'mappage'; + PROCESS 'admin/report_blocks.html' +-%] + +[% map_html %] +</div> [% status_message %] diff --git a/templates/web/zurich/header.html b/templates/web/zurich/header.html index cdff06df8..75698993f 100644 --- a/templates/web/zurich/header.html +++ b/templates/web/zurich/header.html @@ -46,6 +46,41 @@ [% pre_container_extra %] <div class="container"> + +[% IF admin %] + <div class="admin-nav-wrapper"> + <div class="admin-nav"> + <ul> + [% pagename = c.req.uri.path %] + [% pagename = pagename.replace('/admin/?(\w*).*', '$1') %] + + <li [% IF pagename == 'summary' OR pagename == '' %]class="current"[% END %]> + <a href="/admin/summary">[% loc('Summary') %]</a> + </li> + <li [% IF pagename == 'reports' OR pagename == 'report_edit' %]class="current"[% END %]> + <a href="/admin/reports">[% loc('Reports') %]</a> + </li> + [% IF admin_type == 'dm' OR admin_type == 'super' %] + <li [% IF pagename == 'bodies' OR pagename == 'body' %]class="current"[% END %]> + <a href="/admin/bodies">[% loc('Bodies') %]</a> + </li> + [% END %] + [% IF admin_type == 'super' %] + <li [% IF pagename == 'users' OR pagename == 'user_edit' %]class="current"[% END %]> + <a href="/admin/users">[% loc('Users') %]</a> + </li> + [% END %] + <li class="search-box"> + <form method="get" action="[% c.uri_for('reports') %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8"> + <input type="text" name="search" size="20" id="search" placeholder="[% loc('Search reports') %]"> + </form> + + </li> + </ul> + </div> + </div> +[% END %] + <div class="content[% " $mainclass" | html IF mainclass %]" role="main"> <!-- [% INCLUDE 'debug_header.html' %] --> diff --git a/web/cobrands/fixmystreet/position_map.js b/web/cobrands/fixmystreet/position_map.js index 4a18d9f9a..71794e8d6 100644 --- a/web/cobrands/fixmystreet/position_map.js +++ b/web/cobrands/fixmystreet/position_map.js @@ -1,14 +1,14 @@ function position_map_box() { var $html = $('html'); if ($html.hasClass('ie6')) { - $('#map_box').prependTo('.wrapper').css({ + $('#map_box').prependTo('body').css({ zIndex: 0, position: 'absolute', top: 0, left: 0, right: 0, bottom: 0, width: '100%', height: $(window).height(), margin: 0 }); } else { - $('#map_box').prependTo('.wrapper').css({ + $('#map_box').prependTo('body').css({ zIndex: 0, position: 'fixed', top: 0, left: 0, right: 0, bottom: 0, width: '100%', height: '100%', diff --git a/web/cobrands/zurich/layout.scss b/web/cobrands/zurich/layout.scss index 6a23f4e22..7277c531f 100644 --- a/web/cobrands/zurich/layout.scss +++ b/web/cobrands/zurich/layout.scss @@ -147,6 +147,10 @@ body.fullwidthpage.admin .content { width: 100%; } +body.mappage.admin .content { + margin-left: 0.5em; + +} .admin { .content { margin: 2em 0 1em; @@ -196,11 +200,19 @@ body.fullwidthpage.admin .content { } } +.admin-nav-wrapper { + background-color: white; + padding: 1.5em 0 1em; +} +body.mappage .admin-nav-wrapper { + padding-left: 10px; + padding-right: 10px; +} + .admin-nav { background: #f4f4f4; @include background(linear-gradient(#fbfbfb, #efefef)); border-bottom: 2px solid $table_border_color; - margin: 0 0 1em 0; ul { overflow:auto; margin:0 0 -2px 0; |