1 <pre class=debug><%= dumper $cols_added %></pre>
6 % foreach my $n ( @$columns ) {
8 % if ( session('order') ne $n ) {
9 <a href="<%= url_for( action => 'order' )->query( order => $n, sort => 'a' ) %>"><%= $n %></a>
11 <a href="<%= url_for( action => 'order' )->query( order => $n, sort => session('sort') eq 'a' ? 'd' : 'a' ) %>"><%= $n %></a>
12 <%== session('sort') eq 'a' ? '↑' : '↓' %>
14 <div class="col_opts">
15 <a title="filter by this facet" href="<%= url_for( action => 'facet' )->query( name => $n, all => 0 ) %>">
16 % if ( defined $filters->{$n} ) {
17 <%= $#{ $filters->{$n} } + 1 %></a>
18 <a title="show all values" href="<%= url_for( action => 'facet' )->query( name => $n, all => 1 ) %>">all
28 % foreach my $row ( @$sorted ) {
29 <tr title="<%= $row->{_row_id} %>">
30 % foreach my $col ( @$columns ) {
31 <td<%= $numeric->{$col} ? ' class=numeric' : $cols_added->{$col} ? ' class=changed' : '' %>>
32 % if ( ref $row->{$col} eq 'ARRAY' ) {
33 % my $last = $#{ $row->{$col} };
34 % foreach ( 0 .. $last ) {
35 <%= $row->{$col}->[$_] %>
37 <span class=d>¶</span>
40 % } elsif ( ref $row->{$col} ) {
41 <pre class=debug><%= dumper $row->{$col} %></pre>
54 <form id=eval method=post>
55 % my $error = stash('eval_error');
57 <div class=error><%= $error %></div>
59 % my $rows = scalar split(/\n/,$code);
60 <textarea name=code rows=<%= $rows %>><%= $code %></textarea>
61 <input name=test type=submit value="Test code">
63 % if ( param('test') ) {
64 <a href="">reload original</a>
66 <input name=commit type=submit value="Commit changes" style="color:red">
70 <input id=close name=close type=button value="Close" style="float: right">
73 <script type="text/javascript" src="/js/jquery.textarea_grow.js"></script>
74 <script type="text/javascript">
76 $(document).ready( function(){
77 $('form#eval textarea').textarea_grow();
78 $('input#close').bind('click', function(a,b){
79 console.debug( this,a,b );
80 $.post( document.location, { code: '' } );
81 $(this).parent().hide();
89 <script type="text/javascript" src="/edit_table.js"></script>