]> git.phdru.name Git - m_librarian.git/blobdiff - m_librarian/web/views/list_books.tmpl
Refactor(web): Show books in a <table>, not <select>
[m_librarian.git] / m_librarian / web / views / list_books.tmpl
index cab1e1d3edad0856bb6888ab160e1b2c816d4b7e..649922bc8a4917ad96493e8ed4c62e1eb0125054 100644 (file)
@@ -7,35 +7,34 @@
 
 #if $books_by_author
   <form action="/download/" method="POST" style="height: 80%">
-  <div style="width: 100%; height: 90%">
-  <select multiple name="books" style="height: 100%">
+  <table style="width: 100%; height: 90%">
   #set $series = None
   #for $author in $sorted($books_by_author)
     #set $books = $books_by_author[$author]
     #for $book in $books
     #if $book.series != $series
-    #if $series is not None
-    </optgroup>
-    #end if
     #set $series = $book.series
-    <optgroup label="#slurp
-$author — #slurp
-    #if $book.series
+  <tr>
+  <td colspan=2><b>
+  $author — <i>
+  #if $book.series
 $cgi.escape($series, 1)#slurp
-    #else
+  #else
 Вне серий#slurp
+  #end if
+  </i></b></td>
+  </tr>
     #end if
-">
-    #end if
-    <option value="$book.id">$book.ser_no $cgi.escape($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
   #end for
-  </optgroup>
-  </select>
-  </div>
-  <div style="width: 100%; text-align: center">
-  <input type="submit" value="Скачать">
-  </div>
+  <tr>
+  <td colspan=2 style="text-align: center"><input type="submit" value="Скачать"></td>
+  </tr>
+  </table>
   </form>
 #else
   <p>Не найдено ни одной книги!</p>