-
Notifications
You must be signed in to change notification settings - Fork 189
/
tables.html
69 lines (67 loc) · 1.75 KB
/
tables.html
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
<%namespace name="util" module="bodhi.util"/>
<%namespace name="fragments" file="fragments.html"/>
<%def name="updates(updates, display_user=True, display_request=True)">
<table class="table">
<thead><tr>
<th>Update</th>
<th class="nobreak">Age</th>
%if display_user:
<th class="nobreak">Submitter</th>
%endif
<th class="hidejs">Release</th>
<th class="hidejs">Karma</th>
%if display_request:
<th class="hidejs">Request</th>
%endif
<th class="hidejs">Status</th>
</tr></thead>
<tbody>
% for update in updates:
<tr>
${fragments.update(update, display_user, display_request)}
</tr>
% endfor
</tbody>
</table>
</%def>
<%def name="overrides(overrides, display_user=True)">
<table class="table">
<thead><tr>
<th>Override</th>
<th class="nobreak">Age</th>
%if display_user:
<th class="nobreak">Submitter</th>
%endif
<th class="hidejs">Status</th>
</tr></thead>
<tbody>
% for override in overrides:
<tr>
${fragments.override(override, display_user)}
</tr>
% endfor
</tbody>
</table>
</%def>
<%def name="stacks(stacks)">
<table class="table">
<thead><tr>
<th>Stack</th>
<th>Number of packages</th>
</tr></thead>
<tbody>
% for stack in sorted(stacks, cmp=lambda x, y: cmp(len(x.packages), len(y.packages)), reverse=True):
<tr>
<td>
<a href="${request.route_url('stack', name=stack['name'])}">
${stack['name']}
</a>
</td>
<td>
<span title="${len(stack['packages'])} packages in this stack">${len(stack['packages'])}</span>
</td>
</tr>
% endfor
</tbody>
</table>
</%def>