diff options
Diffstat (limited to 'templates/web/zurich/admin')
-rw-r--r-- | templates/web/zurich/admin/header.html | 13 | ||||
-rw-r--r-- | templates/web/zurich/admin/index-dm.html | 22 | ||||
-rw-r--r-- | templates/web/zurich/admin/index-sdm.html | 22 | ||||
-rw-r--r-- | templates/web/zurich/admin/index.html | 6 | ||||
-rw-r--r-- | templates/web/zurich/admin/list_updates.html | 2 | ||||
-rw-r--r-- | templates/web/zurich/admin/problem_row.html | 23 | ||||
-rw-r--r-- | templates/web/zurich/admin/report_edit-sdm.html | 32 | ||||
-rw-r--r-- | templates/web/zurich/admin/report_edit.html | 28 | ||||
-rw-r--r-- | templates/web/zurich/admin/reports.html | 18 | ||||
-rw-r--r-- | templates/web/zurich/admin/stats.html | 54 |
10 files changed, 150 insertions, 70 deletions
diff --git a/templates/web/zurich/admin/header.html b/templates/web/zurich/admin/header.html index 41cb520f5..be146f0e1 100644 --- a/templates/web/zurich/admin/header.html +++ b/templates/web/zurich/admin/header.html @@ -14,9 +14,20 @@ %] <style type="text/css"> .adminhidden { color: #666666; } + .active { background-color: #ffffee; cursor: pointer; } .error { color: red; } .overdue { background-color: #ffcccc; } select { width: auto; } + #fms_pan_zoom { top: 13em !important; } </style> +<script> +$(function(){ + $('.row-link').hover(function(){ + $(this).toggleClass("active"); + }).click(function(){ + window.location = this.getElementsByTagName('a')[0]; + }).find('td:last').hide(); + $('th.edit').hide(); +}); +</script> - <h1 style="clear:both;">[% title %]</h1> diff --git a/templates/web/zurich/admin/index-dm.html b/templates/web/zurich/admin/index-dm.html index a88100ee4..530e72c59 100644 --- a/templates/web/zurich/admin/index-dm.html +++ b/templates/web/zurich/admin/index-dm.html @@ -3,14 +3,15 @@ [% status_message %] -<h2>[% loc('Submitted') %]</h2> -[% INCLUDE list, problems = unconfirmed.all %] +<h2 id="submitted">[% loc('Submitted') %]</h2> +[% INCLUDE list, problems = unconfirmed.all, hash = 'submitted' %] -<h2>[% loc('Planned') %]</h2> -[% INCLUDE list, problems = approval.all %] +<h2 id="planned">[% loc('Planned') %]</h2> +[% INCLUDE list, problems = approval.all, hash = 'planned' %] -<h2>[% loc('All reports') %]</h2> -[% INCLUDE list, problems = other.all, include_subdiv = 1 %] +<h2 id="alle">[% loc('All reports') %]</h2> +[% INCLUDE list, problems = other.all, include_subdiv = 1, hash = 'alle' %] +[% INCLUDE 'pagination.html', admin = 1, param = 'p', hash = 'alle' %] [% INCLUDE 'admin/footer.html' %] @@ -19,14 +20,13 @@ <tr> <th>[% loc('ID') %]</th> <th>[% loc('Description') %]</th> - <th>[% loc('Category') %]</th> - <th>[% loc('Submitted') %]</th> - <th>[% loc('Updated') %]</th> - <th>[% loc('Status') %]</th> + [% FOREACH col IN [ [ 'category', loc('Category') ], [ 'created', loc('Submitted') ], [ 'lastupdate', loc('Updated') ], [ 'state', loc('Status') ] ] %] + <th><a href="[% INCLUDE sort_link choice = col.0 %]#[% hash %]">[% col.1 %] [% INCLUDE sort_arrow choice = col.0 %]</a></th> + [% END %] [% IF include_subdiv %] <th>[% loc('Subdivision/Body') %]</th> [% END %] - <th>*</th> + <th class='edit'>*</th> </tr> <tr class="filter-row"> <td colspan="8"><input type="text" placeholder="[%= loc('Filter report list') %]" /></td> diff --git a/templates/web/zurich/admin/index-sdm.html b/templates/web/zurich/admin/index-sdm.html index 4e4009c16..76593ead0 100644 --- a/templates/web/zurich/admin/index-sdm.html +++ b/templates/web/zurich/admin/index-sdm.html @@ -1,14 +1,15 @@ [% PROCESS 'admin/header.html' title=loc('Summary') -%] [% PROCESS 'admin/report_blocks.html' %] -<h2>[% loc('New reports') %]</h2> -[% INCLUDE list, problems = reports_new.all %] +<h2 id="new">[% loc('New reports') %]</h2> +[% INCLUDE list, problems = reports_new.all, hash = 'new' %] -<h2>[% loc('Reports awaiting approval') %]</h2> -[% INCLUDE list, problems = reports_unpublished.all, no_edit = 1 %] +<h2 id="wait">[% loc('Reports awaiting approval') %]</h2> +[% INCLUDE list, problems = reports_unpublished.all, no_edit = 1, hash = 'wait' %] -<h2>[% loc('Reports published') %]</h2> -[% INCLUDE list, problems = reports_published.all, no_edit = 1 %] +<h2 id="alle">[% loc('Reports published') %]</h2> +[% INCLUDE list, problems = reports_published.all, no_edit = 1, hash = 'alle' %] +[% INCLUDE 'pagination.html', admin = 1, param = 'p', hash = 'alle' %] [% INCLUDE 'admin/footer.html' %] @@ -17,12 +18,11 @@ <tr> <th>[% loc('ID') %]</th> <th>[% loc('Description') %]</th> - <th>[% loc('Category') %]</th> - <th>[% loc('Submitted') %]</th> - <th>[% loc('Updated') %]</th> - <th>[% loc('Status') %]</th> + [% FOREACH col IN [ [ 'category', loc('Category') ], [ 'created', loc('Submitted') ], [ 'lastupdate', loc('Updated') ], [ 'state', loc('Status') ] ] %] + <th><a href="[% INCLUDE sort_link choice = col.0 %]#[% hash %]">[% col.1 %] [% INCLUDE sort_arrow choice = col.0 %]</a></th> + [% END %] [% IF NOT no_edit %] - <th>*</th> + <th class='edit'>*</th> [% END %] </tr> <tr class="filter-row"> diff --git a/templates/web/zurich/admin/index.html b/templates/web/zurich/admin/index.html index ab835b5a3..a51c7f6fe 100644 --- a/templates/web/zurich/admin/index.html +++ b/templates/web/zurich/admin/index.html @@ -6,12 +6,6 @@ <li>[% tprintf( loc('%d council contacts – %d confirmed, %d unconfirmed'), contacts.total, contacts.1, contacts.0) %]</li> </ul> -[% IF c.cobrand.admin_show_creation_graph -%] - <p> - <a href="[% c.config.BASE_URL %]/fms-live-creation.png">[% loc('Graph of problem creation by status over time') %]</a> - </p> -[% END -%] - <h2>[% loc('Problem breakdown by state') %]</h2> <ul> [% FOREACH state IN problems.keys.sort %] diff --git a/templates/web/zurich/admin/list_updates.html b/templates/web/zurich/admin/list_updates.html index 7a78d4c63..c475d839e 100644 --- a/templates/web/zurich/admin/list_updates.html +++ b/templates/web/zurich/admin/list_updates.html @@ -1,3 +1,4 @@ +[% IF updates.size %] <h2>[% loc('Updates') %]</h2> <table cellspacing="0" cellpadding="2" border="1"> @@ -14,3 +15,4 @@ </tr> [% END -%] </table> +[% END %] diff --git a/templates/web/zurich/admin/problem_row.html b/templates/web/zurich/admin/problem_row.html index 617490232..8b1a30cb0 100644 --- a/templates/web/zurich/admin/problem_row.html +++ b/templates/web/zurich/admin/problem_row.html @@ -1,18 +1,19 @@ [%- FOR problem IN problems %] [% SET p_body = problem.bodies.values.0 %] - [% IF page == 'search' %] - [% NEXT IF admin_type == 'sdm' AND p_body.id != body.id %] - [% NEXT IF admin_type == 'dm' AND p_body.id != body.id AND p_body.parent.id != body.id %] - [% END %] <tr[% - ' class="adminhidden"' IF problem.state == 'hidden'; - ' class="overdue"' IF c.cobrand.overdue( problem ); + SET classes = []; + classes.push('adminhidden') IF problem.state == 'hidden'; + classes.push('overdue') IF c.cobrand.overdue( problem ); + classes.push('row-link') IF NOT no_edit; + ' class="' _ classes.join(' ') _ '"' IF classes.size; %]> - <td class="record-id">[%- IF problem.is_visible -%] - <a href="[% c.uri_for_email( '/report', problem.id ) %]">[% problem.id %]</a> - [%- ELSE %] - [%- problem.id %] - [%- END -%]</td> + <td class="record-id"> + [% IF no_edit AND problem.is_visible %] + <a href="[% c.uri_for_email( '/report', problem.id ) %]">[% problem.id %]</a> + [% ELSE %] + [% problem.id %] + [% END %] + </td> <td>[% PROCESS value_or_nbsp value=problem.title %]</td> <td>[% PROCESS value_or_nbsp value=problem.category %]</td> <td>[% PROCESS format_date this_date=problem.created %]</td> diff --git a/templates/web/zurich/admin/report_edit-sdm.html b/templates/web/zurich/admin/report_edit-sdm.html index faad3ec55..39d74881c 100644 --- a/templates/web/zurich/admin/report_edit-sdm.html +++ b/templates/web/zurich/admin/report_edit-sdm.html @@ -1,5 +1,13 @@ -[% PROCESS 'admin/header.html' title=tprintf(loc('Editing problem %d'), problem.id ) -%] -[% PROCESS 'admin/report_blocks.html' %] +[% + PROCESS "maps/zurich.html"; + PROCESS 'admin/header.html' + title = tprintf(loc('Editing problem %d'), problem.id ), + bodyclass = 'mappage'; + PROCESS 'admin/report_blocks.html' +-%] + +[% map_html %] +</div> [% status_message %] @@ -9,9 +17,9 @@ <p align="right"><input type="submit" name="send_back" value="[% loc('Not for my subdivision') %]"></p> -<ul> +<ul class="no-bullets"> <li><a href="[% c.uri_for_email( '/report', problem.id ) %]">[% loc('View report on site' )%]</a></li> -<li>[% loc('Details:') %] [% problem.detail | html %] +<li><span class="mock-label">[% loc('Details:') %]</span> [% problem.detail | html %] [% IF problem.extra.original_detail %] <br>[% SET safe = problem.extra.original_detail | html; @@ -19,26 +27,28 @@ %] [% END %] </li> -<li>[% loc('Co-ordinates:') %] [% problem.local_coords.join(',') %] +<li><span class="mock-label">[% loc('Co-ordinates:') %]</span> [% problem.local_coords.join(',') %] + <input type="hidden" name="latitude" id="fixmystreet.latitude" value="[% problem.latitude %]"> + <input type="hidden" name="longitude" id="fixmystreet.longitude" value="[% problem.longitude %]"> ([% SET safe = problem.postcode | html; tprintf( loc('originally entered: “%s”'), safe ) %], [% IF problem.used_map %][% loc('used map') %][% ELSE %][% loc("didn't use map") %][% END %])</li> -<li>[% loc('Category:') %] [% problem.category | html %] </li> -<li>[% loc('Name:') %] [% problem.name | html %] -<li>[% loc('Email:') %] [% problem.user.email | html %] +<li><span class="mock-label">[% loc('Category:') %]</span> [% problem.category | html %] </li> +<li><span class="mock-label">[% loc('Name:') %]</span> [% problem.name | html %] +<li><span class="mock-label">[% loc('Email:') %]</span> [% problem.user.email | html %] [% IF NOT problem.extra.email_confirmed %]<span class="error">[% loc('Unconfirmed') %]</span>[% END %] -<li>[% loc('Phone:') %] [% IF problem.user.phone %][% problem.user.phone | html %][% ELSE %]<em>[% loc('None') %]</em>[% END %]</li> -<li>[% loc('Created:') %] [% PROCESS format_date this_date=problem.created %] [% problem.created.hms %]</li> +<li><span class="mock-label">[% loc('Phone:') %]</span> [% IF problem.user.phone %][% problem.user.phone | html %][% ELSE %]<em>[% loc('None') %]</em>[% END %]</li> +<li><span class="mock-label">[% loc('Created:') %]</span> [% PROCESS format_date this_date=problem.created %] [% problem.created.hms %]</li> [% IF problem.photo %] [% photo = problem.get_photo_params %] <li><img alt="" src="[% c.cobrand.base_url %][% photo.url %]"></li> [% END %] -<li>[% loc('State:') %] [% states.${problem.state} %]</li> +<li><span class="mock-label">[% loc('State:') %]</span> [% states.${problem.state} %]</li> <li><label for="internal_notes">[% loc('Internal notes:') %]</label> <textarea name='internal_notes' id='internal_notes' cols=60 rows=5>[% problem.extra.internal_notes | html %]</textarea></li> diff --git a/templates/web/zurich/admin/report_edit.html b/templates/web/zurich/admin/report_edit.html index 7fdaeabff..059c4b5c0 100644 --- a/templates/web/zurich/admin/report_edit.html +++ b/templates/web/zurich/admin/report_edit.html @@ -15,11 +15,11 @@ <input type="hidden" name="token" value="[% token %]" > <input type="hidden" name="submit" value="1" > -<ul> +<ul class="no-bullets"> <li><a href="[% c.uri_for_email( '/report', problem.id ) %]">[% loc('View report on site' )%]</a></li> [% IF problem.state == 'fixed - council' OR problem.state == 'closed' %] - <li>[% loc('Details:') %] [% problem.detail | html %] + <li><span class="mock-label">[% loc('Details:') %]</span> [% problem.detail | html %] [% IF problem.extra.original_detail %] <br>[% SET detail_safe = problem.extra.original_detail | html; @@ -40,26 +40,28 @@ </li> [% END %] -<li>[% loc('Co-ordinates:') %] [% problem.local_coords.join(',') %] +<li><span class="mock-label">[% loc('Co-ordinates:') %]</span> [% problem.local_coords.join(',') %] + <input type="hidden" name="latitude" id="fixmystreet.latitude" value="[% problem.latitude %]"> + <input type="hidden" name="longitude" id="fixmystreet.longitude" value="[% problem.longitude %]"> + ([% SET safe = problem.postcode | html; tprintf( loc('originally entered: “%s”'), safe ) %], [% IF problem.used_map %][% loc('used map') %][% ELSE %][% loc("didn't use map") %][% END %])</li> -<li>[% loc('Name:') %] [% problem.name | html %] <input type='hidden' name='name' id='name' value='[% problem.name | html %]'></li> -<li>[% loc('Email:') %] [% problem.user.email | html %] <input type='hidden' id='email' name='email' value='[% problem.user.email | html %]'> +<li><span class="mock-label">[% loc('Name:') %]</span> [% problem.name | html %] <input type='hidden' name='name' id='name' value='[% problem.name | html %]'></li> +<li><span class="mock-label">[% loc('Email:') %]</span> [% problem.user.email | html %] <input type='hidden' id='email' name='email' value='[% problem.user.email | html %]'> [% IF NOT problem.extra.email_confirmed %]<span class="error">[% loc('Unconfirmed') %]</span>[% END %] </li> -<li>[% loc('Phone:') %] [% IF problem.user.phone %][% problem.user.phone | html %][% ELSE %]<em>[% loc('None') %]</em>[% END %]</li> -<li>[% loc('Created:') %] [% PROCESS format_date this_date=problem.created %] [% problem.created.hms %]</li> +<li><span class="mock-label">[% loc('Phone:') %]</span> [% IF problem.user.phone %][% problem.user.phone | html %][% ELSE %]<em>[% loc('None') %]</em>[% END %]</li> +<li><span class="mock-label">[% loc('Created:') %]</span> [% PROCESS format_date this_date=problem.created %] [% problem.created.hms %]</li> [% IF problem.photo %] [% photo = problem.get_photo_params %] <li><img alt="" src="[% c.cobrand.base_url %][% photo.url %]"> <br> -[% IF rotated %]Photo may be cached for a while.<br>[% END %] <input type="submit" name="rotate_photo" value="[% loc('Rotate Left') %]"> <input type="submit" name="rotate_photo" value="[% loc('Rotate Right') %]"> <br> @@ -71,7 +73,7 @@ <p><label for="internal_notes">[% loc('Internal notes:') %]</label> <textarea name='internal_notes' id='internal_notes' cols=60 rows=5>[% problem.extra.internal_notes | html %]</textarea></p> -<p>[% loc('State:') %] <select name="state" id="state"> +<p><span class="mock-label">[% loc('State:') %]</span> <select name="state" id="state"> <option value="">--</option> [% FOREACH s IN [ ['unconfirmed', loc('Submitted')] @@ -92,7 +94,7 @@ [% IF problem.state == 'unconfirmed' OR problem.state == 'confirmed' %] -<ul> +<ul class="no-bullets"> <li class="assignation"> <label for="body_subdivision">[% loc('Assign to subdivision:') %]</label> <select name="body_subdivision" id="body_subdivision"> @@ -163,6 +165,12 @@ $(function(){ </li> </ul> +[% ELSIF problem.state == 'fixed - council' %] + +<p><span class="mock-label">[% loc('Public response:') %]</span> +[% problem.extra.public_response | html %] +</p> + [% END %] <p align="right"> diff --git a/templates/web/zurich/admin/reports.html b/templates/web/zurich/admin/reports.html index f8c022630..b0bc733c4 100644 --- a/templates/web/zurich/admin/reports.html +++ b/templates/web/zurich/admin/reports.html @@ -5,23 +5,23 @@ <p><label for="search">[% loc('Search:') %]</label> <input type="text" name="search" size="30" id="search" value="[% searched | html %]"> </form> - -[% IF searched %] +[% IF problems.size %] <table cellspacing="0" cellpadding="2" border="1"> <tr> <th>[% loc('ID') %]</th> <th>[% loc('Description') %]</th> - <th>[% loc('Category') %]</th> - <th>[% loc('Submitted') %]</th> - <th>[% loc('Updated') %]</th> - <th>[% loc('Status') %]</th> - <th>*</th> + [% FOREACH col IN [ [ 'category', loc('Category') ], [ 'created', loc('Submitted') ], [ 'lastupdate', loc('Updated') ], [ 'state', loc('Status') ] ] %] + <th><a href="[% INCLUDE sort_link choice = col.0 %]">[% col.1 %] [% INCLUDE sort_arrow choice = col.0 %]</a></th> + [% END %] + <th class='edit'>*</th> </tr> - [% INCLUDE 'admin/problem_row.html', page = 'search' %] + [% INCLUDE 'admin/problem_row.html' %] </table> -[% INCLUDE 'admin/list_updates.html' %] +[% INCLUDE 'pagination.html', admin = 1, param = 'p' IF pager %] [% END %] +[% INCLUDE 'admin/list_updates.html' %] + [% INCLUDE 'admin/footer.html' %] diff --git a/templates/web/zurich/admin/stats.html b/templates/web/zurich/admin/stats.html new file mode 100644 index 000000000..92521ff1d --- /dev/null +++ b/templates/web/zurich/admin/stats.html @@ -0,0 +1,54 @@ +[% INCLUDE 'admin/header.html' title=loc('Stats') %] +[% PROCESS 'admin/report_blocks.html' %] +[% USE date %] + +<p style="float:right"><a href="[% c.uri_with( { export=1 } ) %]">[% loc('All Reports') %]</a></p> + +[% IF start_date AND end_date %] +<p><strong>[% tprintf( loc( 'All reports between %s and %s' ), start_date.ymd, end_date.ymd ) | html %]</strong></p> +[% END %] + +<form method="get" action="[% c.uri_for('stats') %]"> +<p><select name="ym"> + <option value="">[% loc('All reports') %]</option> + [% FOR y IN [ 2013 .. date.format(date.now, '%Y') ]; + SET max = 12; + max = date.format(date.now, '%m') IF y == date.format(date.now, '%Y'); + FOR m IN [ 1 .. max ]; + m = m | format('%02d'); + SET v = m _ '.' _ y; + %] + <option[% ' selected' IF v == ym %]>[% v %]</option> + [% END %] + [% END %] +</select> + +<input type="submit" value="[% loc('Go') %]"> +</form> + +<ul> +<li>[% loc('Total') %]: [% reports_total || 0 %] +<li>[% loc('Closed') %]: [% reports_solved || 0 %] +<li>[% loc('Hidden') %]: [% reports_spam || 0 %] +<li>Externe Adressen: [% reports_assigned || 0 %] +<li>[% loc('Moderated by division within one working day') %]: [% reports_moderated || 0 %] +<li>[% loc('Dealt with by subdivision within 5 working days') %]: [% reports_dealtwith || 0 %] +<li>[% loc('Assign to different category:') %] [% reports_category_changed || 0 %] +<li>[% loc('Photo') %]: [% pictures_taken || 0 %] +<li>[% loc('Publish photo') %]: [% pictures_published || 0 %] +<!-- <li>[% loc('Phone:') %] [% users_phone || 0 %] --> +<li>[% loc('Confirmed') %]: [% email_confirmed || 0 %] +<li>[% loc('Name:') %] [% name_provided || 0 %] +</ul> + +<table> +<tr><th>[% loc('Service:') %]</th><th>[% loc('Count') %]</th></tr> +[% WHILE ( s = per_service.next ) %]<tr><td>[% s.service || 'Web' %]</td><td>[% s.get_column('c') %]</td></tr>[% END %] +</table> + +<table> +<tr><th>[% loc('Category') %]</th><th>[% loc('Count') %]</th></tr> +[% WHILE ( c = per_category.next ) %]<tr><td>[% c.category %]</td><td>[% c.get_column('c') %]</td></tr>[% END %] +</table> + +[% INCLUDE 'admin/footer.html' %] |