]> git.phdru.name Git - m_librarian.git/blob - m_librarian/web/views/books_by_author.tmpl
Feat(web): Configure columns for author and book tables
[m_librarian.git] / m_librarian / web / views / books_by_author.tmpl
1 #encoding utf-8
2 #import cgi
3 #extends views.layout
4 #attr $title = 'Список книг автора'
5 #def body
6 <h1>$title $author.fullname</h1>
7
8 #if $books
9   <form action="/download/" method="POST" style="height: 80%">
10   <table style="width: 100%; height: 90%">
11   #set $series = None
12   #set $columns1 = $len($columns)+1
13   #for $book in $books
14   #if $book.series != $series
15   #set $series = $book.series
16   <tr>
17   <td colspan="$columns1"><b><i>
18   #if $book.series
19 $cgi.escape($series, 1)#slurp
20   #else
21 Вне серий#slurp
22   #end if
23   </i></b></td>
24   </tr>
25   #end if
26   <tr>
27   <td><input type=checkbox name=books value="$book.id"></td>
28   #for $column in $columns
29   <td>$cgi.escape(unicode($getattr($book, $column) or ''))</td>
30   #end for
31   </tr>
32   #end for
33   <tr>
34   <td colspan="$columns1" style="text-align: center"><input type="submit" value="Скачать"></td>
35   </tr>
36   </table>
37   </form>
38 #else
39   <p>Не найдено ни одной книги!</p>
40 #end if
41 #end def