aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/base/report/_inspect.html
diff options
context:
space:
mode:
authorMarius Halden <marius.h@lden.org>2017-05-28 21:31:42 +0200
committerMarius Halden <marius.h@lden.org>2017-05-28 21:31:42 +0200
commit987124b09a32248414faf4d0d6615d43b29ac6f6 (patch)
treea549db8af723c981d3b346e855f25d6fd5ff8aa7 /templates/web/base/report/_inspect.html
parentdbf56159e44c1560a413022451bf1a1c4cb22a52 (diff)
parenta085b63ce09f87e83b75cda9b9cd08aadfe75d61 (diff)
Merge tag 'v2.0.4' into fiksgatami-dev
Diffstat (limited to 'templates/web/base/report/_inspect.html')
-rw-r--r--templates/web/base/report/_inspect.html57
1 files changed, 25 insertions, 32 deletions
diff --git a/templates/web/base/report/_inspect.html b/templates/web/base/report/_inspect.html
index 06c3aab6c..b75394abd 100644
--- a/templates/web/base/report/_inspect.html
+++ b/templates/web/base/report/_inspect.html
@@ -1,4 +1,3 @@
-[% PROCESS 'admin/report_blocks.html'; # For the report state dropdown %]
[% permissions = c.user.permissions(c, problem.bodies_str) %]
[% second_column = BLOCK -%]
<div id="side-inspect">
@@ -13,9 +12,15 @@
</p>
<p>
[% SET local_coords = problem.local_coords; %]
- <strong>[% loc('Easting/Northing:') %]</strong>
- <span id="problem_easting">[% local_coords.0 IF local_coords %]</span>,
- <span id="problem_northing">[% local_coords.1 IF local_coords %]</span>
+ [% IF local_coords %]
+ <strong>[% loc('Easting/Northing:') %]</strong>
+ <span id="problem_easting">[% local_coords.0 %]</span>,
+ <span id="problem_northing">[% local_coords.1 %]</span>
+ [% ELSE %]
+ <strong>[% loc('Latitude/Longitude:') %]</strong>
+ <span id="problem_latitude">[% problem.latitude %]</span>
+ <span id="problem_longitude">[% problem.longitude %]</span>,
+ [% END %]
<input type="hidden" name="longitude" value="[% problem.longitude %]">
<input type="hidden" name="latitude" value="[% problem.latitude %]">
</p>
@@ -31,21 +36,7 @@
<div class="inspect-section">
<p>
<label for="category">[% loc('Category') %]</label>
- [%# XXX this is duplicated from admin/report_edit.html, should be refactored %]
- <select name="category" id="category" class="form-control">
- [% IF NOT problem.category OR NOT categories.grep(problem.category).size %]
- <optgroup label="[% loc('Existing category') %]">
- <option selected value="[% problem.category | html %]">[% (problem.category OR '-') | html %]</option>
- </optgroup>
- [% END %]
- [% IF categories.size %]
- <optgroup label="[% loc('Available categories') %]">
- [% FOREACH cat IN categories %]
- <option[% ' selected' IF problem.category == cat %]>[% cat | html %]</option>
- [% END %]
- </optgroup>
- [% END %]
- </select>
+ [% INCLUDE 'admin/report-category.html' %]
</p>
[% FOREACH category IN categories %]
@@ -63,19 +54,21 @@
[% END %]
[% IF permissions.report_inspect %]
+ [% PROCESS 'defect_type/format.html' %]
<p>
- <label for="state">[% loc('State') %]</label>
- [%# XXX this is duplicated from admin/report_edit.html, should be refactored %]
- <select name="state" id="state" class="form-control">
- [% FOREACH group IN state_groups %]
- <optgroup label="[% group.0 %]">
- [% FOREACH state IN group.1 %]
- <option [% 'selected ' IF state == problem.state %] value="[% state %]">[% state_pretty.$state %]</option>
- [% END %]
- </optgroup>
+ <label for="defect_type">[% loc('Defect type') %]</label>
+ <select id="defect_type" name="defect_type" class="form-control">
+ <option value=""[% ' selected' IF NOT problem.defect_type %]>-</option>
+ [% FOREACH defect_type IN problem.defect_types %]
+ <option[% ' selected' IF problem.defect_type_id == defect_type.id %] value="[% defect_type.id %]">[% defect_type_format() %]</option>
[% END %]
</select>
</p>
+
+ <p>
+ <label for="state">[% loc('State') %]</label>
+ [% INCLUDE 'report/inspect/state_groups_select.html' %]
+ </p>
<div id="js-duplicate-reports" class="[% "hidden" UNLESS problem.duplicate_of %]">
<input type="hidden" name="duplicate_of" value="[% problem.duplicate_of.id %]">
<p class="[% "hidden" UNLESS problem.duplicate_of %]"><strong>[% loc('Duplicate of') %]</strong></p>
@@ -118,8 +111,9 @@
[% traffic_info = problem.get_extra_metadata('traffic_information') %]
<select id="traffic_information" name="traffic_information" class="form-control">
<option value=""[% ' selected' IF NOT traffic_info %]>-</option>
- <option[% ' selected' IF traffic_info == "Yes" %]>Yes</option>
- <option[% ' selected' IF traffic_info == "No" %]>No</option>
+ [% FOREACH option IN problem.traffic_management_options %]
+ <option value='[% option %]'[% ' selected' IF traffic_info == option %]>[% option %]</option>
+ [% END %]
</select>
</p>
<p>
@@ -136,7 +130,7 @@
[% IF permissions.report_inspect %]
<p>
<label class="label-containing-checkbox">
- <input type="checkbox" name="save_inspected" value="1" class="js-toggle-public-update" [% 'checked' IF save_inspected %]>
+ <input type="checkbox" name="include_update" value="1" class="js-toggle-public-update" checked>
[% loc('Save with a public update') %]
</label>
</p>
@@ -157,7 +151,6 @@
<p>
<input type="hidden" name="token" value="[% csrf_token %]">
- <a class="btn" href="[% c.uri_for( '/report', problem.id ) %]">[% loc('Cancel') %]</a>
<input class="btn btn-primary" type="submit" value="[% loc('Save changes') %]" data-value-original="[% loc('Save changes') %]" data-value-duplicate="[% loc('Save + close as duplicate') %]" name="save" />
</p>
</div>