]> git.phdru.name Git - m_librarian.git/blobdiff - m_librarian/web/views/books_by_author.tmpl
Refactor(web): Show books in a <table>, not <select>
[m_librarian.git] / m_librarian / web / views / books_by_author.tmpl
index 96897e97c6876464d937a514878f7801236e5e3b..61db03c1fe20abefca95d797cc1129ce422a60ca 100644 (file)
@@ -1,31 +1,36 @@
 #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%">
+  <table style="width: 100%; height: 90%">
   #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
+  <tr>
+  <td colspan=2><b><i>
   #if $book.series
-$series#slurp
+$cgi.escape($series, 1)#slurp
   #else
 Вне серий#slurp
   #end if
-">
+  </i></b></td>
+  </tr>
   #end if
-  <option value="$book.id">$book.ser_no $book.title</option>
+  <tr>
+  <td><input type=checkbox name=books value="$book.id"></td>
+  <td>$book.ser_no $cgi.escape($book.title)</td>
+  </tr>
   #end for
-  </optgroup>
-  </select>
+  <tr>
+  <td colspan=2 style="text-align: center"><input type="submit" value="Скачать"></td>
+  </tr>
+  </table>
   </form>
 #else
   <p>Не найдено ни одной книги!</p>