From eb130007ee01c58bac09389a36bbab7b9242e5ff Mon Sep 17 00:00:00 2001 From: Dobrica Pavlinusic Date: Thu, 20 May 2010 20:35:56 +0200 Subject: [PATCH] insert ¶ between repeatable values --- public/mojo_facets.css | 5 +++++ templates/data/items/table.html.ep | 24 ++++++++++++++++++++++-- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/public/mojo_facets.css b/public/mojo_facets.css index 7bcbbf1..de5f3b0 100644 --- a/public/mojo_facets.css +++ b/public/mojo_facets.css @@ -109,3 +109,8 @@ label.excluded, a#excluded { color: #800; } + +/* delimiter for repeatable data */ +span.d { + color: #ccc; +} diff --git a/templates/data/items/table.html.ep b/templates/data/items/table.html.ep index e10ed3b..2577868 100644 --- a/templates/data/items/table.html.ep +++ b/templates/data/items/table.html.ep @@ -10,7 +10,14 @@ <%== session('sort') eq 'a' ? '↑' : '↓' %> % }
-<%== $filters->{$n} ? $#{ $filters->{$n} } + 1 . ' selected' : 'filter' %> + +% if ( defined $filters->{$n} ) { +<%= $#{ $filters->{$n} } + 1 %>  +all +% } else { +filter +% } +
% } @@ -19,7 +26,20 @@ % foreach my $row ( @$sorted ) { % foreach my $col ( @$columns ) { -{$col} ? ' class=numeric' : '' %>><%= ref $row->{$col} eq 'ARRAY' ? join(', ',@{ $row->{$col} }) : $row->{$col} %> +{$col} ? ' class=numeric' : '' %>> +% if ( ref $row->{$col} eq 'ARRAY' ) { +% foreach ( @{ $row->{$col} } ) { +<%= $_ %> +% if ( $#{ $row->{$col} } ) { + +% } +% } +% } elsif ( ref $row->{$col} ) { +
<%= dumper $row->{$col} %>
+% } else { +<%= $row->{$col} %> +% } + % } % } -- 2.20.1