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.html1
-rw-r--r--templates/web/zurich/admin/header.html11
-rw-r--r--templates/web/zurich/admin/index-dm.html2
-rw-r--r--templates/web/zurich/admin/index-sdm.html15
-rw-r--r--templates/web/zurich/admin/problem_row.html39
-rw-r--r--templates/web/zurich/admin/report_edit-sdm.html26
-rw-r--r--templates/web/zurich/admin/report_edit.html85
-rw-r--r--templates/web/zurich/admin/reports.html4
8 files changed, 107 insertions, 76 deletions
diff --git a/templates/web/zurich/admin/body.html b/templates/web/zurich/admin/body.html
index 4eecb9839..143e61f83 100644
--- a/templates/web/zurich/admin/body.html
+++ b/templates/web/zurich/admin/body.html
@@ -41,7 +41,6 @@
</p>
<input type="hidden" name="confirmed" value="1" id="confirmed">
- <input type="hidden" name="deleted" value="1" id="deleted">
<p>
<strong>[% loc('Note:') %] </strong> <textarea name="note" rows="3" cols="40"></textarea>
diff --git a/templates/web/zurich/admin/header.html b/templates/web/zurich/admin/header.html
index b37a509fa..113839a65 100644
--- a/templates/web/zurich/admin/header.html
+++ b/templates/web/zurich/admin/header.html
@@ -1,4 +1,15 @@
[% INCLUDE 'header.html' admin = 1, bodyclass = 'fullwidthpage 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">
dt { clear: left; float: left; font-weight: bold; }
dd { margin-left: 8em; }
diff --git a/templates/web/zurich/admin/index-dm.html b/templates/web/zurich/admin/index-dm.html
index e3111d506..18842d6e5 100644
--- a/templates/web/zurich/admin/index-dm.html
+++ b/templates/web/zurich/admin/index-dm.html
@@ -1,4 +1,4 @@
-[% INCLUDE 'admin/header.html' title=loc('Summary') -%]
+[% PROCESS 'admin/header.html' title=loc('Summary') -%]
[% PROCESS 'admin/report_blocks.html' %]
[% status_message %]
diff --git a/templates/web/zurich/admin/index-sdm.html b/templates/web/zurich/admin/index-sdm.html
index 654625457..11276115a 100644
--- a/templates/web/zurich/admin/index-sdm.html
+++ b/templates/web/zurich/admin/index-sdm.html
@@ -1,4 +1,4 @@
-[% INCLUDE 'admin/header.html' title=loc('Summary') -%]
+[% PROCESS 'admin/header.html' title=loc('Summary') -%]
[% PROCESS 'admin/report_blocks.html' %]
<h2>New reports</h2>
@@ -17,6 +17,7 @@
<tr>
<th>[% loc('ID') %]</th>
<th>[% loc('Title') %]</th>
+ <th>[% loc('State') %]</th>
<th>[% loc('Category') %]</th>
<th>[% loc('Created') %]</th>
[% IF NOT no_edit %]
@@ -26,16 +27,6 @@
<tr class="filter-row">
<td colspan="6"><input type="text" placeholder="[%= loc('Filter report list') %]" /></td>
</tr>
-[%- FOR problem IN problems %]
- <tr[% ' class="adminhidden"' IF problem.state == 'hidden' %]>
- <td class="record-id">[% problem.id %]</td>
- <td>[% PROCESS value_or_nbsp value=problem.title %]</td>
- <td>[% problem.category %]</td>
- <td>[% PROCESS format_date this_date=problem.created %]</td>
- [% IF NOT no_edit %]
- <td><a href="[% c.uri_for( 'report_edit', problem.id ) %]">[% loc('Edit') %]</a></td>
- [% END %]
- </tr>
-[%- END -%]
+[% INCLUDE 'admin/problem_row.html' %]
</table>
[% END %]
diff --git a/templates/web/zurich/admin/problem_row.html b/templates/web/zurich/admin/problem_row.html
index 2cc94e10c..7fddddf8e 100644
--- a/templates/web/zurich/admin/problem_row.html
+++ b/templates/web/zurich/admin/problem_row.html
@@ -1,18 +1,9 @@
-[%
- 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'),
- }
-%]
[%- FOR problem IN problems %]
- [% SET p_body = problem.bodies.values.0 %]
- [% 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 %]
+ [% IF page == 'search' %]
+ [% SET p_body = problem.bodies.values.0 %]
+ [% 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' %]>
<td class="record-id">[%- IF problem.is_visible -%]
<a href="[% c.uri_for_email( '/report', problem.id ) %]">[% problem.id %]</a>
@@ -24,13 +15,17 @@
<td>[% PROCESS format_date this_date=problem.created %]</td>
<td>[% PROCESS format_date this_date=problem.lastupdate %]</td>
<td>[% states.${problem.state} %]</td>
- <td>
- [%- IF p_body.parent.id AND p_body.parent.parent.id -%][%# ...it's a subdivision %]
- [% PROCESS value_or_nbsp value=p_body.name %]
- [%- ELSE -%]
- &nbsp;
- [%- END -%]
- </td>
- <td><a href="[% c.uri_for( 'report_edit', problem.id ) %]">[% loc('Edit') %]</a></td>
+ [% IF admin_type != 'sdm' %]
+ <td>
+ [%- IF p_body.parent.id AND p_body.parent.parent.id -%][%# ...it's a subdivision %]
+ [% PROCESS value_or_nbsp value=p_body.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
index f41595c78..e5add67f6 100644
--- a/templates/web/zurich/admin/report_edit-sdm.html
+++ b/templates/web/zurich/admin/report_edit-sdm.html
@@ -1,4 +1,4 @@
-[% INCLUDE 'admin/header.html' title=tprintf(loc('Editing problem %d'), problem.id ) -%]
+[% PROCESS 'admin/header.html' title=tprintf(loc('Editing problem %d'), problem.id ) -%]
[% PROCESS 'admin/report_blocks.html' %]
[% status_message %]
@@ -10,10 +10,12 @@
<p align="right"><input type="submit" name="send_back" value="[% loc('Not for my subdivision') %]"></p>
<ul>
- [%- cobrand_data = problem.cobrand_data %]
- [%- cobrand_data = c.data_for_generic_problem IF !problem.cobrand %]
-<li><a href="[% c.uri_for_email( '/report', problem.id, cobrand_data ) %]">[% loc('View report on site' )%]</a></li>
-<li>[% loc('Details:') %] [% problem.detail | html %]</li>
+<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>[% loc('originally entered') %]: &ldquo;[% problem.extra.original_detail | html %]&rdquo;
+[% END %]
+</li>
<li>[% loc('Co-ordinates:') %] [% problem.local_coords.join(',') %] ([% problem.latitude %],[% problem.longitude %]) ([% loc('originally entered') %] &lsquo;[% problem.postcode | html %]&rsquo;, [% IF problem.used_map %][% loc('used map') %][% ELSE %][% loc("didn't use map") %][% END %])</li>
<li>[% loc('Category:') %] [% problem.category | html %] </li>
@@ -23,6 +25,20 @@
<li>[% loc('Phone:') %] [% IF problem.user.phone %][% problem.user.phone | html %][% ELSE %]<em>[% loc('None') %]</em>[% END %]</li>
<li>[% loc('Created:') %] [% PROCESS format_time time=problem.created %]</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. View image directly to check<br>[% END %]
+<input type="submit" name="rotate_photo" value="Rotate Left" />
+<input type="submit" name="rotate_photo" value="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 %]
+
+<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>
diff --git a/templates/web/zurich/admin/report_edit.html b/templates/web/zurich/admin/report_edit.html
index 468280668..1bc2a5922 100644
--- a/templates/web/zurich/admin/report_edit.html
+++ b/templates/web/zurich/admin/report_edit.html
@@ -14,23 +14,32 @@
<div style="float:left; margin-top: 1em; width:48%; margin-right:2%">
<ul>
- [%- cobrand_data = problem.cobrand_data %]
- [%- cobrand_data = c.data_for_generic_problem IF !problem.cobrand %]
-<li><a href="[% c.uri_for_email( '/report', problem.id, cobrand_data ) %]">[% loc('View report on site' )%]</a></li>
-<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></li>
+<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>[% loc('originally entered') %]: &ldquo;[% problem.extra.original_detail | html %]&rdquo;
+ [% 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 %]
+ [% loc('originally entered') %]: &ldquo;[% problem.extra.original_detail | html %]&rdquo;
+ [% END %]
+ </li>
+[% END %]
+
<li>[% loc('Co-ordinates:') %] [% problem.local_coords.join(',') %] ([% problem.latitude %],[% problem.longitude %]) ([% loc('originally entered') %] &lsquo;[% problem.postcode | html %]&rsquo;, [% IF problem.used_map %][% loc('used map') %][% ELSE %][% loc("didn't use map") %][% END %])</li>
-<input type="hidden" name="anonymous" value="[% problem.anonymous %]">
<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 problem.extra.email_confirmed %][% loc('Confirmed') %][% 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_time time=problem.created %]</li>
-<input type="hidden" name="flagged" value="[% problem.flagged %]">
-<input type="hidden" name="non_public" value="[% problem.non_public %]">
[% IF problem.photo %]
[% photo = problem.get_photo_params %]
@@ -51,18 +60,26 @@
<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>
-[% IF problem.state == 'unconfirmed' OR problem.state == 'confirmed' %]
+<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>
- <p>[% loc('State:') %] <select name="state" id="state">
- <option value="">--</option>
- [% FOREACH s IN [
- ['unconfirmed',loc('Submitted')]
- ['confirmed', loc('Open')],
- ['hidden', loc('Hidden')],
- ] %]
- <option [% 'selected ' IF s.0 == problem.state %] value="[% s.0 %]">[% s.1 %]</option>
- [% END %]
- </select></p>
+[% IF problem.state == 'unconfirmed' OR problem.state == 'confirmed' %]
<ul>
<li class="assignation">
@@ -117,20 +134,22 @@ $(function(){
[% ELSIF problem.state == 'planned' %]
- <p>[% loc('State:') %] <select name="state" id="state">
- <option value="">--</option>
- [% FOREACH s IN [
- ['planned', loc('Planned')],
- ['hidden', loc('Hidden')],
- ] %]
- <option [% 'selected ' IF s.0 == problem.state %] value="[% s.0 %]">[% s.1 %]</option>
- [% END %]
- </select></p>
+<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>
- <ul>
-<li><label for="status_update">[% loc('Public response:') %]</label>
-<textarea name='status_update' id='status_update' cols=60 rows=5></textarea></li>
- </ul>
+ <li><label for="status_update">[% loc('Public response:') %]</label>
+ <textarea name='status_update' id='status_update' cols=60 rows=5></textarea></li>
+
+</ul>
[% END %]
diff --git a/templates/web/zurich/admin/reports.html b/templates/web/zurich/admin/reports.html
index 372e94367..5911934c8 100644
--- a/templates/web/zurich/admin/reports.html
+++ b/templates/web/zurich/admin/reports.html
@@ -1,4 +1,4 @@
-[% INCLUDE 'admin/header.html' title=loc('Search Reports') %]
+[% 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">
@@ -15,7 +15,7 @@
<th>[% loc('Created') %]</th>
<th>*</th>
</tr>
- [% INCLUDE 'admin/problem_row.html' %]
+ [% INCLUDE 'admin/problem_row.html', page = 'search' %]
</table>
[% INCLUDE 'admin/list_updates.html' %]