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

[% IF moderating %]
[%# TODO: extract stylesheet! %]
<style>
    .moderate-edit label {
        display: inline-block;
        height: 1em;
        margin-top: 0;
    }

    .moderate-edit input {
        display: inline-block;
    }

    .moderate-edit { display: none }
    .moderate-edit :disabled {
        background: #ddd;
    }
    br {
        line-height: 0.5em;
    }
</style>
[% END %]

<div class="problem-header cf" problem-id="[% problem.id %]">
  [% IF moderating %]
    [% original = problem.moderation_original_data %]
    <form method="post" action="/moderate/report/[% problem.id %]">
        <input type="button" class="btn moderate moderate-display" value="moderate">
        <div class="moderate-edit">
            <input type="checkbox" class="hide-document" name="problem_hide">
            <label for="problem_hide">Hide report completely?</label>
            <br />
            <input type="checkbox" name="problem_show_name" [% problem.anonymous ? '' : 'checked' %]>
            <label for="problem_show_name">Show name publicly?</label>
            [% IF problem.photo or original.photo %]
                <br />
                <input type="checkbox" name="problem_show_photo" [% problem.photo ? 'checked' : '' %]>
                <label for="problem_show_photo">Show Photo?</label>
            [% END %]
        </div>
  [% END %]
    <h1 class="moderate-display">[% problem.title | html %]</h1>
    [% IF moderating %]
    <div class="moderate-edit">
        [% IF problem.title != original.title %]
        <input type="checkbox" name="problem_revert_title" class="revert-title">
        <label for="problem_revert_title">Revert to original title</label>
        [% END %]
    <h1><input type="text" name="problem_title" value="[% problem.title | html %]"></h1>
    </div>
    [% END %]

    <p><em>
    [% problem.meta_line(c) | html %]
    [%- IF !problem.used_map AND c.cobrand.moniker != 'emptyhomes' %]; <strong>[% loc('there is no pin shown as the user did not use the map') %]</strong>[% END %]
    [% IF problem.bodies_str %]
        [% INCLUDE 'report/_council_sent_info.html' %]
    [% ELSE %]
        <br><small>[% loc('Not reported to council') %]</small>
    [% END %]
    [% mlog = problem.latest_moderation_log_entry(); IF mlog %]
        <br /> Moderated by [% mlog.user.from_body.name %] at [% prettify_dt(mlog.whenedited) %]
    [% END %]
    </em></p>
    [% INCLUDE 'report/_support.html' %]

    [% IF c.cobrand.moniker != 'southampton' %]
        [% INCLUDE 'report/photo.html' object=problem %]
    [% END %]

        <div class="moderate-display">
            [% add_links( problem.detail ) | html_para %]
        </div>
        [% IF moderating %]
            <div class="moderate-edit">
            [% IF problem.detail != original.detail %]
            <input type="checkbox" name="problem_revert_detail" class="revert-textarea">
            <label for="problem_revert_detail">Revert to original text</label>
            [% END %]
            <textarea name="problem_detail">[% add_links( problem.detail ) %]</textarea>
            </div>
        [% END %]

    [% IF c.cobrand.moniker == 'southampton' %]
        [% INCLUDE 'report/photo.html' object=problem %]
    [% END %]

  [% IF moderating %]
        <div class="moderate-edit">
            <label for="moderation_reason">Moderation reason:</label>
            <input type="text" name="moderation_reason" placeholder="Describe why you are moderating this">
            <input type="submit" class="red-btn" value="Moderate it">
            <input type="button" class="btn cancel" value="cancel">
        </div>
    </form>
  [% END %]
</div>