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