aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/base/report/_main.html
blob: aaa167108892afc44efe77b0102c902e3ffcf51e (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
[% moderating = c.user && c.user.has_permission_to('moderate', problem.bodies_str) %]

<div class="problem-header clearfix" problem-id="[% problem.id %]">

  [% IF moderating %]
    [% original = problem_original %]
    <form method="post" action="/moderate/report/[% problem.id %]">
        <p class="moderate-display">
            <input type="button" class="btn moderate" value="moderate">
        </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" [% problem.anonymous ? 'checked' : '' %]>
            Hide reporter&rsquo;s name
        </label>
    </div>
    <p class="report_meta_info">
        [% problem.meta_line(c) | html %]
        [%- IF !problem.used_map %]; <strong>([% loc('there is no pin shown as the user did not use the map') %])</strong>[% END %]
    </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">
        [% add_links( problem.detail ) | 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>