3 % my $dump = param('dump');
6 <input name=apply type=submit value="Apply"> on
8 % foreach my $p ( @$loaded ) {
9 <option<%= $p eq $on_path ? ' selected' : '' %>><%= $p %></option>
13 <span class=count><%= $#{ $changes } + 1 %></span>
15 <label><input type=checkbox name=dump <%= $dump ? 'checked' : '' %>>dump</label>
19 % foreach my $status ( keys %$stats ) {
21 <input name=show type=checkbox value="<%= $status %>" checked>
23 <span class=count><%= $stats->{$status} %></span>
28 % if ( ! param('commit') && param('apply') ) {
29 <input type=submit name=commit value="Commit changes">
30 % } elsif ( param('commit') ) {
32 Changes commited to <a href="<%= url_for( controller => 'data', action => 'items' )->query( path => $on_path ) %>"><%= $on_path %></a>
34 <pre><%= dumper stash('commit_changed') %></pre>
41 % my $tr = { new => [ qw( old new ) ], code => [ qw( code columns_changed ) ] };
45 % foreach my $e ( @$changes ) {
47 % foreach my $type ( keys %$tr ) {
48 % if ( exists $e->{$type} ) {
51 <th><%= $tr->{$type}->[0] %></th>
52 <th><%= $tr->{$type}->[1] %></th>
54 % delete $tr->{$type}; last;
58 <tr class="change <%= $e->{_status} || 'unknown' %>">
61 <tt><%= $e->{column} %></tt>
62 % if ( my $status = $e->{_status} ) {
63 % my ( $pk, $id ) = %{ $e->{unique} };
64 <a href="<%= url_for( controller => 'data', action => 'filter' )->query( filter_name => $pk, filter_vals => $id ) %>"><%= $id %></a>
67 <a href="<%= url_for( action => 'remove' )->query( time => $e->{time} ) %>">remove</a>
70 % if ( defined $e->{new} ) {
71 </td><td><%== defined $e->{old} && join('<span class=d>¶</span>', @{$e->{old}}) %>
72 </td><td><%== join('<span class=d>¶</span>', @{$e->{new}}) %>
73 % } elsif ( defined $e->{code} ) {
74 </td><td><pre><%= $e->{code} %></pre></td>
75 </td><td><pre class=debug><%= dumper $e->{commit_changed} %></pre>
77 </td><td colspan=2><pre class=debug><%= dumper $e %></pre>
81 </td><td><pre class=debug><%= dumper $e %></pre>
89 <%= dumper( $stats ) %>
92 <script type="text/javascript">
94 $(document).ready( function(){
95 console.debug('ready');
96 $('ul#status > li input[type=checkbox]').click( function(){
97 var toggle = this.value;
98 console.debug('click',this,toggle);
99 $('tr.'+toggle).toggleClass('hidden');