]> git.phdru.name Git - m_librarian.git/blobdiff - m_librarian/web/views/list_authors.tmpl
Feat(web): В таблицах авторов и книг добавить заголовки колонок
[m_librarian.git] / m_librarian / web / views / list_authors.tmpl
index 9bb417624c361fa33198ed6ebdfbfc157bfda95e..74a2bce93219517d5a3d53b69ac8f8197183ec59 100644 (file)
@@ -1,4 +1,6 @@
 #encoding utf-8
+#import cgi
+#from m_librarian.translations import translations
 #extends views.layout
 #attr $title = 'Список авторов'
 #def body
@@ -10,9 +12,19 @@ $search_authors_form(searchList=$searchList)
 
 #if $authors
   <table>
+  <tr>
+  #set $_ = $getattr($translations, 'ugettext', None) or $translations.gettext
+  #for $column in $columns
+    <td style="text-align: center">$cgi.escape($_($column))</td>
+  #end for
+  </tr>
   #for $author in $authors
   <tr>
-    <td>$author.fullname</td>
+  #for $column in $columns
+    <td><a href="/books-by-author/$author.id/">
+    $cgi.escape(unicode($getattr($author, $column) or ''))
+    </a></td>
+  #end for
   </tr>
   #end for
   </table>