]> git.phdru.name Git - m_librarian.git/blobdiff - m_librarian/web/views/books_by_author.tmpl
Fix(web:authors): Улучшить дизайн формы поиска по авторам
[m_librarian.git] / m_librarian / web / views / books_by_author.tmpl
index 96897e97c6876464d937a514878f7801236e5e3b..bdd694ea6d162c3a48434edb4700a3cf01fde3e6 100644 (file)
@@ -1,12 +1,14 @@
 #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>