edit will just mark stats invalid by modified == 2
[MojoFacets.git] / templates / admin.html.ep
index 0f2affc..b0aea4c 100644 (file)
@@ -1,12 +1,26 @@
 <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};
 %  my $class = session('show') eq $show ? 'class=active' : '';
-<a href="<%= url_for( action => 'items' )->query( show => $show ) %>" <%= $class %>><%= $show %></a>
+<a href="<%= url_for( controller => 'data', action => 'items' )->query( show => $show ) %>" <%= $class %>><%= $show %></a>
 % }
+
+<span class=actions>
+
+% if ( session('modified') ) {
+%  my $path = session('path');
+<a class=save_actions title="<%= $path %>" href="<%= url_for( controller => 'data', action => 'save', path => $path ) %>">save</a>
+% }
+% if ( $self->can('_export_path') && glob $self->_export_path('*') ) {
+<a href="<%= url_for( controller => 'data', action => 'export' ) %>">export</a>
+% }
+<a href="<%= url_for( controller => 'actions', action => 'changes' ) %>">changes</a>
+<a href="<%= url_for( controller => 'actions', action => 'index' ) %>">actions</a>
+</span>
+
 </div>