#encoding utf-8
-#import cgi
+#from m_librarian.translations import translations
#extends views.layout
#attr $title = 'Список авторов'
#def body
<h1>$title</h1>
#if $authors
+#filter WebSafe
<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 $column in $columns
- <td><a href="/books-by-author/$author.id/">
- $cgi.escape(unicode($getattr($author, $column) or ''))
+ #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>
+#end filter WebSafe
#else
<p>Не найдено ни одного автора!</p>
#end if