sort columns by usage
[MojoFacets.git] / templates / data / columns.html.ep
1 % layout 'default';
2 <h2><%= $message %></h2>
3
4 <style type="text/css">
5 .count {
6         color: #aaa;
7 }
8 .count:before {
9         content: "(";
10 }
11 .count:after {
12         content: ")";
13 }
14 </style>
15
16 <form method=post action=/data/table >
17
18 <ul>
19 % foreach my $n ( sort { $stats->{$b}->{count} <=> $stats->{$a}->{count} } keys %$stats ) {
20 <li>
21 <label>
22 <input type=checkbox name=columns value="<%= $n %>" <%= param($n) ? 'checked' : '' %>>
23 <%= $n %>
24 <span class="count"><%= $stats->{$n}->{count} %></span>
25 </label>
26 % }
27 </ul>
28
29 <input type=submit>
30
31 </form>