]> git.phdru.name Git - m_librarian.git/blobdiff - m_librarian/web/views/list_authors.tmpl
Docs(TODO): These items are for wxPython
[m_librarian.git] / m_librarian / web / views / list_authors.tmpl
index 9bb417624c361fa33198ed6ebdfbfc157bfda95e..a364ebaa203b9d6f54f81f9dfff42026120cef1b 100644 (file)
@@ -1,4 +1,5 @@
 #encoding utf-8
 #encoding utf-8
+#from m_librarian.translations import translations
 #extends views.layout
 #attr $title = 'Список авторов'
 #def body
 #extends views.layout
 #attr $title = 'Список авторов'
 #def body
@@ -9,13 +10,30 @@ $search_authors_form(searchList=$searchList)
 <h1>$title</h1>
 
 #if $authors
 <h1>$title</h1>
 
 #if $authors
+#filter WebSafe
   <table>
   <table>
+  <tr>
+  #set $_ = $getattr($translations, 'ugettext', None) or $translations.gettext
+  #for $column in $columns
+    <td style="text-align: center">$_($column)</td>
+  #end for
+  </tr>
   #for $author in $authors
   <tr>
   #for $author in $authors
   <tr>
-    <td>$author.fullname</td>
+  #for $column in $columns
+    #if $column == 'count'
+    #set $style = ' style="text-align: right; width: 5ex"'
+    #else
+    #set $style = ''
+    #end if
+    <td$style><a href="/books-by-author/$author.id/">
+    $unicode($getattr($author, $column) or '')
+    </a></td>
+  #end for
   </tr>
   #end for
   </table>
   </tr>
   #end for
   </table>
+#end filter WebSafe
 #else
   <p>Не найдено ни одного автора!</p>
 #end if
 #else
   <p>Не найдено ни одного автора!</p>
 #end if