split links into admin template
authorDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 16 Apr 2010 19:09:18 +0000 (21:09 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Fri, 16 Apr 2010 19:09:18 +0000 (21:09 +0200)
public/mojo_facets.css
templates/admin.html.ep [new file with mode: 0644]
templates/layouts/default.html.ep
templates/layouts/ui.html.ep

index 36ab475..d22a046 100644 (file)
@@ -9,6 +9,11 @@
 }
 
 
+.admin {
+       background: #ffc;
+       padding: 0.25em;
+}
+
 .debug {
        color: #aaa;
 }
diff --git a/templates/admin.html.ep b/templates/admin.html.ep
new file mode 100644 (file)
index 0000000..b5ddc48
--- /dev/null
@@ -0,0 +1,12 @@
+<div class=admin>
+
+<a href="<%= url_for( action => 'index' ) %>">load</a>
+<a href="<%= url_for( 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>
+% }
+
+</div>
+
index 000dc94..7251730 100644 (file)
@@ -6,9 +6,7 @@
 </head>
 <body>
 
-<a href="<%= url_for( action => 'index' ) %>">load</a>
-<a href="<%= url_for( action => 'columns' ) %>">columns</a>
-<a href="<%= url_for( action => 'items' ) %>">items</a>
+<%= include 'admin' %>
 
 <%== content %>
 
index 30ae271..b522a0f 100644 (file)
@@ -16,9 +16,7 @@
 </head>
 <body>
 
-<a href="<%= url_for( action => 'index' ) %>">load</a>
-<a href="<%= url_for( action => 'columns' ) %>">columns</a>
-<a href="<%= url_for( action => 'items' ) %>">items</a>
+<%= include 'admin' %>
 
 <%== content %>