all values must be arrays
[MojoFacets.git] / templates / data / columns.html.ep
1 % layout 'ui';
2
3 <style type="text/css">
4 /*
5 #sortable { list-style-type: none; margin: 0; padding: 0; width: 60%; }
6 #sortable li { margin: 0 3px 3px 3px; padding: 0.4em; padding-left: 1.5em; font-size: 1.4em; height: 18px; }
7 #sortable li span { position: absolute; margin-left: -1.3em; }
8 */
9 </style>
10 <script type="text/javascript">
11
12 $(document).ready(function() {
13         $("#sortable").sortable();
14         $("#sortable").disableSelection();
15 });
16
17 </script>
18
19
20
21
22 <h2>Select and reorder columns</h2>
23
24 <form method=post>
25
26 <input type=submit value="Select">
27
28 <%= include 'all_checkboxes' %>
29
30 <ul id="sortable">
31 % foreach my $n ( @$columns ) {
32 <li>
33 <label>
34 <input type=checkbox name=columns value="<%= $n %>" <%= $checked->{$n} ? 'checked' : '' %>>
35 <%= $n %>
36 <span class="count"><%= $stats->{$n}->{count} %></span>
37 % if ( defined $stats->{$n}->{unique} ) {
38 <span title="unique">&#9997;</a>
39 % }
40 </label>
41 % }
42 </ul>
43
44 <input type=submit value="Select">
45
46 from <input type=text name=path value="<%= session('path') %>" readonly>
47
48 <a href="<%= url_for( action => 'stats' ) %>">rebuild stats</a>
49
50 </form>
51
52 <pre class=debug>
53 $columns = <%= dumper $columns %>
54 $stats = <%= dumper $stats %>
55 </pre>