show number of facet values after submit button
[MojoFacets.git] / templates / admin.html.ep
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>