]> git.phdru.name Git - m_librarian.git/blobdiff - m_librarian/web/views/books_by_author.tmpl
Fix(web): Выровнять вправо размер книги
[m_librarian.git] / m_librarian / web / views / books_by_author.tmpl
index 52a7eb344e6c9d16f5325624e85f850ce3bf5fed..22009134761d65cadc70c4810cf1d63dd4351fe4 100644 (file)
@@ -1,5 +1,6 @@
 #encoding utf-8
 #import cgi
+#from m_librarian.translations import translations
 #extends views.layout
 #attr $title = 'Список книг автора'
 #def body
@@ -8,6 +9,13 @@
 #if $books
   <form action="/download/" method="POST" style="height: 80%">
   <table style="width: 100%; height: 90%">
+  <tr>
+  <td>&nbsp;</td>
+  #set $_ = $getattr($translations, 'ugettext', None) or $translations.gettext
+  #for $column in $columns
+    <td style="text-align: center">$cgi.escape($_($column))</td>
+  #end for
+  </tr>
   #set $series = None
   #set $columns1 = $len($columns)+1
   #for $book in $books
@@ -26,7 +34,12 @@ $cgi.escape($series, 1)#slurp
   <tr>
   <td><input type=checkbox name=books value="$book.id"></td>
   #for $column in $columns
-  <td>$cgi.escape(unicode($getattr($book, $column) or ''))</td>
+  #if $column in ('ser_no', 'size')
+  #set $style = ' style="text-align: right; width: 5ex"'
+  #else
+  #set $style = ''
+  #end if
+  <td$style>$cgi.escape(unicode($getattr($book, $column) or ''))</td>
   #end for
   </tr>
   #end for