we have stub for console.debug only
[MojoFacets.git] / templates / admin.html.ep
index b147dc9..e76d655 100644 (file)
@@ -1,5 +1,29 @@
 <div class=admin>
 
+% if ( my $datasets = stash('datasets' ) ) {
+<form action=/data/load id="switch_dataset" style="display: inline">
+<select name="path">
+% foreach my $path ( @$datasets ) {
+<option <%= session('path') eq $path ? 'selected="selected"' : '' %> ><%= $path %></option>
+% }
+</select>
+% foreach my $path ( @$datasets ) {
+<input name=paths type=hidden value="<%= $path %>">
+% }
+</form>
+<script>
+$(document).ready( function() {
+       $('#switch_dataset').change( function() {
+               console.debug( 'switch_dataset', this );
+               $(this).submit();
+       });
+       console.debug('installed switch_dataset' );
+});
+</script>
+% } else {
+<tt><%= session('path') %></tt>
+% }
+
 <a href="<%= url_for( controller => 'data', action => 'index', id => 0 ) %>">load</a>
 <a href="<%= url_for( controller => 'data', action => 'columns', id => 0 ) %>">columns</a>
 &middot;
@@ -15,6 +39,15 @@ items:
 <a href="<%= url_for( controller => 'data', action => 'export', id => 0 ) %>">export</a>
 % }
 
+&middot;
+<a id=code href="<%= url_for( controller => 'code', action => 'index', id => 0 ) %>">code</a>
+<a id=console href="#" style="display:none">console</a>
+
+% if ( my $id = stash('nytprof.id') ) {
+&middot;
+<a href="<%= url_for( controller => 'profile', action => 'index', id => 0 ) %>">profile</a>
+% }
+
 <span class=middle>
 </span>
 
@@ -23,8 +56,8 @@ items:
 <a href="<%= url_for( controller => 'config', action => 'index', id => 0 ) %>">config</a>
 &middot;
 
-<a href="<%= url_for( controller => 'actions', action => 'changes', id => 0 ) %>">changes</a>
-<a href="<%= url_for( controller => 'actions', action => 'index',   id => 0 ) %>">actions</a>
+<a href="<%= url_for( controller => 'changes', action => 'index', id => 0 ) %>">changes</a>
+<a href="<%= url_for( controller => 'actions', action => 'index', id => 0 ) %>">actions</a>
 
 % if ( session('modified') ) {
 %  my $path = session('path');