show less than 25 filter values
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 23 May 2010 17:30:18 +0000 (19:30 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 23 May 2010 17:30:18 +0000 (19:30 +0200)
templates/data/items.html.ep

index 5db554a..33a1847 100644 (file)
@@ -20,8 +20,10 @@ td.numeric {
 % if ( @filters_active ) {
 filter 
 %  foreach my $n ( @filters_active ) {
 % if ( @filters_active ) {
 filter 
 %  foreach my $n ( @filters_active ) {
-<a href="<%= url_for( action => 'facet' )->query( remove => $n ) %>"
-       title="<%= join(', ', @{ $filters->{$n} }) %>"><%= $n %></a>
+%  my $title = $#{ $filters->{$n} } + 1;
+%  $title .= $title > 25 ? ' values' : ': ' . join(', ', @{ $filters->{$n} });
+<a href="<%= url_for( action => 'facet' )->query( remove => $n ) %>" title="<%= $title %>">
+<%= $n %></a>
 %  }
 <span class=count><%= $#filters_active + 1 %> active click to remove</span>
 % }
 %  }
 <span class=count><%= $#filters_active + 1 %> active click to remove</span>
 % }