#encoding utf-8
+#import cgi
#extends views.layout
-#attr $title = 'Список книг автора $author.fullname'
+#attr $title = 'Список книг автора'
#def body
-<h1>$title</h1>
+<h1>$title $author.fullname</h1>
#if $books
- <table>
+ <form action="/download/" method="POST" style="height: 80%">
+ <div style="width: 100%; height: 90%">
+ <select multiple name="books" style="height: 100%">
#set $series = None
#for $book in $books
#if $book.series != $series
+ #if $series is not None
+ </optgroup>
+ #end if
#set $series = $book.series
+ <optgroup label="#slurp
#if $book.series
- <tr>
- <td colspan=2>Серия: $series</td>
- </tr>
+$cgi.escape($series, 1)#slurp
#else
- <tr>
- <td colspan=2>Вне серий</td>
- </tr>
+Вне серий#slurp
#end if
+">
#end if
- <tr>
- <td style="text-align: right">$book.ser_no</td>
- <td><a href="/download/$book.id/">$book.title</a></td>
- </tr>
+ <option value="$book.id">$book.ser_no $cgi.escape($book.title)</option>
#end for
- </table>
+ </optgroup>
+ </select>
+ </div>
+ <div style="width: 100%; text-align: center">
+ <input type="submit" value="Скачать">
+ </div>
+ </form>
#else
<p>Не найдено ни одной книги!</p>
#end if