From: Dobrica Pavlinusic Date: Sat, 22 May 2010 13:39:53 +0000 (+0200) Subject: filter changes can be applied back to dataset X-Git-Url: http://git.rot13.org/?a=commitdiff_plain;h=e34abe1f0aa6be90301897fe0a27bfe000c51011;p=MojoFacets.git filter changes can be applied back to dataset This is significant improvement, because it turns changes (dump everything as Storable on disk) to time-travel feature. Most improtantly, you can keep your changes between server restarts. --- diff --git a/lib/MojoFacets/Changes.pm b/lib/MojoFacets/Changes.pm index ad8ce60..0588c19 100644 --- a/lib/MojoFacets/Changes.pm +++ b/lib/MojoFacets/Changes.pm @@ -27,7 +27,7 @@ sub index { sub view { my $self = shift; my $uid = $self->param('uid'); - $self->render( change => retrieve( "/tmp/changes/$uid" ) ); + $self->render( change => retrieve( "/tmp/changes/$uid" ), uid => $uid ); } 1; diff --git a/templates/changes/view.html.ep b/templates/changes/view.html.ep index 8076e6d..f86274a 100644 --- a/templates/changes/view.html.ep +++ b/templates/changes/view.html.ep @@ -1,2 +1,22 @@ -%# layout 'default'; +% layout 'default'; + +% my $action = $uid; +% $action =~ s/^.+\.([^\.]+)$/$1/; +% $action = url_for( controller => 'data', action => $action ); +
> + +% my $params = $change->{params}; + +
+
<%= dumper $change %>