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