3 % if ( my $datasets = stash('datasets' ) ) {
4 <form action=/data/load id="switch_dataset" style="display: inline">
6 % foreach my $path ( @$datasets ) {
7 <option <%= session('path') eq $path ? 'selected="selected"' : '' %> ><%= $path %></option>
10 % foreach my $path ( @$datasets ) {
11 <input name=paths type=hidden value="<%= $path %>">
15 $(document).ready( function() {
16 $('#switch_dataset').change( function() {
17 console.debug( 'switch_dataset', this );
20 console.debug('installed switch_dataset' );
24 <tt><%= session('path') %></tt>
27 <a href="<%= url_for( controller => 'data', action => 'index', id => 0 ) %>">load</a>
28 <a href="<%= url_for( controller => 'data', action => 'columns', id => 0 ) %>">columns</a>
31 % foreach my $show ( glob 'templates/data/items/*.html.ep' ) {
32 % $show =~ s{^.+/([^/]+)\.html\.ep$}{$1};
33 % my $class = session('show') eq $show ? 'class=active' : '';
34 <a href="<%= url_for( controller => 'data', action => 'items', id => $show ) %>" <%= $class %>><%= $show %></a>
37 % if ( $self->can('_export_path') && glob $self->_export_path('*') ) {
39 <a href="<%= url_for( controller => 'data', action => 'export', id => 0 ) %>">export</a>
43 <a id=code href="<%= url_for( controller => 'code', action => 'index', id => 0 ) %>">code</a>
44 <a id=console href="#" style="display:none">console</a>
46 % if ( my $id = stash('nytprof.id') ) {
48 <a href="<%= url_for( controller => 'profile', action => 'index', id => 0 ) %>">profile</a>
56 <a href="<%= url_for( controller => 'config', action => 'index', id => 0 ) %>">config</a>
59 <a href="<%= url_for( controller => 'changes', action => 'index', id => 0 ) %>">changes</a>
60 <a href="<%= url_for( controller => 'actions', action => 'index', id => 0 ) %>">actions</a>
62 % if ( session('modified') ) {
63 % my $path = session('path');
65 <a class=save_actions title="<%= $path %>" href="<%= url_for( controller => 'data', action => 'save', id => $path ) %>">save</a>