aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/zurich
diff options
context:
space:
mode:
Diffstat (limited to 'templates/web/zurich')
-rw-r--r--templates/web/zurich/admin/body-form.html50
-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.html22
-rw-r--r--templates/web/zurich/admin/index-dm.html36
-rw-r--r--templates/web/zurich/admin/index-sdm.html33
-rw-r--r--templates/web/zurich/admin/index.html23
-rw-r--r--templates/web/zurich/admin/list_updates.html16
-rw-r--r--templates/web/zurich/admin/problem_row.html38
-rw-r--r--templates/web/zurich/admin/report_edit-sdm.html57
-rw-r--r--templates/web/zurich/admin/report_edit.html179
-rw-r--r--templates/web/zurich/admin/reports.html27
-rw-r--r--templates/web/zurich/admin/update_edit.html40
-rw-r--r--templates/web/zurich/around/_updates.html0
-rw-r--r--templates/web/zurich/around/intro.html15
-rw-r--r--templates/web/zurich/auth/sign_out.html7
-rwxr-xr-xtemplates/web/zurich/faq/faq-de-ch.html (renamed from templates/web/zurich/faq/faq-de.html)0
-rw-r--r--templates/web/zurich/footer.html21
-rw-r--r--templates/web/zurich/header.html75
-rw-r--r--templates/web/zurich/nav_over_content.html10
-rw-r--r--templates/web/zurich/report/_item.html22
-rw-r--r--templates/web/zurich/report/_main.html17
-rw-r--r--templates/web/zurich/report/banner.html17
-rw-r--r--templates/web/zurich/report/new/councils_text_all.html0
-rw-r--r--templates/web/zurich/report/new/fill_in_details_form.html18
-rw-r--r--templates/web/zurich/report/updates.html17
-rwxr-xr-xtemplates/web/zurich/reports/index.html33
-rw-r--r--templates/web/zurich/tokens/confirm_problem.html15
28 files changed, 810 insertions, 45 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..5ae8eb8a6
--- /dev/null
+++ b/templates/web/zurich/admin/body-form.html
@@ -0,0 +1,50 @@
+ <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>
+
+[% IF admin_type == 'super' %]
+ <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>
+ [% FOR area IN areas %]
+ [% SET aid = area.id %]
+ <option value="[% area.id %]"[% ' selected' IF body.areas.$aid %]>[% area.name %]</option>
+ [% END %]
+ </select>
+ </p>
+[% END %]
+
+ <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..41cb520f5
--- /dev/null
+++ b/templates/web/zurich/admin/header.html
@@ -0,0 +1,22 @@
+[%
+ 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; }
+ .error { color: red; }
+ .overdue { background-color: #ffcccc; }
+ select { width: auto; }
+</style>
+
+ <h1 style="clear:both;">[% title %]</h1>
diff --git a/templates/web/zurich/admin/index-dm.html b/templates/web/zurich/admin/index-dm.html
new file mode 100644
index 000000000..a88100ee4
--- /dev/null
+++ b/templates/web/zurich/admin/index-dm.html
@@ -0,0 +1,36 @@
+[% PROCESS 'admin/header.html' title=loc('Summary') -%]
+[% PROCESS 'admin/report_blocks.html' %]
+
+[% status_message %]
+
+<h2>[% loc('Submitted') %]</h2>
+[% INCLUDE list, problems = unconfirmed.all %]
+
+<h2>[% loc('Planned') %]</h2>
+[% INCLUDE list, problems = approval.all %]
+
+<h2>[% loc('All reports') %]</h2>
+[% INCLUDE list, problems = other.all, include_subdiv = 1 %]
+
+[% INCLUDE 'admin/footer.html' %]
+
+[% BLOCK list %]
+<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>
+ [% IF include_subdiv %]
+ <th>[% loc('Subdivision/Body') %]</th>
+ [% END %]
+ <th>*</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..4e4009c16
--- /dev/null
+++ b/templates/web/zurich/admin/index-sdm.html
@@ -0,0 +1,33 @@
+[% PROCESS 'admin/header.html' title=loc('Summary') -%]
+[% PROCESS 'admin/report_blocks.html' %]
+
+<h2>[% loc('New reports') %]</h2>
+[% INCLUDE list, problems = reports_new.all %]
+
+<h2>[% loc('Reports awaiting approval') %]</h2>
+[% INCLUDE list, problems = reports_unpublished.all, no_edit = 1 %]
+
+<h2>[% loc('Reports published') %]</h2>
+[% INCLUDE list, problems = reports_published.all, no_edit = 1 %]
+
+[% INCLUDE 'admin/footer.html' %]
+
+[% BLOCK list %]
+<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>
+ [% IF NOT no_edit %]
+ <th>*</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..ab835b5a3
--- /dev/null
+++ b/templates/web/zurich/admin/index.html
@@ -0,0 +1,23 @@
+[% 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>
+
+[% 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 %]
+ [% 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..7a78d4c63
--- /dev/null
+++ b/templates/web/zurich/admin/list_updates.html
@@ -0,0 +1,16 @@
+<h2>[% loc('Updates') %]</h2>
+
+<table cellspacing="0" cellpadding="2" border="1">
+ <tr>
+ <th>[% loc('ID') %]</th>
+ <th>[% loc('Created') %]</th>
+ <th>[% loc('Text') %]</th>
+ </tr>
+[% FOREACH update IN updates -%]
+ <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>[% update.text | html %]</td>
+ </tr>
+[% END -%]
+</table>
diff --git a/templates/web/zurich/admin/problem_row.html b/templates/web/zurich/admin/problem_row.html
new file mode 100644
index 000000000..617490232
--- /dev/null
+++ b/templates/web/zurich/admin/problem_row.html
@@ -0,0 +1,38 @@
+[%- 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 );
+ %]>
+ <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>[% 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 %]
+
+ [% 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..faad3ec55
--- /dev/null
+++ b/templates/web/zurich/admin/report_edit-sdm.html
@@ -0,0 +1,57 @@
+[% PROCESS 'admin/header.html' title=tprintf(loc('Editing problem %d'), problem.id ) -%]
+[% PROCESS 'admin/report_blocks.html' %]
+
+[% 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>
+<li><a href="[% c.uri_for_email( '/report', problem.id ) %]">[% loc('View report on site' )%]</a></li>
+<li>[% loc('Details:') %] [% 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>[% loc('Co-ordinates:') %] [% problem.local_coords.join(',') %]
+([%
+ 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>[% loc('Category:') %] [% problem.category | html %] </li>
+<li>[% loc('Name:') %] [% problem.name | html %]
+<li>[% loc('Email:') %] [% 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>
+
+[% 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><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>
+
+<li><label for="status_update">[% loc('New update:') %]</label>
+<textarea name='status_update' id='status_update' cols=60 rows=5></textarea></li>
+
+</ul>
+
+<p><input type="submit" name="Submit changes" value="[% loc('Submit changes') %]" ></p>
+<p align="right"><input 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..7fdaeabff
--- /dev/null
+++ b/templates/web/zurich/admin/report_edit.html
@@ -0,0 +1,179 @@
+[%
+ 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 %]
+
+<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>
+<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 %]
+ [% 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>[% loc('Co-ordinates:') %] [% problem.local_coords.join(',') %]
+([%
+ 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>[% 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 %]'>
+[% 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>
+
+
+[% 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>
+<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="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">
+ <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>
+
+[% IF problem.state == 'unconfirmed' OR problem.state == 'confirmed' %]
+
+<ul>
+<li class="assignation">
+<label for="body_subdivision">[% loc('Assign to subdivision:') %]</label>
+ <select name="body_subdivision" id="body_subdivision">
+ <option value="">--</option>
+ [% 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 %]
+ </select>
+
+<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 %]
+ <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>
+ <li class="assignation">
+ <label for="body_subdivision">[% loc('Assign to subdivision:') %]</label>
+ <select name="body_subdivision" id="body_subdivision">
+ <option value="" selected>--</option>
+ [% FOR body IN bodies %]
+ [% NEXT UNLESS body.parent.id == c.user.from_body.id %]
+ <option value="[% body.id %]">[% body.name %]</option>
+ [% END %]
+ </select>
+ </li>
+
+ <li><label for="status_update">[% loc('Public response:') %]</label>
+
+ <textarea name='status_update' id='status_update' cols=60 rows=5>[% problem.extra.public_response | html %]</textarea>
+ </li>
+</ul>
+
+[% 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..f8c022630
--- /dev/null
+++ b/templates/web/zurich/admin/reports.html
@@ -0,0 +1,27 @@
+[% 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 searched %]
+<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>
+ </tr>
+ [% INCLUDE 'admin/problem_row.html', page = 'search' %]
+</table>
+
+[% INCLUDE 'admin/list_updates.html' %]
+
+[% END %]
+
+[% 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' %]
diff --git a/templates/web/zurich/around/_updates.html b/templates/web/zurich/around/_updates.html
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/templates/web/zurich/around/_updates.html
diff --git a/templates/web/zurich/around/intro.html b/templates/web/zurich/around/intro.html
index c113afca7..f7a4904e3 100644
--- a/templates/web/zurich/around/intro.html
+++ b/templates/web/zurich/around/intro.html
@@ -1 +1,16 @@
<h1>[% loc('Report, view, or discuss local problems') %]</h1>
+
+<!-- FIXME Better place for this -->
+<script>
+ $(function() {
+ $( "#pc" ).autocomplete({
+ minLength: 3,
+ select: function(event, ui) {
+ $(this).val(ui.item.value);
+ this.form.submit();
+ return true;
+ },
+ source: "/ajax/geocode"
+ });
+ });
+</script>
diff --git a/templates/web/zurich/auth/sign_out.html b/templates/web/zurich/auth/sign_out.html
new file mode 100644
index 000000000..644118f63
--- /dev/null
+++ b/templates/web/zurich/auth/sign_out.html
@@ -0,0 +1,7 @@
+[% INCLUDE 'header.html', title = loc('Sign out'), bodyclass = 'fullwidthpage' %]
+
+<h1>[% loc('You have been signed out') %]</h1>
+
+<p>[% tprintf( loc('Please feel free to <a href="%s">sign in again</a>, or go back to the <a href="/">front page</a>.'), c.uri_for('/admin') ) %]</p>
+
+[% INCLUDE 'footer.html' %]
diff --git a/templates/web/zurich/faq/faq-de.html b/templates/web/zurich/faq/faq-de-ch.html
index a739f1b74..a739f1b74 100755
--- a/templates/web/zurich/faq/faq-de.html
+++ b/templates/web/zurich/faq/faq-de-ch.html
diff --git a/templates/web/zurich/footer.html b/templates/web/zurich/footer.html
index 2e4717360..a570a66a3 100644
--- a/templates/web/zurich/footer.html
+++ b/templates/web/zurich/footer.html
@@ -4,15 +4,24 @@
<div class="nav-wrapper">
<div class="nav-wrapper-2">
- <div id="main-nav" role="navigation">
- <ul id="main-menu">
- <li><[% IF c.req.uri.path == '/' %]span[% ELSE %]a href="/"[% END %]
+ <div class="nav-wrapper-3">
+ <div id="main-nav" role="navigation">
+ [% IF c.user_exists %]
+ <p>
+ [% tprintf(loc('Hi %s'), c.user.name || c.user.email) %]
+ </p><p><a href="/auth/sign_out">[% loc('sign out') %]</a>
+ </p>
+ [% ELSE %]
+ <ul id="main-menu" class="mob-only">
+ <li><[% IF c.req.uri.path == '/' %]span[% ELSE %]a href="/"[% END %]
>[% loc("Report a problem") %]</[% c.req.uri.path == '/' ? 'span' : 'a' %]></li>[%
- %]<li><[% IF c.req.uri.path == '/reports' %]span[% ELSE %]a href="/reports"[% END
+ %]<li><[% IF c.req.uri.path == '/reports' %]span[% ELSE %]a href="/reports"[% END
%]>[% loc("All reports") %]</[% c.req.uri.path == '/reports' ? 'span' : 'a' %]></li>[%
- %]<li><[% IF c.req.uri.path == '/faq' %]span[% ELSE %]a href="/faq"[% END
+ %]<li><[% IF c.req.uri.path == '/faq' %]span[% ELSE %]a href="/faq"[% END
%]>[% loc("Help") %]</[% c.req.uri.path == '/faq' ? 'span' : 'a' %]></li>
- </ul>
+ </ul>
+ [% END %]
+ </div>
</div>
</div>
</div>
diff --git a/templates/web/zurich/header.html b/templates/web/zurich/header.html
index 9fa43f3fa..8c8e49775 100644
--- a/templates/web/zurich/header.html
+++ b/templates/web/zurich/header.html
@@ -11,21 +11,23 @@
<meta name="HandHeldFriendly" content="true">
<meta name="mobileoptimized" content="0">
- <link rel="stylesheet" href="[% version('/cobrands/' _ c.cobrand.moniker _ '/base.css') %]">
- <link rel="stylesheet" href="[% version('/cobrands/' _ c.cobrand.moniker _ '/layout.css') %]" media="(min-width:48em)">
+[% SET start = c.config.ADMIN_BASE_URL IF admin %]
+
+ <link rel="stylesheet" href="[% start %][% version('/cobrands/' _ c.cobrand.moniker _ '/base.css') %]">
+ <link rel="stylesheet" href="[% start %][% version('/cobrands/' _ c.cobrand.moniker _ '/layout.css') %]" media="(min-width:48em)">
[% extra_css %]
<!--[if (lt IE 9) & (!IEMobile)]>
- <link rel="stylesheet" href="[% version('/cobrands/' _ c.cobrand.moniker _ '/layout.css') %]">
+ <link rel="stylesheet" href="[% start %][% version('/cobrands/' _ c.cobrand.moniker _ '/layout.css') %]">
<![endif]-->
- <script src="[% version('/js/modernizr.custom.js') %]" charset="utf-8"></script>
- <script src="[% version('/cobrands/fixmystreet/position_map.js') %]" charset="utf-8"></script>
- [% INCLUDE 'common_header_tags.html', js_override = '/cobrands/fixmystreet/fixmystreet.js', site_title = 'FixMyZ&uuml;rich' %]
+<!-- CDN for now FIXME --><link rel="stylesheet" href="http://code.jquery.com/ui/1.9.2/themes/redmond/jquery-ui.css">
+
+ <script src="[% start %][% version('/js/modernizr.custom.js') %]" charset="utf-8"></script>
+ <script src="[% start %][% version('/cobrands/fixmystreet/position_map.js') %]" charset="utf-8"></script>
+ [% INCLUDE 'common_header_tags.html', js_override = '/cobrands/fixmystreet/fixmystreet.js', site_title = 'FixMyZurich' %]
[% extra_js %]
-
- [% IF c.req.uri.host == 'osm.fixmystreet.com' %]
- <link rel="canonical" href="http://www.fixmystreet.com[% c.req.uri.path_query %]">
- [% END %]
+
+<!-- CDN for now FIXME --><script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js" charset="utf-8"></script>
[% INCLUDE 'tracking_code.html' %]
@@ -36,25 +38,52 @@
<div class="table-cell">
<header id="site-header" role="banner">
<div class="container">
- <a href="/" id="site-logo">FixMyStreet</a>
+ <a href="http://www.stadt-zuerich.ch/" id="site-logo">FixMyZurich</a>
<a href="#main-nav" id="nav-link">Main Navigation</a>
</div>
</header>
- <div id="user-meta">
- [% IF c.user_exists %]
- <p>
- [% tprintf(loc('Hi %s'), c.user.name || c.user.email) %]
- <a href="/auth/sign_out">[% loc('sign out') %]</a>
- </p>
- [% ELSE %]
- <!-- <a href="/auth">[% loc('Sign in') %]</a> -->
- [% END %]
- </div>
+ <div class="container">
- [% pre_container_extra %]
+[% 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="container">
<div class="content[% " $mainclass" | html IF mainclass %]" role="main">
+ [% IF NOT admin %]
+ [% INCLUDE 'nav_over_content.html' %]
+ [% END %]
+
+ [% pre_container_extra %]
<!-- [% INCLUDE 'debug_header.html' %] -->
diff --git a/templates/web/zurich/nav_over_content.html b/templates/web/zurich/nav_over_content.html
new file mode 100644
index 000000000..4dbe87652
--- /dev/null
+++ b/templates/web/zurich/nav_over_content.html
@@ -0,0 +1,10 @@
+ <div id="zurich-main-nav" class="desk-only">
+ <ul>
+ <li><[% IF c.req.uri.path == '/around' || c.req.uri.path == '/' %]span[% ELSE %]a href="/"[% END %]
+ >[% loc("Report a problem") %]</[% c.req.uri.path == '/around' ? 'span' : 'a' %]></li>[%
+ %]<li><[% IF c.req.uri.path == '/reports' %]span[% ELSE %]a href="/reports"[% END
+ %]>[% loc("All reports") %]</[% c.req.uri.path == '/reports' ? 'span' : 'a' %]></li>[%
+ %]<li><[% IF c.req.uri.path == '/faq' %]span[% ELSE %]a href="/faq"[% END
+ %]>[% loc("Help") %]</[% c.req.uri.path == '/faq' ? 'span' : 'a' %]></li>
+ </ul>
+ </div>
diff --git a/templates/web/zurich/report/_item.html b/templates/web/zurich/report/_item.html
new file mode 100644
index 000000000..41164cdd1
--- /dev/null
+++ b/templates/web/zurich/report/_item.html
@@ -0,0 +1,22 @@
+<li>
+<a class="text" href="[% c.uri_for('/report', problem.id ) %]">
+ [% IF problem.state != 'unconfirmed' AND problem.photo AND problem.extra.publish_photo %]
+ <img class="img" height="60" width="90" src="/photo/[% problem.id %].fp.jpeg" alt="">
+ [% END %]
+ [% IF problem.state != 'unconfirmed' %]
+ <h4>[% problem.title | html %]</h4>
+ [% ELSE %]
+ <h4><em>[% loc('Awaiting moderation') %]</em></h4>
+ [% END %]
+ <small>[% prettify_dt( problem.created_local, 'zurich' ) %]
+ [%- IF dist %], [% dist %]km[% END %]
+ [%- IF include_lastupdate AND problem.created != problem.lastupdate AND problem.whensent != problem.lastupdate %],
+ [% tprintf('last updated %s', prettify_dt( problem.lastupdate_local, 'zurich' ) ) %]
+ [%- END %]
+ [% IF NOT no_fixed AND problem.is_fixed %]
+ [% loc('(fixed)') %]
+ [% ELSIF NOT no_fixed AND problem.is_closed %]
+ [% loc('(closed)') %]
+ [% END %]</small>
+</a>
+</li>
diff --git a/templates/web/zurich/report/_main.html b/templates/web/zurich/report/_main.html
new file mode 100644
index 000000000..e6c310873
--- /dev/null
+++ b/templates/web/zurich/report/_main.html
@@ -0,0 +1,17 @@
+<div class="problem-header cf">
+ <h1>[% tprintf( loc('Reported in the %s category'), problem.category ) %]</h1>
+ <p class="sub">
+ [% prettify_dt( problem.created_local, 'zurich' ) %]
+ [%- IF !problem.used_map %]<br>[% loc('there is no pin shown as the user did not use the map') %][% END %]
+ </p>
+
+ [% IF problem.state != 'unconfirmed' %]
+ [% IF problem.extra.publish_photo %]
+ [% INCLUDE 'report/photo.html' object=problem %]
+ [% END %]
+ [% add_links( problem.detail ) | html_para %]
+ [% ELSE %]
+ [% loc('This report is awaiting moderation.') %]
+ [% END %]
+
+</div>
diff --git a/templates/web/zurich/report/banner.html b/templates/web/zurich/report/banner.html
new file mode 100644
index 000000000..eda70a0de
--- /dev/null
+++ b/templates/web/zurich/report/banner.html
@@ -0,0 +1,17 @@
+[% USE date %]
+[% BLOCK banner %]
+ <div class="banner">
+ <p id="[% id %]">[% text %]</p>
+ </div>
+[% END %]
+
+[% IF problem.state == 'unconfirmed' %]
+ [% INCLUDE banner, id = 'closed', text = loc('Submitted') %]
+[% ELSIF problem.state == 'confirmed' %]
+ [% INCLUDE banner, id = 'closed', text = loc('Open') %]
+[% ELSIF problem.is_fixed OR problem.is_closed %]
+ [% INCLUDE banner, id = 'fixed', text = loc('Closed') %]
+[% ELSIF problem.state == 'in progress' OR problem.state == 'planned' %]
+ [% INCLUDE banner, id = 'progress', text = loc('In progress') %]
+[% END %]
+
diff --git a/templates/web/zurich/report/new/councils_text_all.html b/templates/web/zurich/report/new/councils_text_all.html
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/templates/web/zurich/report/new/councils_text_all.html
diff --git a/templates/web/zurich/report/new/fill_in_details_form.html b/templates/web/zurich/report/new/fill_in_details_form.html
index a4029c527..1cecf036d 100644
--- a/templates/web/zurich/report/new/fill_in_details_form.html
+++ b/templates/web/zurich/report/new/fill_in_details_form.html
@@ -1,20 +1,6 @@
<div id="report-a-problem-main">
<h1>[% loc('Reporting a problem') %]</h1>
- [% IF js %]
- <p id="councils_text">
- [%
- tprintf(
- loc('All the information you provide here will be sent to <strong>%s</strong>.'),
- loc('the local council')
- );
- %]
- [% loc('The subject and details of the problem will be public, plus your name if you give us permission.') %]
- </p>
- [% ELSE %]
- [% PROCESS 'report/new/councils_text.html' %]
- [% END %]
-
<div id="report-a-problem-sidebar">
<!--
The text for this section needs checking, but I can't work out which bit comes from where
@@ -49,8 +35,8 @@
[% INCLUDE 'report/new/form_heading.html' %]
- [% IF field_errors.council %]
- <p class='form-error'>[% field_errors.council %]</p>
+ [% IF field_errors.bodies %]
+ <p class='form-error'>[% field_errors.bodies %]</p>
[% END %]
<label for="form_detail">[% loc('Details') %]</label>
diff --git a/templates/web/zurich/report/updates.html b/templates/web/zurich/report/updates.html
new file mode 100644
index 000000000..69c8af99f
--- /dev/null
+++ b/templates/web/zurich/report/updates.html
@@ -0,0 +1,17 @@
+[% IF problem.state == 'fixed - council' OR problem.state == 'closed' %]
+ <h4 class="static-with-rule">[% loc('Updates') %]</h4>
+ <ul class="issue-list">
+ <li>
+ <div class="update-wrap">
+ <div class="update-text">
+ <p class="meta-2">[% prettify_dt( problem.lastupdate_local, 'zurich' ) %]</p>
+ [% IF problem.state == 'fixed - council' %]
+ [% add_links( problem.extra.public_response ) | html_para %]
+ [% ELSIF problem.state == 'closed' AND problem.external_body %]
+ <p>[% tprintf( loc('Assigned to %s'), problem.body(c).name ) %]</p>
+ [% END %]
+ </div>
+ </div>
+ </li>
+ </ul>
+[% END %]
diff --git a/templates/web/zurich/reports/index.html b/templates/web/zurich/reports/index.html
new file mode 100755
index 000000000..670746753
--- /dev/null
+++ b/templates/web/zurich/reports/index.html
@@ -0,0 +1,33 @@
+[%
+ PROCESS "maps/${map.type}.html";
+ INCLUDE 'header.html',
+ title = loc('Summary reports'),
+ bodyclass = 'mappage';
+%]
+[% map_html %]
+ <p id='sub_map_links'>
+ <a class="hidden-nojs" id="map_layer_toggle" href="">Stadtplan</a>
+ </p>
+</div>
+
+<div id="side">
+
+<h1>[% loc('All Reports') %]</h1>
+
+[% INCLUDE 'pagination.html', param = 'p' %]
+
+<section class="full-width">
+ [% IF problems.0 %]
+ <ul class="issue-list-a">
+ [% FOREACH problem IN problems.0 %]
+ [% INCLUDE 'reports/_list-entry.html' %]
+ [% END %]
+ </ul>
+ [% END %]
+</section>
+
+[% INCLUDE 'pagination.html', param = 'p' %]
+
+</div>
+[% INCLUDE 'footer.html' %]
+
diff --git a/templates/web/zurich/tokens/confirm_problem.html b/templates/web/zurich/tokens/confirm_problem.html
new file mode 100644
index 000000000..d61cf3ffa
--- /dev/null
+++ b/templates/web/zurich/tokens/confirm_problem.html
@@ -0,0 +1,15 @@
+[% INCLUDE 'header.html', title = loc('Confirmation') %]
+
+<h1>[% loc('Confirmation') %]</h1>
+
+[%
+ loc('You have successfully confirmed your email address.');
+ tprintf(
+ loc( 'You can <a href="%s%s">view the problem on this site</a>.' ),
+ c.cobrand.base_url_for_report( problem ),
+ problem.url
+ );
+%]
+</p>
+
+[% INCLUDE 'footer.html' %]