more info cleanup
[MojoFacets.git] / templates / data / table.html.ep
index 6c44c2d..d72bbec 100644 (file)
@@ -1,12 +1,45 @@
 % layout 'default';
 
-columns: <%= join(',',@$columns) %>
+<style type="text/css">
+div.filters {
+       position: absolute;
+       top: 0;
+       right: 0;
+       z-index: 10;
+       margin: 0;
+       background: #eee;
+}
+div.filters ul {
+       display: none;
+}
+div.filters:hover ul {
+       display: block;
+}
+</style>
+
+<div class=info>
+<b><%= $rows %></b> items 
+
+% my $filters = session('filters');
+% my @filters_active = keys %$filters;
+% if ( @filters_active ) {
+filter 
+%  foreach my $n ( @filters_active ) {
+<a href="<%= url_for( action => 'facet' )->query( remove => $n ) %>"
+       title="<%= join(', ', @{ $filters->{$n} }) %>"><%= $n %></a>
+%  }
+<span class=count><%= $#filters_active + 1 %> active click to remove</span>
+% }
+
+showing <%= $offset + 1 %>-<%= $offset + $limit %>
+
+</div>
 
 <table border=1>
 
 <tr>
 % foreach my $n ( @$columns ) {
-<th><%= $n %>&nbsp;<a href="<%= url_for( action => 'facet' )->query( name => $n ) %>">#</a>
+<th><%= $n %>&nbsp;<a href="<%= url_for( action => 'facet' )->query( name => $n ) %>"><%== $filters->{$n} ? '&diams;' : '&loz;' %></a>
 </th>
 % }
 </tr>
@@ -32,3 +65,7 @@ columns: <%= join(',',@$columns) %>
 % }
 </div>
 
+<ul class=debug>
+<li>rows: <%= $rows %> offset: <%= $offset %> limit: <%= $limit %>
+<li>columns: <%= join(',',@$columns) %>
+</ul>