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
|
[% INCLUDE 'admin/header.html' title=loc('Reports') %]
[% PROCESS 'admin/report_blocks.html' %]
[% BLOCK options %]
[% FOR option IN option_list %]
<option value="[% option %]"[% ' selected' IF selected == option %]>[% option %]</opytion>
[% END %]
[% END %]
<form method="post" action="[% c.uri_for('stats') %]" enctype="application/x-www-form-urlencoded" accept-charset="utf-8" id="filter-form">
<label for="form_category">Transport Type: </label>
<select class="form-control" name="category" id="form_category">
<option value="">Select</option>
[% PROCESS options, option_list = [ 'Bus', 'Metro', 'Train' ], selected = category %]
</select>
<label for="form_subcategory">Incident Type: </label>
<select class="form-control" name="subcategory" id="form_subcategory">
<option value="">Select</option>
[% PROCESS options, option_list = ['Smoking', 'Drugs', 'Anti-social Behaviour', 'Loud Music', 'Damage', 'Feet on Seats', 'Other'], selected = subcategory %]
</select>
<label for="form_service">Device: </label>
<select class="form-control" name="service" id="form_service">
<option value="">Select</option>
[% PROCESS options, option_list = [ 'Android', 'iPhone' ], selected = service %]
</select>
<input type="submit" class="btn" name="getcounts" size="30" id="getcounts" value="Look Up" />
</form>
[% IF pager.total_entries == 0 %]
<p align="center">
No Results found
</p>
[% ELSE %]
<table class="admin-report">
<thead>
<tr>
<th>Device</th>
<th>Transport Category</th>
<th>Incident Category</th>
<th>Area</th>
<th>Submitted</th>
</tr>
</thead>
<tbody>
[%- WHILE (report = reports.next) %]
<tr>
<td>[% report.service || 'Other' %]</td>
<td>[% report.category %]</td>
<td class="nowrap">[% report.subcategory %]</td>
<td class="nowrap">[% council_details.${report.bodies_str} %]</td>
<td class="nowrap">[% PROCESS format_time time=report.confirmed %]</td>
</tr>
[%- END %]
</tbody>
</table>
[% END %]
[% INCLUDE 'pagination.html', param = 'p' %]
[% INCLUDE 'admin/footer.html' %]
|