5 % foreach my $n ( @$columns ) {
7 % if ( session('order') ne $n ) {
8 <a href="<%= url_for( action => 'order' )->query( order => $n, sort => 'a' ) %>"><%= $n %></a>
10 <a href="<%= url_for( action => 'order' )->query( order => $n, sort => session('sort') eq 'a' ? 'd' : 'a' ) %>"><%= $n %></a>
11 <%== session('sort') eq 'a' ? '↑' : '↓' %>
13 <div class="col_opts">
14 <a title="filter by this facet" href="<%= url_for( action => 'facet' )->query( name => $n, all => 0 ) %>">
15 % if ( defined $filters->{$n} ) {
16 <%= $#{ $filters->{$n} } + 1 %></a>
17 <a title="show all values" href="<%= url_for( action => 'facet' )->query( name => $n, all => 1 ) %>">all
27 % foreach my $row ( @$sorted ) {
28 <tr title="<%= $row->{_row_id} %>">
29 % foreach my $col ( @$columns ) {
30 <td<%= $numeric->{$col} ? ' class=numeric' : '' %>>
31 % if ( ref $row->{$col} eq 'ARRAY' ) {
32 % my $last = $#{ $row->{$col} };
33 % foreach ( 0 .. $last ) {
34 <%= $row->{$col}->[$_] %>
36 <span class=d>¶</span>
39 % } elsif ( ref $row->{$col} ) {
40 <pre class=debug><%= dumper $row->{$col} %></pre>
55 <input name=test type=submit value="Test code">
56 <input name=commit type=submit value="Commit changes">
59 <script type="text/javascript" src="/edit_table.js"></script>
60 <script type="text/javascript" src="/js/jquery.textarea_grow.js"></script>
61 <script type="text/javascript">
63 $(document).ready( function(){
64 $('form#eval textarea').textarea_grow();