4 % my $dump = param('dump');
5 % my $apply_on_path = param('apply_on_path');
8 <input type=submit value="Apply"> on
9 <select name=apply_on_path>
10 % foreach my $p ( @$loaded ) {
11 <option<%= $p eq $apply_on_path ? ' selected' : '' %>><%= $p %></option>
15 <span class=count><%= $#{ $changes } + 1 %></span>
17 <label><input type=checkbox name=dump <%= $dump ? 'checked' : '' %>>dump</label>
19 % if ( $apply_on_path ) {
21 % foreach my $status ( keys %$stats ) {
23 <input name=show type=checkbox value="<%= $status %>" checked>
25 <span class=count><%= $stats->{$status} %></span>
30 % if ( ! param('commit') ) {
31 <input type=submit name=commit value="Commit changes">
34 Changes commited to <a href="<%= url_for( controller => 'data', action => 'load' )->query( path => $apply_on_path ) %>"><%= $apply_on_path %></a>
43 <tr><th></th><th>old</th><th>new</th></tr>
45 % foreach my $e ( @$changes ) {
46 <tr class="change <%= $e->{_status} || 'unknown' %>">
49 <tt><%= $e->{column} %></tt>
50 % if ( my $status = $e->{_status} ) {
51 % my ( $pk, $id ) = %{ $e->{unique} };
52 <a href="<%= url_for( controller => 'data', action => 'filter' )->query( filter_name => $pk, filter_vals => $id ) %>"><%= $id %></a>
55 <a href="<%= url_for( action => 'remove' )->query( time => $e->{time} ) %>">remove</a>
58 </td><td><%== defined $e->{old} && join('<span class=d>¶</span>', @{$e->{old}}) %>
59 </td><td><%== defined $e->{new} && join('<span class=d>¶</span>', @{$e->{new}}) %>
62 </td><td><pre class=debug><%= dumper $e %></pre>
70 <%= dumper( $stats ) %>
73 <script type="text/javascript">
75 $(document).ready( function(){
76 console.debug('ready');
77 $('ul#status > li input[type=checkbox]').click( function(){
78 var toggle = this.value;
79 console.debug('click',this,toggle);
80 $('tr.'+toggle).toggleClass('hidden');