]> git.phdru.name Git - m_librarian.git/blobdiff - m_librarian/web/views/books_by_author.tmpl
Feat(web): Configure columns for author and book tables
[m_librarian.git] / m_librarian / web / views / books_by_author.tmpl
index 668e4453b079cf764b78c3e7e1a529b0531386b0..52a7eb344e6c9d16f5325624e85f850ce3bf5fed 100644 (file)
@@ -6,27 +6,34 @@
 <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
+  #set $columns1 = $len($columns)+1
   #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="$columns1"><b><i>
   #if $book.series
 $cgi.escape($series, 1)#slurp
   #else
 Вне серий#slurp
   #end if
-">
+  </i></b></td>
+  </tr>
   #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>
+  #for $column in $columns
+  <td>$cgi.escape(unicode($getattr($book, $column) or ''))</td>
+  #end for
+  </tr>
   #end for
-  </optgroup>
-  </select>
+  <tr>
+  <td colspan="$columns1" style="text-align: center"><input type="submit" value="Скачать"></td>
+  </tr>
+  </table>
   </form>
 #else
   <p>Не найдено ни одной книги!</p>