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

[% IF loop.first %]
<section class="full-width">
    <h4 class="static-with-rule">[% loc('Updates') %]</h4>
    <ul class="item-list item-list--updates">
[% END %]
        <li class="item-list__item item-list__item--updates">
          [% IF moderating; original_update = update.moderation_original_data %]
            <form method="post" action="/moderate/report/[% problem.id %]/update/[% update.id %]">
                <input type="button" class="btn moderate moderate-display" value="moderate">
                <div class="moderate-edit">
                    <input type="checkbox" class="hide-document" name="update_hide">
                    <label for="update_hide">Hide update completely?</label>
                    <br />
                    <input type="checkbox" name="update_show_name" [% update.anonymous ? '' : 'checked' %]>
                    <label for="update_show_name">Show name publicly?</label>
                    [% IF update.photo or original_update.photo %]
                        <br />
                        <input type="checkbox" name="update_show_photo" [% update.photo ? 'checked' : '' %]>
                        <label for="update_show_photo">Show Photo?</label>
                    [% END %]
                </div>
          [% END %]
            <div class="item-list__update-wrap">
            [% IF update.whenanswered %]
                <div class="item-list__update-text">
                    <p class="meta-2"> [% INCLUDE meta_line %] </p>
                </div>
            [% ELSE %]
                <a name="update_[% update.id %]" class="internal-link-fixed-header"></a>
                [% INCLUDE 'report/photo.html' object=update %]
                <div class="item-list__update-text">
                    <div class="moderate-display">
                        [% add_links( update.text ) | html_para %]
                    </div>
                    [% IF moderating %]
                    <div class="moderate-edit">
                        [% IF update.text != original.detail %]
                        <input type="checkbox" name="update_revert_detail" class="revert-textarea">
                        <label for="update_revert_detail">Revert to original</label>
                        [% END %]
                        <textarea name="update_detail">[% add_links( update.text ) %]</textarea>
                    </div>
                    [% END %]

                    <p class="meta-2">
                        [% INCLUDE meta_line %]
                        [% mlog = update.latest_moderation_log_entry(); IF mlog %]
                            <br /> Moderated by [% mlog.user.from_body.name %] at [% prettify_dt(mlog.whenedited) %]
                        [% END %]
                    </p>
                </div>
            [% END %]
            </div>
            [% 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 %]
        </li>
[% IF loop.last %]
    </ul>
</section>
[% END %]