summaryrefslogtreecommitdiff
path: root/templates/toplist.html.ep
blob: f639e36f21330137cea7c4f6f6c2b77198ad4f82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
%= include 'topform';

% if (@{$toplist} == 0) {
<div class="error">
Keine Daten mit diesen Parametern gefunden.
</div>
% }
% else {
<div class="toplist">
<table>
<tr><th>Meldung</th><th>Anteil</th><th>Anzahl</th></tr>
% my $max = stash('toplist')->[0][2];
% for my $entry (@{ stash('toplist') // [] }) {
% my ($desc, $percent, $raw) = @{$entry};
<tr>
<td style="position: relative;"><div style="z-index: -1; position: absolute; width:<%= int($raw * 100 / $max) %>%; background-color: #e2e2e2;">&nbsp;</div><%= $desc %></td>
<td><%= $percent %></td>
<td><%= $raw %></td></tr>
% }
</table>
</div>
% }