]> git.phdru.name Git - m_librarian.git/blob - m_librarian/web/views/list_authors.tmpl
a364ebaa203b9d6f54f81f9dfff42026120cef1b
[m_librarian.git] / m_librarian / web / views / list_authors.tmpl
1 #encoding utf-8
2 #from m_librarian.translations import translations
3 #extends views.layout
4 #attr $title = 'Список авторов'
5 #def body
6 <h1>Поиск авторов</h1>
7 #from views.search_authors_form import search_authors_form
8 $search_authors_form(searchList=$searchList)
9
10 <h1>$title</h1>
11
12 #if $authors
13 #filter WebSafe
14   <table>
15   <tr>
16   #set $_ = $getattr($translations, 'ugettext', None) or $translations.gettext
17   #for $column in $columns
18     <td style="text-align: center">$_($column)</td>
19   #end for
20   </tr>
21   #for $author in $authors
22   <tr>
23   #for $column in $columns
24     #if $column == 'count'
25     #set $style = ' style="text-align: right; width: 5ex"'
26     #else
27     #set $style = ''
28     #end if
29     <td$style><a href="/books-by-author/$author.id/">
30     $unicode($getattr($author, $column) or '')
31     </a></td>
32   #end for
33   </tr>
34   #end for
35   </table>
36 #end filter WebSafe
37 #else
38   <p>Не найдено ни одного автора!</p>
39 #end if
40 #end def