added facet links
[MojoFacets.git] / templates / data / table.html.ep
1 % layout 'default';
2
3 columns: <%= join(',',@$columns) %>
4
5 <table border=1>
6
7 <tr>
8 % foreach my $n ( @$columns ) {
9 <th><%= $n %>&nbsp;<a href="<%= url_for( action => 'facet' )->query( name => $n ) %>">#</a>
10 </th>
11 % }
12 </tr>
13
14 % foreach my $row ( @$sorted ) {
15 <tr>
16 % foreach my $col ( @$columns ) {
17 <td><%= ref $row->{$col} eq 'ARRAY' ? join(', ',@{ $row->{$col} }) : $row->{$col} %></td>
18 % }
19 </tr>
20 % }
21
22 </table>
23
24