blob: 585200ac341c647b333381acbd361c3895adef3f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
[% moderating = c.user && c.user.has_permission_to('moderate', problem.bodies_str) %]
<a href="[% c.uri_for( '/around', { lat => latitude, lon => longitude } ) %]"
class="problem-back js-back-to-report-list">[% loc('Back to all reports') %]</a>
<div class="problem-header clearfix" problem-id="[% problem.id %]">
[% IF c.user.has_permission_to('planned_reports', problem.bodies_str) %]
<form method="post" action="/my/planned/change" id="planned_form">
<input type="hidden" name="id" value="[% problem.id %]">
<input type="hidden" name="token" value="[% csrf_token %]">
<input type="hidden" name="change" value="[% IF c.user.is_planned_report(problem) %]remove[% ELSE %]add[% END %]">
<p><input type="submit"
data-remove="[% loc('Remove from planned reports') %]" data-add="[% loc('Add to planned reports') %]"
value="
[%~ IF c.user.is_planned_report(problem) ~%]
[% loc('Remove from planned reports') %]
[%~ ELSE ~%]
[% loc('Add to planned reports') %]
[%~ END ~%]
"></p>
</form>
[% END %]
[% IF moderating %]
[% original = problem_original %]
<form method="post" action="/moderate/report/[% problem.id %]">
<input type="hidden" name="token" value="[% csrf_token %]">
<p class="moderate-display">
<input type="button" class="btn moderate" value="Moderate this report">
</p>
[% END %]
<h1 class="moderate-display">[% problem.title | html %]</h1>
[% IF moderating %]
<div class="moderate-edit">
[% IF problem.title != original.title %]
<label>
<input type="checkbox" name="problem_revert_title" class="revert-title">
Revert to original title
</label>
[% END %]
<h1><input type="text" name="problem_title" value="[% problem.title | html %]" data-original-value="[% original.title | html %]"></h1>
</div>
[% END %]
<div class="moderate-edit">
<label>
<input type="checkbox" name="problem_show_name" [% 'checked' UNLESS problem.anonymous %]>
Show reporter’s name
</label>
</div>
<p class="report_meta_info">
[% INCLUDE 'report/_report_meta_info.html' %]
</p>
[% INCLUDE 'report/_main_sent_info.html' %]
[% mlog = problem.latest_moderation_log_entry(); IF mlog %]
<p>Moderated by [% mlog.user.from_body.name %] at [% prettify_dt(mlog.whenedited) %]</p>
[% END %]
[% INCLUDE 'report/_support.html' %]
[% IF moderating %]
[% IF problem.photo or original.photo %]
<p class="moderate-edit">
<label>
<input type="checkbox" name="problem_show_photo" [% problem.photo ? 'checked' : '' %]>
Show photo
</label>
</p>
[% END %]
[% END %]
[% INCLUDE 'report/photo.html' object=problem %]
<div class="moderate-display">
[% problem.detail | add_links | html_para %]
</div>
[% IF moderating %]
<p class="moderate-edit">
[% IF problem.detail != original.detail %]
<label>
<input type="checkbox" name="problem_revert_detail" class="revert-textarea">
Revert to original text
</label>
[% END %]
<textarea name="problem_detail" data-original-value="[% original.detail | html %]">[% problem.detail | html %]</textarea>
</p>
<div class="moderate-edit">
<p>
<label>
<input type="checkbox" class="hide-document" name="problem_hide" [% problem.hidden ? 'checked' : '' %]>
Hide entire report
</label>
</p>
<p>
<label for="moderation_reason">Moderation reason:</label>
<input type="text" name="moderation_reason" placeholder="Describe why you are moderating this">
</p>
<p>
<input type="submit" class="green-btn" value="Save changes">
<input type="button" class="btn cancel" value="Discard changes">
</p>
</div>
</form>
[% END %]
[% TRY %][% PROCESS 'report/_main_after.html' %][% CATCH file %][% END %]
</div>
|