]> git.phdru.name Git - m_librarian.git/blobdiff - m_librarian/web/views/books_by_author.tmpl
Feat(web): Сделать множественный выбор в списке книг
[m_librarian.git] / m_librarian / web / views / books_by_author.tmpl
index d093d566bfcb25137b3a9f37a9c5a46efd9e471c..96897e97c6876464d937a514878f7801236e5e3b 100644 (file)
@@ -1,31 +1,32 @@
 #encoding utf-8
 #extends views.layout
-#attr $title = 'Список книг автора $author.fullname'
+#attr $title = 'Список книг автора'
 #def body
-<h1>$title</h1>
+<h1>$title $author.fullname</h1>
 
 #if $books
-  <table>
+  <form action="" method="POST" style="height: 80%">
+  <select multiple style="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
   #if $book.series
-  <tr>
-    <td colspan=2>Серия: $series</td>
-  </tr>
+$series#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 $book.title</option>
   #end for
-  </table>
+  </optgroup>
+  </select>
+  </form>
 #else
   <p>Не найдено ни одной книги!</p>
 #end if