aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/zurich/admin/reports/edit.html
diff options
context:
space:
mode:
Diffstat (limited to 'templates/web/zurich/admin/reports/edit.html')
-rw-r--r--templates/web/zurich/admin/reports/edit.html291
1 files changed, 291 insertions, 0 deletions
diff --git a/templates/web/zurich/admin/reports/edit.html b/templates/web/zurich/admin/reports/edit.html
new file mode 100644
index 000000000..4b0490b4a
--- /dev/null
+++ b/templates/web/zurich/admin/reports/edit.html
@@ -0,0 +1,291 @@
+[%
+ PROCESS "report/photo-js.html";
+ PROCESS "maps/zurich.html";
+ SET bodyclass = 'mappage';
+ INCLUDE 'admin/header.html'
+ title = tprintf(loc('Editing problem %d'), problem.id );
+ PROCESS 'admin/report_blocks.html'
+-%]
+
+[% map_html %]
+</div>
+
+<div id="map_sidebar">
+
+[% pstate = problem.get_extra_metadata('closure_status') || problem.state %]
+
+<form id="report_edit" method="post" action="[% c.uri_for_action( 'admin/reports/edit', [ problem.id ] ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8">
+ <input type="hidden" name="token" value="[% csrf_token %]" >
+ <input type="hidden" name="submit" value="1" >
+
+<div class="admin-report-edit admin-report-edit--details">
+
+<dl>
+ <dd class="screen-only">&raquo; <a href="[% c.uri_for_email( '/report', problem.id ) %]">[% loc('View report on site' )%]</a></dd>
+
+ <dd class="screen-only">&raquo; <a href="http://webgis.intra.stzh.ch/AV_Online/Direct.asp?Map=AV&amp;Search=Koord&amp;West=[% problem.local_coords.0 %]&amp;Nord=[% problem.local_coords.1 %]&amp;B=300" target="_blank">Standort in AV-Online anzeigen</a></dd>
+
+ <dd class="screen-only">&raquo; <a href="http://webgis.intra.stzh.ch/stapo/GoogleStreetView.asp?lat=[% problem.latitude %]&amp;lon=[% problem.longitude %]" target="_blank">[% loc('Street View') %]</a></dd>
+
+ [% IF problem.is_fixed || problem.is_closed || problem.is_hidden %]
+ <dt><span class="mock-label">[% loc('Details:') %]</span></dt>
+ <dd>[% problem.detail | html %]</dd>
+ [% IF problem.extra.original_detail %]
+ <dd>[%
+ detail_safe = problem.extra.original_detail | html;
+ tprintf( loc('originally entered: &ldquo;%s&rdquo;'), detail_safe )
+ %]</dd>
+ [% END %]
+ [% ELSE %]
+
+ <dt><label for='title'>[% loc('Subject:') %]</label></dt>
+ <dd class="screen-only"><input size=60 type='text' class="form-control" id='title' name='title' value='[% problem.title | html %]'></dd>
+ <dd class="print-only">[% problem.title | html %]</dd>
+
+ <dt><label for='detail'>[% loc('Details:') %]</label></dt>
+ <dd class="screen-only"><textarea name='detail' class="form-control" id='detail' cols=60 rows=4>[% problem.detail | html %]</textarea></dd>
+ <dd class="print-only">[% problem.detail | html %]</dd>
+
+ [% IF problem.extra.original_detail %]
+ <dd>[%
+ detail_safe = problem.extra.original_detail | html;
+ tprintf( loc('originally entered: &ldquo;%s&rdquo;'), detail_safe )
+ %]</dd>
+ [% END %]
+ [% END %]
+
+ <dt class="print-only">[% loc('Reported:') %] <!-- Meldedatum --></dt>
+ <dd class="screen-no-space-after">
+ <strong>[% PROCESS format_date this_date=problem.created %] [% problem.created.hms %]</strong>
+ </dd>
+
+ <dd>[% c.cobrand.admin_district_lookup(problem) %]</dd>
+
+ <input type="hidden" name="latitude" id="fixmystreet.latitude" value="[% problem.latitude %]">
+ <input type="hidden" name="longitude" id="fixmystreet.longitude" value="[% problem.longitude %]">
+
+ [% SET fields = problem.get_extra_fields; IF fields.size %]
+ <dd>
+ [% FOR f IN fields %]
+ <strong>[% f.description %]</strong> [% f.value %]
+ <br>
+ [% END %]
+ </dd>
+ [% END %]
+
+ <dt class="print-only">[% loc('Reported by:') %] <!-- Meldende Person --></dt>
+ <dd>
+ <strong>[% IF problem.name %][% problem.name | html %][% ELSE %][% loc('(No name)') %][% END %]</strong>
+ <input type='hidden' name='name' id='name' value='[% problem.name | html %]'>
+ <br>
+ <a href="mailto:[% problem.user.email | html %]">[% problem.user.email | html %]</a>
+ [% IF NOT problem.extra.email_confirmed %]<span class="error">[% loc('Unconfirmed') %]</span>[% END %]
+ <input type='hidden' id='username' name='username' value='[% problem.user.username | html %]'>
+ <br>
+ [% IF problem.user.phone %][% problem.user.phone | html %][% ELSE %]<em>[% loc('(No phone number)') %]</em>[% END %]
+ </dd>
+
+ <dt>[% loc('Category:') %] <!-- Kategorie --></dt>
+ <dd>[% problem.category_display | html %]</dd>
+
+ <dt class="print-only">[% loc('State:') %] <!-- Status --></dt>
+ <dd class="print-only">[% prettify_state(problem.state) %]</dd>
+
+ <dt>[% loc('Time spent (in minutes):') %]</dt>
+ <dd>[% problem.get_time_spent %]</dd>
+
+ [% IF problem.photo %]
+ <dd data-confirm-msg="[% loc('Rotating this photo will discard unsaved changes to the report.') | html %]">
+ [% FOR photo IN problem.photos %]
+ <div class="update-img">
+ <a href="[% c.cobrand.base_url %][% photo.url_temp_full %]" rel="fancy">
+ <img alt="Photo of this report" src="[% c.cobrand.base_url %][% photo.url_temp %]">
+ <span>zoom</span>
+ </a>
+ </div>
+ <input type="submit" name="rotate_photo_[% loop.index %]" value="[% loc('Rotate Left') %]" class="screen-only">
+ <input type="submit" name="rotate_photo_[% loop.index %]" value="[% loc('Rotate Right') %]" class="screen-only">
+ <br>
+ <input type="checkbox" id="publish_photo_[% loop.index %]" name="publish_photo_[% loop.index %]" value="1"[% ' checked' IF problem.extra.publish_photo.${loop.index} %] class="screen-only">
+ <label class="inline screen-only" for="publish_photo_[% loop.index %]">[% loc("Publish photo") %]</label></li>
+ [% END %]
+ [% END %]
+
+</dl>
+
+</div>
+
+<div class="admin-report-edit admin-report-edit--interact">
+
+[% status_message %]
+
+<dl [% IF status_message %]class="with-message"[% END %]>
+
+ <dt class="screen-only">
+ <label for="new_internal_note">[% loc('New internal note:') %]</label>
+ </dt>
+ <dd class="screen-only">
+ <textarea class="form-control" name='new_internal_note' id='new_internal_note' cols=60 rows=4>[% new_internal_note | html %]</textarea>
+ </dd>
+
+ <dt class="screen-only">
+ <label for="time_spent">[% loc('Time spent (in minutes):') %]</label>
+ </dt>
+ <dd class="screen-only">
+ <input type="text" class="form-control" name="time_spent" id="form_time_spent" style="width: 4em" value="0">
+ </dd>
+
+ <dt class="screen-only">
+ <span class="mock-label">[% loc('State:') %]</span>
+ </dt>
+ <dd class="screen-only">
+ <select class="form-control" name="state" id="state" data-pstate="[% pstate %]">
+ <option value="">--</option>
+ [% FOREACH s IN states %]
+ <option [% 'selected ' IF s.state == pstate %] value="[% s.state %]">
+ [% IF s.trans; s.trans; ELSE; prettify_state(s.state); END %]</option>
+ [% END %]
+ </select>
+ </dd>
+
+</dl>
+
+<ul class="no-bullets screen-only">
+
+[% IF problem.state == 'confirmed' %]
+ <li class="assignation">
+ <div id="assignation__category">
+ <label for="category">[% loc('Assign to different category:') %]</label>
+ <select class="form-control" name="category" id="category">
+ <option value="">--</option>
+ [% FOREACH cat IN category_options %]
+ <option value="[% cat.category %]">[% cat.category_display ~%]
+ [% ' (' _ cat.abbreviation _ ')' IF cat.abbreviation %]</option>
+ [% END %]
+ </select>
+ </div>
+ </li>
+
+ [% 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" id="assignation__subdivision">
+ <label for="body_subdivision">[% loc('Assign to subdivision:') %]</label>
+ <select name="body_subdivision" id="body_subdivision" class="form-control assignation__select">
+ <option value="">--</option>
+ [% list %]
+ </select>
+ </li>
+ [% END %]
+
+[% END %]
+</ul>
+
+
+[% IF problem.state == 'feedback pending' %]
+ [%# 3rd party messages sent for Extern/Wunsch states %]
+ [% SWITCH pstate %]
+ [% CASE ['external','wish'] %]
+ <ul class="no-bullets screen-only">
+ <li class="assignation" id="assignation__external">
+ <span class="error hidden">[% loc('Please select a body.') %]</span>
+ <label for="body_external">
+ [% IF pstate == 'external' %]
+ [% loc('Assign to external body:') %]
+ [% ELSE %]
+ [% loc('Assign to competent body:') %]
+ [% END %]
+ </label>
+ <select class="form-control" 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.external_body %] selected[% END %]>[% body.name %]</option>
+ [% END %]
+ </select>
+ </li>
+ <li>
+ [% IF pstate == 'external' %]
+ <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>
+ [% END %]
+ </li>
+ <li>
+ [% INCLUDE 'admin/response_templates_select.html' for='external_body' %]
+ <textarea class="form-control" name='external_message' id='external_body' cols=60 rows=5>[% problem.get_extra_metadata('external_message') | html %]</textarea>
+ </li>
+ </ul>
+ [% END %]
+
+ [%# Public response field shown for Ruckmeldung ausstehend states
+ # (e.g. various pstates) %]
+ <ul class="no-bullets screen-only">
+ <li id="status_update_container"><label for="status_update">
+ [% IF c.cobrand.zurich_user_response_states.$pstate %]
+ [% loc('Reply to user:') %]
+ [% ELSE %]
+ [% loc('Public response:') %]
+ [% END %]
+ </label>
+ [% INCLUDE 'admin/response_templates_select.html' for='status_update' %]
+ <textarea class="form-control" name='status_update' id='status_update' cols=60 rows=5>
+ [%- problem.extra.public_response || default_public_response | html -%]
+ </textarea>
+ </li>
+ </ul>
+[% END %]
+
+<p align="right" class="screen-only">
+ [% IF show_publish_response %]
+ [%# While we call this 'publish_response', the response will not actually
+ # be "published" for these cases: Hidden / Not contactable (for these,
+ # only a private email will be sent to the user. However, in all cases,
+ # this is the end of processing, so we mark this with the same text used
+ # for 'No further updates %]
+ <input type="submit" class="btn" name="publish_response" value="[% loc('No further updates') %]">
+ [% END %]
+
+ [%# This button simply saves changes, but does NOT close the report (though
+ # it may trigger other workflow %]
+ <input type="submit" class="btn" name="Submit changes" value="[% loc('Submit changes') %]" >
+</p>
+
+[% IF c.cobrand.problem_has_public_response(problem) || c.cobrand.problem_has_user_response(problem) %]
+ <h2>[% loc('Public response:') %]</h2>
+ <div class="admin-official-answer">
+ [% problem.extra.public_response | html_para %]
+ </div>
+[% END %]
+
+[% SWITCH problem.state %]
+ [% CASE ['external','wish'] %]
+ <h2>
+ [% IF problem.state == 'external' %]
+ [% loc('Message to external body:') %]
+ [% ELSE %]
+ [% loc('Message to competent body:') %]
+ [% END %]
+ [% problem.body(c).endpoint %]
+ </h2>
+ <div class="admin-external-message">
+ [% problem.extra.external_message | html_para %]
+ </div>
+[% END %]
+
+
+[% INCLUDE 'admin/list_updates.html' %]
+
+</div>
+
+</form>
+
+</div>
+
+<div id="print_report_map" class="print-only">
+[% INCLUDE 'maps/noscript_map.html' map=print_report_map nsm_prefix="large_" %]
+</div>
+
+[% INCLUDE 'admin/footer.html' %]