]> git.phdru.name Git - m_librarian.git/blob - m_librarian/web/views/books_by_author.tmpl
Feat(web): Show books by an author
[m_librarian.git] / m_librarian / web / views / books_by_author.tmpl
1 #encoding utf-8
2 #extends views.layout
3 #attr $title = 'Список книг автора $author.fullname'
4 #def body
5 <h1>$title</h1>
6
7 #if $books
8   <table>
9   #set $series = None
10   #for $book in $books
11   #if $book.series != $series
12   #set $series = $book.series
13   #if $book.series
14   <tr>
15     <td colspan=2>Серия: $series</td>
16   </tr>
17   #else
18   <tr>
19     <td colspan=2>Вне серий</td>
20   </tr>
21   #end if
22   #end if
23   <tr>
24     <td style="text-align: right">$book.ser_no</td>
25     <td><a href="/download/$book.id/">$book.title</a></td>
26   </tr>
27   #end for
28   </table>
29 #else
30   <p>Не найдено ни одной книги!</p>
31 #end if
32 #end def