filter changes can be applied back to dataset
[MojoFacets.git] / templates / admin.html.ep
index a8f9526..2ae6554 100644 (file)
@@ -1,16 +1,15 @@
 <div class=admin>
 
-<a href="<%= url_for( action => 'index' ) %>">load</a>
-<a href="<%= url_for( action => 'columns' ) %>">columns</a>
+<a href="<%= url_for( controller => 'data', action => 'index' ) %>">load</a>
+<a href="<%= url_for( controller => 'data', action => 'columns' ) %>">columns</a>
 items:
 % foreach my $show ( glob 'templates/data/items/*.html.ep' ) {
 %  $show =~ s{^.+/([^/]+)\.html\.ep$}{$1};
-%  if ( session('show') eq $show ) {
-<%= $show %>
-%  } else {
-<a href="<%= url_for( action => 'items' )->query( show => $show ) %>"><%= $show %></a>
-%  }
+%  my $class = session('show') eq $show ? 'class=active' : '';
+<a href="<%= url_for( controller => 'data', action => 'items' )->query( show => $show ) %>" <%= $class %>><%= $show %></a>
 % }
 
+<a class=changes href="<%= url_for( controller => 'changes', action => 'index' ) %>">changes</a>
+
 </div>