diff options
author | Marius Halden <marius.h@lden.org> | 2016-12-16 15:02:53 +0100 |
---|---|---|
committer | Marius Halden <marius.h@lden.org> | 2016-12-16 15:02:53 +0100 |
commit | dbf56159e44c1560a413022451bf1a1c4cb22a52 (patch) | |
tree | 275599a1894ca48d8dbf3c2843064c3dbf4affc7 /templates/web/base/report/_inspect.html | |
parent | a1603b96cae9258761f8cc59d76e0512f49afc3d (diff) | |
parent | 38490f6ea18064c232bda6ebfbaee052bd8f0951 (diff) |
Merge tag 'v2.0.1' into fiksgatami-dev-v2
Diffstat (limited to 'templates/web/base/report/_inspect.html')
-rw-r--r-- | templates/web/base/report/_inspect.html | 59 |
1 files changed, 39 insertions, 20 deletions
diff --git a/templates/web/base/report/_inspect.html b/templates/web/base/report/_inspect.html index b85fec0bb..06c3aab6c 100644 --- a/templates/web/base/report/_inspect.html +++ b/templates/web/base/report/_inspect.html @@ -9,7 +9,7 @@ <div class="inspect-section"> <p> <strong>[% loc('Report ID:') %]</strong> - [% problem.id %] + <span class="js-report-id">[% problem.id %]</span> </p> <p> [% SET local_coords = problem.local_coords; %] @@ -20,7 +20,7 @@ <input type="hidden" name="latitude" value="[% problem.latitude %]"> </p> <p> - <a href="https://www.google.com/maps/dir/Current+Location/[% problem.latitude %],[% problem.longitude %]" class="btn btn--block btn--navigate">[% loc('Navigate to this problem') %]</a> + <a target="_blank" href="https://www.google.com/maps/dir/Current+Location/[% problem.latitude %],[% problem.longitude %]" class="btn btn--block btn--navigate">[% loc('Navigate to this problem') %]</a> </p> <p> <a href="#" class="btn btn--block btn--geolocate" id="geolocate_link">[% loc('Set to my current location') %]</a> @@ -52,30 +52,49 @@ [% cat_prefix = category | lower | replace('[^a-z]', '') %] [% cat_prefix = "category_" _ cat_prefix _ "_" %] [% IF category == problem.category %] - <p data-category="[% category | html %]"> + <p data-category="[% category | html %]" data-priorities="[% priorities_by_category.$category %]"> [% INCLUDE 'report/new/category_extras_fields.html' %] </p> - [% ELSIF category_extras.$category.size %] - <p data-category="[% category | html %]" class="hidden"> + [% ELSE %] + <p data-category="[% category | html %]" class="hidden" data-priorities="[% priorities_by_category.$category %]"> [% INCLUDE 'report/new/category_extras_fields.html' report_meta='' %] </p> [% END %] [% END %] [% IF permissions.report_inspect %] - <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> - [% END %] - </select> - </p> + <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> + [% END %] + </select> + </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> + <p class="[% "hidden" IF problem.duplicate_of %]">[% loc('Which report is it a duplicate of?') %]</p> + <ul class="item-list"> + [% IF problem.duplicate_of %] + [% INCLUDE 'report/_item.html' item_extra_class = 'item-list--reports__item--selected' problem = problem.duplicate_of %] + <li class="item-list__item"><a class="btn" href="#" id="js-change-duplicate-report">[% loc('Choose another') %]</a></li> + [% END %] + </ul> + </div> + [% IF problem.duplicates.size %] + <p><strong>[% loc('Duplicates') %]</strong></p> + <ul class="item-list"> + [% FOR duplicate IN problem.duplicates %] + [% INCLUDE 'report/_item.html' problem = duplicate %] + [% END %] + </ul> + [% END %] [% END %] </div> @@ -88,7 +107,7 @@ <select name="priority" id="problem_priority" class="form-control"> <option value="" [% 'selected' UNLESS problem.response_priority_id %]>-</option> [% FOREACH priority IN problem.response_priorities %] - <option value="[% priority.id %]" [% 'selected' IF problem.response_priority_id == priority.id %] [% 'disabled' IF priority.deleted %]>[% priority.name %]</option> + <option value="[% priority.id %]" [% 'selected' IF problem.response_priority_id == priority.id %] [% 'disabled' IF priority.deleted %]>[% priority.name | html %]</option> [% END %] </select> </p> @@ -139,7 +158,7 @@ <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') %]" name="save" /> + <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> |