aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/default/admin/body.html
blob: 120a07da94386b71881bfaa2af3ede3310dcdf3f (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
114
115
[% INCLUDE 'admin/header.html' title=tprintf(loc('Council contacts for %s'), body.name) -%]

[% IF updated %]
<p>
<em>[% updated %]</em>
</p>
[% END %]

<p>
[% IF example_pc %]
<a href="[% c.uri_for_email( '/around', { pc => example_pc } ) %]">[% tprintf( loc('Example postcode %s'), example_pc ) | html %]</a> |
[% END %]
[% IF c.cobrand.moniker == 'emptyhomes' %]
<a href="[% c.uri_for( 'reports', search => 'body:' _ body_id ) %]">[% loc('List all reported problems' ) %]</a>
[% ELSE %]
<a href="[% c.uri_for_email( '/reports/' _ body_id ) %]">[% loc('List all reported problems' ) %]</a>
[% END %]
<a href="[% c.uri_for( 'body', body_id, { text => 1 } ) %]">[% loc('Text only version') %]</a>
</p>

[% IF body.send_method == 'Open311' %]
    <h2>
    Council contacts configured via Open311
    </h2>
[% END %]

[% IF c.cobrand.moniker == 'fixmystreet' %]
<p class="error">Do not give these out except to people at the council.</p>
[% END %]

<form method="post" action="[% c.uri_for('body', body_id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8">

    <table cellspacing="0" cellpadding="2" border="1">
        <tr>
            <th>[% loc('Category') %]</th>
            <th>[% loc('Email') %]</th>
            <th>[% loc('Confirmed') %]</th>
            <th>[% loc('Deleted') %]</th>
            <th>[% loc('Devolved') %]</th>
            <th>[% loc('Last editor') %]</th>
            <th>[% loc('Note') %]</th>
            <th>[% loc('Public') %]</th>
            <th>[% loc('When edited') %]</th>
            <th>[% loc('Confirm') %]</th>
        </tr>
        [% WHILE ( contact = contacts.next ) %]
            <tr>
                <td><a href="[% c.uri_for( 'body_edit', body_id, contact.category ) %]">[% contact.category %]</a></td>
                <td>[% contact.email | html %]</td>
                <td>[% IF contact.confirmed %][% loc('Yes') %][% ELSE %][% loc('No') %][% END %]</td>
                <td>[% IF contact.deleted %][% loc('Yes') %][% ELSE %][% loc('No') %][% END %]</td>
                <td>[% IF body.can_be_devolved && contact.send_method %][% loc('Yes') %][% ELSE %][% loc('No') %][% END %]</td>
                <td>[% contact.editor %]</td>
                <td>[% contact.note | html %]</td>
                <td>[% contact.non_public ? loc('Non Public') : loc('Public') %]</td>
                <td>[% contact.whenedited.ymd _ ' ' _ contact.whenedited.hms %]</td>
                <td><input type="checkbox" name="confirmed" value="[% contact.category %]"></td>
            </tr>
        [% END %]
    </table>

    <p>
    <input type="hidden" name="posted" value="update">
    <input type="hidden" name="token" value="[% token %]">
    <input type="submit" name="Update statuses" value="[% loc('Update statuses') %]">
    </p>
    </form>

    <h2>[% loc('Add new category') %]</h2>

    <form method="post" action="[% c.uri_for('body', body_id ) %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8">

        [% IF c.cobrand.moniker != 'emptyhomes' %]
        <p>
        <strong>[% loc('Category:') %] </strong><input type="text" name="category" size="30">
        </p>
        [% END %]

        <p>
        <strong>[% loc('Email:') %] </strong><input type="text" name="email" size="30">
        </p>

        <p>
        <input type="checkbox" name="confirmed" value="1" id="confirmed"> 
        <label for="confirmed" class="inline">[% loc('Confirmed') %]</label>

        <input type="checkbox" name="deleted" value="1" id="deleted"> 
        <label for="deleted" class="inline">[% loc('Deleted') %]</label>
        </p>

        <p>
        <strong>[% loc('Note:') %] </strong> <textarea name="note" rows="3" cols="40"></textarea>
        </p>

        <p>
        <input type="checkbox" name="non_public" value="1" id="non_public"> 
        <label for="non_public" class="inline">[% loc('Private') %]</label>
        </p>

        <p>
        <input type="hidden" name="posted" value="new" >
        <input type="hidden" name="token" value="[% token %]" >
        <input type="submit" name="Create category" value="[% loc('Create category') %]" >
        </p>

        <div>
            <input type="hidden" name=".cgifields" value="confirmed" >
            <input type="hidden" name=".cgifields" value="deleted" >
        </div>
    </form>

    <h2>[% loc('Edit body details') %]</h2>
    [% INCLUDE 'admin/body-form.html' %]

[% INCLUDE 'admin/footer.html' %]