implement changes filter
[MojoFacets.git] / templates / changes / index.html.ep
index 84d3113..1550bbf 100644 (file)
@@ -1,2 +1,27 @@
 % layout 'default';
 <h2><%= $message %></h2>
+
+<form class=action_filter>
+<input type=submit value="Filter changes">
+<ul>
+% foreach my $type ( sort keys %$actions ) {
+<li><label>
+<input type=checkbox name=action_filter value="<%= $type %>">
+<%= $type %><span class=count><%= $actions->{$type} %></span>
+</label>
+% }
+</ul>
+<input type=submit value="Filter changes">
+</form>
+
+<ul>
+% foreach my $change ( @$changes ) {
+<li>
+<%= $change->{t} %>
+<a href="<%= url_for( controller => 'changes', action => 'view' )->query( uid => $change->{uid} ) %>"><%= $change->{action} %></a>
+% }
+</ul>
+
+% my $more = ( $#$changes ) * 10;
+Show <a href="<%= url_for( controller => 'changes', action => 'index' )->query( max => $more ) %>"><%= $more %> changes</a>
+