blob: 9bd85940b7a96e9b178e9ab8e296548fba2f3067 (
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
|
[% INCLUDE 'admin/header.html' title=loc('Bodies') -%]
[% IF body_errors.size %]
<p class="error">[% loc('Please correct the errors below') %]</p>
[% END %]
[% IF bodies.size == 0 %]
<p class="fms-admin-info">
[% loc('Currently no bodies have been created.') %]
<br>
[% loc('You need to add bodies (such as councils or departments) so that you can then add
the categories of problems they can handle (such as potholes or streetlights) and the
contacts (such as an email address) to which reports are sent.') %]
</p>
[% ELSE %]
[% IF c.config.STAGING_SITE and !c.config.STAGING_FLAGS.send_reports %]
<p class="fms-admin-warning">
[% tprintf(loc("As this is a staging site and %s is false, reports made on this site will be sent to the problem reporter, not the contact given for the report’s category."), "<a class='admin-offsite-link' href='http://fixmystreet.org/customising/config/#send_reports_on_staging'><code>STAGING_FLAGS send_reports</code></a>") %]
</p>
[% END %]
<table cellspacing="0" cellpadding="2" border="1">
<tr>
<th>[% loc('Name') %]</th>
[% IF c.cobrand.moniker == 'zurich' %]
<th>[% loc('Email') %]</th>
[% ELSE %]
<th>[% loc('Summary') %]</th>
[% END %]
<th>[% loc('Deleted') %]</th>
</tr>
[%- FOREACH body IN bodies %]
[%- SET id = body.id %]
[% NEXT IF c.cobrand.moniker == 'zurich' AND admin_type == 'dm' AND (body.parent OR body.bodies) %]
<tr[% IF body.deleted %] class="adminhidden"[% END %]
[% IF NOT counts.$id OR counts.$id.deleted == counts.$id.c %] class="is-deleted"[% END %]>
<td>
[% IF c.cobrand.moniker == 'zurich' %]
[% FILTER repeat(4*body.api_key) %] [% END %]
[% IF admin_type == 'super' %]
<a href="[% c.uri_for( 'body', id ) %]">[% body.name | html %]</a>
[% ELSE %]
[% body.name | html %]
[% END %]
[% ELSE %] [%# not Zurich: all bodies should be links %]
<a href="[% c.uri_for( 'body', id ) %]">[% body.name | html%]</a>
[%- IF body.parent %], [% body.parent.name | html %][% END -%]
[% END %]
</td>
[% IF c.cobrand.moniker == 'zurich' %]
<td>[% body.endpoint %]</td>
[% ELSE %]
<td>
[% IF counts.$id %]
[% tprintf( nget('%d address', '%d addresses', counts.$id.c), counts.$id.c) %]
[% IF counts.$id.deleted == counts.$id.c %]
(all deleted; reports will not be sent)
[% ELSIF counts.$id.deleted %]
([% counts.$id.deleted %] deleted)
[% END %]
[% IF counts.$id.confirmed != counts.$id.c %]
([% counts.$id.c-counts.$id.confirmed %] unconfirmed)
[% END %]
[% ELSE %]
No categories, reports will not be sent
[% END %]
</td>
[% END %]
<td>[% IF body.deleted %][% loc('Yes') %][% END %]</td>
</tr>
[%- END %]
</table>
[% END %]
[% IF (c.cobrand.moniker == 'zurich' AND admin_type == 'super') OR c.user.is_superuser %]
<div class="admin-box">
<h2>[% loc('Add body') %]</h2>
[% INCLUDE 'admin/body-form.html', body='' %]
</div>
[% END %]
[% INCLUDE 'admin/edit-league.html' %]
[% INCLUDE 'admin/footer.html' %]
|