small circular points
[MojoFacets.git] / templates / admin.html.ep
1 <div class=admin>
2
3 % if ( my $datasets = stash('datasets' ) ) {
4 <form action=/data/load id="switch_dataset" style="display: inline">
5 <select name="path">
6 % foreach my $path ( @$datasets ) {
7 <option <%= session('path') eq $path ? 'selected="selected"' : '' %> ><%= $path %></option>
8 % }
9 </select>
10 % foreach my $path ( @$datasets ) {
11 <input name=paths type=hidden value="<%= $path %>">
12 % }
13 </form>
14 <script>
15 $(document).ready( function() {
16         $('#switch_dataset').change( function() {
17                 console.debug( 'switch_dataset', this );
18                 $(this).submit();
19         });
20         console.debug('installed switch_dataset' );
21 });
22 </script>
23 % } else {
24 <tt><%= session('path') %></tt>
25 % }
26
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>
29 &middot;
30 items:
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>
35 % }
36
37 % if ( $self->can('_export_path') && glob $self->_export_path('*') ) {
38 &middot;
39 <a href="<%= url_for( controller => 'data', action => 'export', id => 0 ) %>">export</a>
40 % }
41
42 &middot;
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>
45
46 % if ( my $id = stash('nytprof.id') ) {
47 &middot;
48 <a href="<%= url_for( controller => 'profile', action => 'index', id => 0 ) %>">profile</a>
49 % }
50
51 <span class=middle>
52 </span>
53
54 <span class=right>
55
56 <a href="<%= url_for( controller => 'config', action => 'index', id => 0 ) %>">config</a>
57 &middot;
58
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>
61
62 % my $visible_class = session('modified') ? '' : 'hide';
63 % my $path = session('path');
64 <span class="save_actions <%= $visible_class %>">
65 &middot;
66 <a title="<%= $path %>" href="<%= url_for( controller => 'data', action => 'save' ) %>" >save</a>
67 </span>
68
69 </span>
70
71 </div>
72