% layout 'default';
% title 'Authors';
<%= title %>
<%# On a new search, reset the page number to 1. %>
%= form_for authors => { page_number => 1 } => begin
%= label_for name_like => 'Name like'
%= text_field name_like => flash('name_like')
%= label_for minimum_book_count => 'Wrote at least'
<%= number_field minimum_book_count => 0,
min => 0, maxlength => 4, size => 4 %> books
%= submit_button "Search"
%= end
% if ($pager->total_entries > 0) {
% my $n = 0; for my $author ($author_page->all) {
>
<%= $author->books->count %> |
<%= link_to(trct($author->name, 100) => 'author' =>
{ id => $author->id, page_number => 1 }) %>
|
% }
% }
%= include '_page-navigation', items_name => 'authors'