aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/zurich/admin
diff options
context:
space:
mode:
Diffstat (limited to 'templates/web/zurich/admin')
-rw-r--r--templates/web/zurich/admin/body-form.html54
-rw-r--r--templates/web/zurich/admin/body.html67
-rw-r--r--templates/web/zurich/admin/edit-league.html0
-rw-r--r--templates/web/zurich/admin/header.html34
-rw-r--r--templates/web/zurich/admin/index-dm.html37
-rw-r--r--templates/web/zurich/admin/index-sdm.html34
-rw-r--r--templates/web/zurich/admin/index.html17
-rw-r--r--templates/web/zurich/admin/list_updates.html45
-rw-r--r--templates/web/zurich/admin/problem_row.html45
-rw-r--r--templates/web/zurich/admin/report_edit-sdm.html74
-rw-r--r--templates/web/zurich/admin/report_edit.html231
-rw-r--r--templates/web/zurich/admin/reports.html28
-rw-r--r--templates/web/zurich/admin/stats.html54
-rw-r--r--templates/web/zurich/admin/update_edit.html40
14 files changed, 760 insertions, 0 deletions
diff --git a/templates/web/zurich/admin/body-form.html b/templates/web/zurich/admin/body-form.html
new file mode 100644
index 000000000..a31dffe7c
--- /dev/null
+++ b/templates/web/zurich/admin/body-form.html
@@ -0,0 +1,54 @@
+ <form method="post" action="[% body ? c.uri_for('body', body.id) : c.uri_for('bodies') %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8">
+
+ <p>
+ <label for="name">[% loc('Name') %]</label>
+ <input type="text" name="name" id="name" value="[% body.name %]" size="50">
+ </p>
+
+ <p>
+ <label for="email">[% loc('Email') %]</label>
+ <input type="text" name="endpoint" id="email" value="[% body.endpoint %]" size="50">
+ </p>
+
+ <p>
+ <label for="parent">[% loc('Parent') %]</label>
+ <select name="parent" id="parent">
+ <option value=""> -- [% loc('Select a body') %] -- </option>
+ [% FOR b IN bodies %]
+ <option value="[% b.id %]"[% ' selected' IF body.parent.id == b.id %]>[% b.name %]</option>
+ [% END %]
+ </select>
+ </p>
+
+ <p>
+ <label for="area_ids">[% loc('Area covered') %]</label>
+ <select name="area_ids" id="area_ids" multiple>
+ <option value=""> -- [% loc('Select an area') %] -- </option>
+ [% SET body_areas = body.areas %]
+ [% FOR area IN areas %]
+ [% SET aid = area.id %]
+ <option value="[% area.id %]"[% ' selected' IF body_areas.$aid %]>[% area.name %]</option>
+ [% END %]
+ </select>
+ </p>
+
+ <p>
+ <label for="deleted">[% loc('Flag as deleted') %]</label>
+ <input type="checkbox" name="deleted" id="deleted" value="1"[% ' checked' IF body.deleted %] />
+ </p>
+
+ <input type="hidden" name="send_method" value="Email">
+ <input type="hidden" name="jurisdiction" id="jurisdiction" value="[% body.jurisdiction %]">
+ <input type="hidden" name="api_key" id="api_key" value="[% body.api_key %]">
+ <input type="hidden" id="send_comments" name="send_comments" value="[% body.send_comments %]">
+ <input type="hidden" name="comment_user_id" value="[% body.comment_user_id %]">
+ <input type="hidden" id="suppress_alerts" name="suppress_alerts" value="[% body.suppress_alerts %]">
+ <input type="hidden" id="can_be_devolved" name="can_be_devolved" value="[% body.can_be_devolved %]">
+
+ <p>
+ <input type="hidden" name="posted" value="body">
+ <input type="hidden" name="token" value="[% token %]">
+ <input type="submit" value="[% body ? loc('Update body') : loc('Add body') %]">
+ </p>
+ </form>
+
diff --git a/templates/web/zurich/admin/body.html b/templates/web/zurich/admin/body.html
new file mode 100644
index 000000000..764ad9bd8
--- /dev/null
+++ b/templates/web/zurich/admin/body.html
@@ -0,0 +1,67 @@
+[% INCLUDE 'admin/header.html' title=tprintf(loc('Council contacts for %s'), body.name) -%]
+[% PROCESS 'admin/report_blocks.html' %]
+
+[% IF updated %]
+<p>
+<em>[% updated %]</em>
+</p>
+[% END %]
+
+[% IF admin_type == 'super' AND body.parent AND NOT body.parent.parent # A division %]
+ <table cellspacing="0" cellpadding="2" border="1">
+ <tr>
+ <th>[% loc('Category') %]</th>
+ <th>[% loc('Email') %]</th>
+ <th>[% loc('Last editor') %]</th>
+ <th>[% loc('Note') %]</th>
+ <th>[% loc('When edited') %]</th>
+ </tr>
+ [% WHILE ( contact = contacts.next ) %]
+ <tr>
+ <td><a href="[% c.uri_for( 'body_edit', body_id, contact.category ) %]">[% contact.category %]</a></td>
+ <td>[% contact.email | html %]</td>
+ <td>[% contact.editor %]</td>
+ <td>[% contact.note | html %]</td>
+ <td>[% PROCESS format_date this_date=contact.whenedited %]</td>
+ </tr>
+ [% END %]
+ </table>
+
+ <h2>[% loc('Add new category') %]</h2>
+
+ <form method="post" action="[% c.uri_for('body', body_id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8">
+
+ [% IF c.cobrand.moniker != 'emptyhomes' %]
+ <p>
+ <strong>[% loc('Category:') %] </strong><input type="text" name="category" size="30">
+ </p>
+ [% END %]
+
+ <p>
+ <strong>[% loc('Email:') %] </strong><input type="text" name="email" size="30">
+ </p>
+
+ <input type="hidden" name="confirmed" value="1" id="confirmed">
+
+ <p>
+ <strong>[% loc('Note:') %] </strong> <textarea name="note" rows="3" cols="40"></textarea>
+ </p>
+
+ <p>
+ <input type="hidden" name="posted" value="new" >
+ <input type="hidden" name="token" value="[% token %]" >
+ <input type="submit" name="Create category" value="[% loc('Create category') %]" >
+ </p>
+
+ <div>
+ <input type="hidden" name=".cgifields" value="confirmed" >
+ <input type="hidden" name=".cgifields" value="deleted" >
+ </div>
+ </form>
+
+[% END %]
+
+ <h2>[% loc('Edit body details') %]</h2>
+ [% INCLUDE 'admin/body-form.html' %]
+
+[% INCLUDE 'admin/footer.html' %]
diff --git a/templates/web/zurich/admin/edit-league.html b/templates/web/zurich/admin/edit-league.html
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/templates/web/zurich/admin/edit-league.html
diff --git a/templates/web/zurich/admin/header.html b/templates/web/zurich/admin/header.html
new file mode 100644
index 000000000..281b1de23
--- /dev/null
+++ b/templates/web/zurich/admin/header.html
@@ -0,0 +1,34 @@
+[%
+ SET bodyclass = bodyclass || 'fullwidthpage';
+ INCLUDE 'header.html' admin = 1, bodyclass = bodyclass _ ' admin';
+
+ states = {
+ 'unconfirmed' = loc('Submitted'),
+ 'confirmed' = loc('Open'),
+ 'in progress' = loc('In progress'),
+ 'planned' = loc('Planned'),
+ 'fixed - council' = loc('Closed'),
+ 'hidden' = loc('Hidden'),
+ 'closed' = loc('Closed'),
+ }
+%]
+<style type="text/css">
+ .adminhidden { color: #666666; }
+ .admininternal { background-color: #eeeeff; }
+ .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>
+
diff --git a/templates/web/zurich/admin/index-dm.html b/templates/web/zurich/admin/index-dm.html
new file mode 100644
index 000000000..e0b62d5d2
--- /dev/null
+++ b/templates/web/zurich/admin/index-dm.html
@@ -0,0 +1,37 @@
+[% PROCESS 'admin/header.html' title=loc('Summary') -%]
+[% PROCESS 'admin/report_blocks.html' %]
+
+[% status_message %]
+
+<h2 id="submitted">[% loc('Submitted') %]</h2>
+[% INCLUDE list, problems = unconfirmed.all, hash = 'submitted' %]
+
+<h2 id="planned">[% loc('Planned') %]</h2>
+[% INCLUDE list, problems = approval.all, hash = 'planned' %]
+
+<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' %]
+
+[% BLOCK list %]
+<table cellspacing="0" cellpadding="2" border="1">
+ <tr>
+ <th>[% loc('ID') %]</th>
+ <th>[% loc('Description') %]</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>[% loc('Photo') %]</th>
+ <th class='edit'>*</th>
+ </tr>
+ <tr class="filter-row">
+ <td colspan="8"><input type="text" placeholder="[%= loc('Filter report list') %]" /></td>
+ </tr>
+[% INCLUDE 'admin/problem_row.html' %]
+</table>
+[% END %]
diff --git a/templates/web/zurich/admin/index-sdm.html b/templates/web/zurich/admin/index-sdm.html
new file mode 100644
index 000000000..707bb2d9d
--- /dev/null
+++ b/templates/web/zurich/admin/index-sdm.html
@@ -0,0 +1,34 @@
+[% PROCESS 'admin/header.html' title=loc('Summary') -%]
+[% PROCESS 'admin/report_blocks.html' %]
+
+<h2 id="new">[% loc('New reports') %]</h2>
+[% INCLUDE list, problems = reports_new.all, hash = 'new' %]
+
+<h2 id="wait">[% loc('Reports awaiting approval') %]</h2>
+[% INCLUDE list, problems = reports_unpublished.all, no_edit = 1, hash = 'wait' %]
+
+<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' %]
+
+[% BLOCK list %]
+<table cellspacing="0" cellpadding="2" border="1">
+ <tr>
+ <th>[% loc('ID') %]</th>
+ <th>[% loc('Description') %]</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 %]
+ <th>[% loc('Photo') %]</th>
+ [% IF NOT no_edit %]
+ <th class='edit'>*</th>
+ [% END %]
+ </tr>
+ <tr class="filter-row">
+ <td colspan="8"><input type="text" placeholder="[%= loc('Filter report list') %]" /></td>
+ </tr>
+[% INCLUDE 'admin/problem_row.html' %]
+</table>
+[% END %]
diff --git a/templates/web/zurich/admin/index.html b/templates/web/zurich/admin/index.html
new file mode 100644
index 000000000..a51c7f6fe
--- /dev/null
+++ b/templates/web/zurich/admin/index.html
@@ -0,0 +1,17 @@
+[% PROCESS 'admin/header.html' title=loc('Summary') -%]
+
+<ul>
+ <li>[% tprintf( loc('<strong>%d</strong> live problems'), total_problems_live ) %];
+ [% tprintf( loc('from %d different users'), total_problems_users ) %]</li>
+ <li>[% tprintf( loc('%d council contacts &ndash; %d confirmed, %d unconfirmed'), contacts.total, contacts.1, contacts.0) %]</li>
+</ul>
+
+<h2>[% loc('Problem breakdown by state') %]</h2>
+<ul>
+ [% FOREACH state IN problems.keys.sort %]
+ [% NEXT IF NOT states.$state %]
+ <li>[% problems.$state %] [% states.$state %]</li>
+ [% END %]
+</ul>
+
+[% INCLUDE 'admin/footer.html' %]
diff --git a/templates/web/zurich/admin/list_updates.html b/templates/web/zurich/admin/list_updates.html
new file mode 100644
index 000000000..2b575f27e
--- /dev/null
+++ b/templates/web/zurich/admin/list_updates.html
@@ -0,0 +1,45 @@
+[% IF updates.size %]
+
+<h2>[% loc('Internal notes') %]</h3>
+
+<table cellspacing="0" cellpadding="2" border="1">
+ <tr>
+ <th>[% loc('ID') %]</th>
+ <th>[% loc('Created') %]</th>
+ <th>[% loc('User') %]</th>
+ <th>[% loc('Text') %]</th>
+ </tr>
+[% FOREACH update IN updates -%]
+ [% IF update.extra.is_internal_note %]
+ <tr class="[% 'admininternal' IF update.extra.is_internal_note %]">
+ <td>[% update.id %]</td>
+ <td>[% PROCESS format_date this_date=update.created %] [% update.created.hms %]</td>
+ <td><a href="mailto:[% update.user.email %]">[% update.user.name || update.user.email %]</a></td>
+ <td>[% update.text | html %]</td>
+ </tr>
+ [% END %]
+[% END -%]
+</table>
+
+<h2>[% loc('Updates') %]</h2>
+
+<table cellspacing="0" cellpadding="2" border="1">
+ <tr>
+ <th>[% loc('ID') %]</th>
+ <th>[% loc('Created') %]</th>
+ <th>[% loc('User') %]</th>
+ <th>[% loc('Text') %]</th>
+ </tr>
+[% FOREACH update IN updates -%]
+ [% IF ! update.extra.is_internal_note %]
+ <tr class="[% 'adminhidden' IF update.state == 'hidden' || update.problem.state == 'hidden' %]">
+ <td>[% update.id %]</td>
+ <td>[% PROCESS format_date this_date=update.created %] [% update.created.hms %]</td>
+ <td><a href="mailto:[% update.user.email %]">[% update.user.name || update.user.email %]</a></td>
+ <td>[% update.text | html %]</td>
+ </tr>
+ [% END %]
+[% END -%]
+</table>
+
+[% END %]
diff --git a/templates/web/zurich/admin/problem_row.html b/templates/web/zurich/admin/problem_row.html
new file mode 100644
index 000000000..9b395a1ac
--- /dev/null
+++ b/templates/web/zurich/admin/problem_row.html
@@ -0,0 +1,45 @@
+[%- FOR problem IN problems %]
+ [% SET p_body = problem.bodies.values.0 %]
+ <tr[%
+ SET classes = [];
+ classes.push('adminhidden') IF problem.state == 'hidden';
+ classes.push('overdue') IF c.cobrand.get_or_check_overdue( problem );
+ classes.push('row-link') IF NOT no_edit;
+ ' class="' _ classes.join(' ') _ '"' IF classes.size;
+ %]>
+ <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>
+ <td>[% PROCESS format_date this_date=problem.lastupdate %]</td>
+ <td>[% states.${problem.state} %]</td>
+
+ [% IF include_subdiv %]
+ <td>
+ [%- IF p_body.parent.parent.id -%][%# ...it's a subdivision %]
+ [% PROCESS value_or_nbsp value=p_body.name %]
+ [%- ELSIF problem.external_body %]
+ [% PROCESS value_or_nbsp value=problem.body(c).name %]
+ [%- ELSE -%]
+ &nbsp;
+ [%- END -%]
+ </td>
+ [% END %]
+
+ <td>
+ [% IF problem.photo %]
+ <img class="img" height="60" width="90" src="[% c.cobrand.base_url %]/photo/[% problem.photo %].temp.jpeg" alt="">
+ [% END %]
+ </td>
+
+ [% IF NOT no_edit %]
+ <td><a href="[% c.uri_for( 'report_edit', problem.id ) %]">[% loc('Edit') %]</a></td>
+ [% END %]
+ </tr>
+[%- END -%]
diff --git a/templates/web/zurich/admin/report_edit-sdm.html b/templates/web/zurich/admin/report_edit-sdm.html
new file mode 100644
index 000000000..5ff031ce2
--- /dev/null
+++ b/templates/web/zurich/admin/report_edit-sdm.html
@@ -0,0 +1,74 @@
+[%
+ 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 %]
+ <p id='sub_map_links'>
+ <a class="hidden-nojs" id="map_layer_toggle" href="">Stadtplan</a>
+ </p>
+</div>
+
+[% status_message %]
+
+<form method="post" action="[% c.uri_for( 'report_edit', problem.id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8">
+ <input type="hidden" name="token" value="[% token %]" >
+ <input type="hidden" name="submit" value="1" >
+
+<p align="right"><input type="submit" name="send_back" value="[% loc('Not for my subdivision') %]"></p>
+
+<ul class="no-bullets">
+<li><a href="[% c.uri_for_email( '/report', problem.id ) %]">[% loc('View report on site' )%]</a></li>
+
+<li><a href="http://webgis.intra.stzh.ch/AV_Online/Direct.asp?Map=AV&Search=Koord&West=[% problem.local_coords.0 %]&Nord=[% problem.local_coords.1 %]&B=300" target="_blank">Standort in AV-Online anzeigen</a></li>
+
+<li><span class="mock-label">[% loc('Details:') %]</span> [% problem.detail | html %]
+[% IF problem.extra.original_detail %]
+<br>[%
+ SET safe = problem.extra.original_detail | html;
+ tprintf( loc('originally entered: &ldquo;%s&rdquo;'), safe )
+%]
+[% END %]
+</li>
+<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: &ldquo;%s&rdquo;'), safe )
+%],
+[% IF problem.used_map %][% loc('used map') %][% ELSE %][% loc("didn't use map") %][% END %])</li>
+
+<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><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 %]
+<li><img alt="" src="[% c.cobrand.base_url %]/photo/[% problem.photo %].temp.jpeg"></li>
+[% END %]
+
+<li><span class="mock-label">[% loc('State:') %]</span> [% states.${problem.state} %]</li>
+
+<li><label for="new_internal_note">[% loc('New internal note:') %]</label>
+<textarea name='new_internal_note' id='new_internal_note' cols=60 rows=5></textarea></li>
+
+<li><label for="status_update">[% loc('New update:') %]</label>
+<textarea name='status_update' id='status_update' cols=60 rows=5></textarea></li>
+
+</ul>
+
+<p class="cf">
+ <input style="float:left" type="submit" name="Submit changes" value="[% loc('Submit changes') %]" >
+ <input style="float:right" type="submit" name="no_more_updates" value="[% loc('No further updates') %]">
+</p>
+</form>
+
+[% INCLUDE 'admin/list_updates.html' %]
+
+[% INCLUDE 'admin/footer.html' %]
diff --git a/templates/web/zurich/admin/report_edit.html b/templates/web/zurich/admin/report_edit.html
new file mode 100644
index 000000000..66a51f162
--- /dev/null
+++ b/templates/web/zurich/admin/report_edit.html
@@ -0,0 +1,231 @@
+[%
+ PROCESS "report/photo-js.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 %]
+ <p id='sub_map_links'>
+ <a class="hidden-nojs" id="map_layer_toggle" href="">Stadtplan</a>
+ </p>
+</div>
+
+[% status_message %]
+
+<form method="post" action="[% c.uri_for( 'report_edit', problem.id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8">
+ <input type="hidden" name="token" value="[% token %]" >
+ <input type="hidden" name="submit" value="1" >
+
+<ul class="no-bullets">
+<li><a href="[% c.uri_for_email( '/report', problem.id ) %]">[% loc('View report on site' )%]</a></li>
+
+<li><a href="http://webgis.intra.stzh.ch/AV_Online/Direct.asp?Map=AV&Search=Koord&West=[% problem.local_coords.0 %]&Nord=[% problem.local_coords.1 %]&B=300" target="_blank">Standort in AV-Online anzeigen</a></li>
+
+[% IF problem.state == 'fixed - council' OR problem.state == 'closed' %]
+ <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;
+ tprintf( loc('originally entered: &ldquo;%s&rdquo;'), detail_safe )
+ %]
+ [% END %]
+ </li>
+[% ELSE %]
+ <li><label for='title'>[% loc('Subject:') %]</label> <input size=60 type='text' id='title' name='title' value='[% problem.title | html %]'></li>
+ <li><label for='detail'>[% loc('Details:') %]</label>
+ <textarea name='detail' id='detail' cols=60 rows=5>[% problem.detail | html %]</textarea>
+ [% IF problem.extra.original_detail %]
+ [%
+ SET detail_safe = problem.extra.original_detail | html;
+ tprintf( loc('originally entered: &ldquo;%s&rdquo;'), detail_safe )
+ %]
+ [% END %]
+ </li>
+[% END %]
+
+<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: &ldquo;%s&rdquo;'), safe )
+%],
+[% IF problem.used_map %][% loc('used map') %][% ELSE %][% loc("didn't use map") %][% END %])</li>
+
+<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><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 %]
+<li>
+[% photo = problem.get_photo_params %]
+<div class="update-img">
+ <a href="[% c.cobrand.base_url %]/photo/[% problem.photo %].fulltemp.jpeg" rel="fancy">
+ <img alt="Photo of this report" src="[% c.cobrand.base_url %]/photo/[% problem.photo %].temp.jpeg">
+ <span>zoom</span></a>
+</div>
+<br>
+<input type="submit" name="rotate_photo" value="[% loc('Rotate Left') %]">
+<input type="submit" name="rotate_photo" value="[% loc('Rotate Right') %]">
+<br>
+<input type="checkbox" id="publish_photo" name="publish_photo" value="1"[% ' checked' IF problem.extra.publish_photo %]>
+<label class="inline" for="publish_photo">[% loc("Publish photo") %]</label></li>
+[% END %]
+</ul>
+
+<p><label for="new_internal_note">[% loc('New internal note:') %]</label>
+<textarea name='new_internal_note' id='new_internal_note' cols=60 rows=5>[% new_internal_note | html %]</textarea></p>
+
+<p><span class="mock-label">[% loc('State:') %]</span> <select name="state" id="state">
+ <option value="">--</option>
+ [% FOREACH s IN [
+ ['unconfirmed', loc('Submitted')]
+ ['confirmed', loc('Open')],
+ ['planned', loc('Planned')],
+ ['hidden', loc('Hidden')],
+ ] %]
+ <option [% 'selected ' IF s.0 == problem.state %] value="[% s.0 %]">[% s.1 %]</option>
+ [% END %]
+ [% IF problem.state == 'closed' %]
+ <option selected value="closed">[% loc('Closed') %]</option>
+ [% ELSIF problem.state == 'fixed - council' %]
+ <option selected value="fixed - council">[% loc('Closed') %]</option>
+ [% ELSIF problem.state == 'in progress' %]
+ <option selected value="in progress">[% loc('In progress') %]</option>
+ [% END %]
+</select></p>
+
+<p id="automatic-reply">
+ <span class="mock-label">Automatische Antwort</span>
+ <input type="checkbox" name="send_rejected_email" id="send_rejected_email" value="1" />
+</p>
+
+<script type="text/javascript">
+$(function(){
+ // Show or hide the automatic reply field
+ $('#state').change(function(){
+ if ($(this).val() === 'hidden') {
+ $('#automatic-reply').show();
+ } else {
+ $('#automatic-reply').hide();
+ }
+ }).change();
+});
+</script>
+
+[% IF problem.state == 'unconfirmed' OR problem.state == 'confirmed' %]
+
+<ul class="no-bullets">
+[% list = FOR body IN bodies %]
+ [%- NEXT UNLESS body.parent.id == c.user.from_body.id %]
+ <option value="[% body.id %]"[% IF body.id == problem.bodies_str %] selected[% END %]>[% body.name %]</option>
+[% END %]
+ [% IF admin_type != 'super' AND list %]
+ <li class="assignation">
+ <label for="body_subdivision">[% loc('Assign to subdivision:') %]</label>
+ <select name="body_subdivision" id="body_subdivision">
+ <option value="">--</option>
+ [% list %]
+ </select>
+ </li>
+ [% END %]
+
+<li class="assignation">
+<label for="category">
+[% loc('Category:') %] [% problem.category %]<br>
+[% loc('Assign to different category:') %]</label>
+ <select name="category" id="category">
+ <option value="">--</option>
+ [% FOREACH cat IN categories %]
+ <option value="[% cat %]">[% cat %]</option>
+ [% END %]
+ </select></li>
+
+<li class="assignation">
+<label for="body_external">[% loc('Assign to external body:') %]</label>
+ <select name="body_external" id="body_external">
+ <option value="">--</option>
+ [% FOR body IN bodies %]
+ [% NEXT IF body.parent OR body.bodies OR body.deleted %]
+ <option value="[% body.id %]"[% IF body.id == problem.bodies_str %] selected[% END %]>[% body.name %]</option>
+ [% END %]
+ </select>
+ <br>
+ <input type="checkbox" name="third_personal" id="third_personal" value="1"[% ' checked' IF problem.extra.third_personal %]>
+ <label for="third_personal" class="inline">[% loc('Include reporter personal details') %]</label>
+
+</ul>
+
+<script type="text/javascript">
+$(function(){
+ $('.assignation select').change(function(){
+ if (this.value == "") {
+ $('.assignation').css('color', '#000');
+ } else {
+ var a = $(this).closest('li').css('color', '#000');
+ $('.assignation select').not(this).val("");
+ $('.assignation').not(a).css('color', '#999');
+ }
+ });
+});
+</script>
+
+[% ELSIF problem.state == 'planned' %]
+
+<ul class="no-bullets">
+[% list = FOR body IN bodies %]
+ [%- NEXT UNLESS body.parent.id == c.user.from_body.id %]
+ <option value="[% body.id %]">[% body.name %]</option>
+[% END %]
+ [% IF admin_type != 'super' AND list %]
+ <li class="assignation">
+ <label for="body_subdivision">[% loc('Assign to subdivision:') %]</label>
+ <select name="body_subdivision" id="body_subdivision">
+ <option value="" selected>--</option>
+ [% list %]
+ </select>
+ </li>
+ [% END %]
+
+ <li><label for="status_update">[% loc('Public response:') %]</label>
+
+ <textarea name='status_update' id='status_update' cols=60 rows=5>
+ [%- IF problem.extra.public_response -%]
+ [%- problem.extra.public_response | html -%]
+ [%- ELSE -%]
+
+Freundliche Grüsse
+
+Ihre Stadt Zürich
+ [%- END %]</textarea>
+ </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">
+[% IF problem.state == 'planned' %]
+<input type="submit" name="publish_response" value="[% loc('Publish the response') %]">
+[% END %]
+<input type="submit" name="Submit changes" value="[% loc('Submit changes') %]" >
+</p>
+
+</form>
+
+[% INCLUDE 'admin/list_updates.html' %]
+
+[% INCLUDE 'admin/footer.html' %]
diff --git a/templates/web/zurich/admin/reports.html b/templates/web/zurich/admin/reports.html
new file mode 100644
index 000000000..68f98c44a
--- /dev/null
+++ b/templates/web/zurich/admin/reports.html
@@ -0,0 +1,28 @@
+[% PROCESS 'admin/header.html' title=loc('Search Reports') %]
+[% PROCESS 'admin/report_blocks.html' %]
+
+<form method="get" action="[% c.uri_for('reports') %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8">
+ <p><label for="search">[% loc('Search:') %]</label> <input type="text" name="search" size="30" id="search" value="[% searched | html %]">
+</form>
+
+[% IF problems.size %]
+<table cellspacing="0" cellpadding="2" border="1">
+ <tr>
+ <th>[% loc('ID') %]</th>
+ <th>[% loc('Description') %]</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>[% loc('Photo') %]</th>
+ <th class='edit'>*</th>
+ </tr>
+ [% INCLUDE 'admin/problem_row.html' %]
+</table>
+
+[% 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..52b33ebc4
--- /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;
+ SET 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' %]
diff --git a/templates/web/zurich/admin/update_edit.html b/templates/web/zurich/admin/update_edit.html
new file mode 100644
index 000000000..ab40981a5
--- /dev/null
+++ b/templates/web/zurich/admin/update_edit.html
@@ -0,0 +1,40 @@
+[% INCLUDE 'admin/header.html' title=tprintf(loc('Editing update %d'), update.id ) -%]
+[% PROCESS 'admin/report_blocks.html' %]
+
+[% status_message %]
+
+<form method="post" action="[% c.uri_for( 'update_edit', update.id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8">
+ <input type="hidden" name="token" value="[% token %]" >
+ <input type="hidden" name="submit" value="1" >
+<ul>
+<li><a href="[% c.uri_for_email( '/report', update.problem_id ) %]#update_[% update.id %]">[% loc('View report on site' )%]</a></li>
+
+<li><label for='detail'>[% loc('Text:') %]</label>
+<textarea name='text' id='text' cols=60 rows=5>[% update.text | html %]</textarea></li>
+
+<input type="hidden" name="anonymous" value="[% update.anonymous %]">
+
+<li>[% loc('State:') %] <select name="state" id="state">
+ [% FOREACH state IN [ ['confirmed', loc('Open')], ['hidden', loc('Hidden')], ['unconfirmed',loc('Unconfirmed')] ] %]
+ <option [% 'selected ' IF state.0 == update.state %] value="[% state.0 %]">[% state.1 %]</option>
+ [% END %]
+</select></li>
+<input type='hidden' name='name' id='name' value='[% update.name | html %]'>
+<input type='hidden' id='email' name='email' value='[% update.user.email | html %]'>
+[% IF update.problem_state %]
+<li>[% tprintf(loc('Update changed problem state to %s'), update.problem_state) %]</li>
+[% END %]
+</li>
+
+<li>[% loc('Created:') %] [% PROCESS format_date this_date=update.created %] [% update.created.hms %]</li>
+
+[% IF update.photo %]
+[% photo = update.get_photo_params %]
+<li><img alt="" height="[% photo.height %]" width="[% photo.width %]" src="[% photo.url %]">
+<input type="checkbox" id="remove_photo" name="remove_photo" value="1">
+<label for="remove_photo" class="inline">[% loc("Remove photo (can't be undone!)") %]</label></li>
+[% END %]
+</ul>
+<input type="submit" name="Submit changes" value="[% loc('Submit changes') %]" ></form>
+
+[% INCLUDE 'admin/footer.html' %]