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