make current item bold
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 15 May 2010 15:05:59 +0000 (17:05 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sat, 15 May 2010 15:05:59 +0000 (17:05 +0200)
public/mojo_facets.css
templates/admin.html.ep

index 8b72f35..88e82d3 100644 (file)
        padding: 0.25em;
 }
 
+.admin .active {
+       font-weight: bold;
+}
+
 .debug {
        color: #aaa;
 }
index a8f9526..0f2affc 100644 (file)
@@ -5,12 +5,8 @@
 items:
 % foreach my $show ( glob 'templates/data/items/*.html.ep' ) {
 %  $show =~ s{^.+/([^/]+)\.html\.ep$}{$1};
-%  if ( session('show') eq $show ) {
-<%= $show %>
-%  } else {
-<a href="<%= url_for( action => 'items' )->query( show => $show ) %>"><%= $show %></a>
-%  }
+%  my $class = session('show') eq $show ? 'class=active' : '';
+<a href="<%= url_for( action => 'items' )->query( show => $show ) %>" <%= $class %>><%= $show %></a>
 % }
-
 </div>