added link to edits dump
[MojoFacets.git] / templates / admin.html.ep
index b5ddc48..322b2c3 100644 (file)
@@ -1,12 +1,23 @@
 <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};
-<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>
 % }
 
+<span class=changes>
+
+% if ( my $path = session('save_path') ) {
+<a class=save_changes title="<%= $path %>" href="<%= url_for( controller => 'data', action => 'save', path => $path ) %>">save</a>
+% }
+
+<a href="<%= url_for( controller => 'changes', action => 'edits' ) %>">edits</a>
+<a href="<%= url_for( controller => 'changes', action => 'index' ) %>">changes</a>
+</span>
+
 </div>