my $commit = $self->param('commit');
my $test = $self->param('test');
+ my $cols_added;
+
if ( $code && ( $test || $commit ) ) {
# XXX find columns used in code snippet and show them to user
foreach my $column ( $code =~ m/\$row->{(.+?)}/g ) {
}
next if grep { /$column/ } @columns;
unshift @columns, $column;
+ $cols_added->{$column}++;
if ( $commit ) {
$self->session('columns', [ @columns ]);
$loaded->{$path}->{columns} = [ @columns ];
numeric => { map { $_, $self->_is_numeric($_) } @columns },
filters => $self->_current_filters,
code => $code,
+ cols_added => $cols_added,
);
}
+<pre class=debug><%= dumper $cols_added %></pre>
<table border=1>
% foreach my $row ( @$sorted ) {
<tr title="<%= $row->{_row_id} %>">
% foreach my $col ( @$columns ) {
-<td<%= $numeric->{$col} ? ' class=numeric' : '' %>>
+<td<%= $numeric->{$col} ? ' class=numeric' : $cols_added->{$col} ? ' class=changed' : '' %>>
% if ( ref $row->{$col} eq 'ARRAY' ) {
% my $last = $#{ $row->{$col} };
% foreach ( 0 .. $last ) {