X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=m_librarian%2Fweb%2Fviews%2Flist_books.tmpl;h=3fa406a1a351a92b60f3c8bb4df4f80cf09ea6f7;hb=71bd6bdcfef171ccc8cd0207a6190d6c8627702f;hp=9566e89ff56bf8a78326420fa27a8dfc7de40a4e;hpb=fdede95cc489c5519b2e38130d66d4c01775e341;p=m_librarian.git diff --git a/m_librarian/web/views/list_books.tmpl b/m_librarian/web/views/list_books.tmpl index 9566e89..3fa406a 100644 --- a/m_librarian/web/views/list_books.tmpl +++ b/m_librarian/web/views/list_books.tmpl @@ -1,37 +1,89 @@ #encoding utf-8 #import cgi +#from m_librarian.translations import translations #extends views.layout #attr $title = 'Список книг' #def body

$title

-#if $books + + +#if $books_by_author
-
- + #set $_ = $getattr($translations, 'ugettext', None) or $translations.gettext + #for $column in $columns + $cgi.escape($_($column)) + #end for + + #set $columns1 = $len($columns)+1 + #for $anum, $author in $enumerate($sorted($books_by_author)) + #set $series = None + #set $snum = 0 + #set $books = $books_by_author[$author] + + + $author + + #for $book in $books + #if $book.series != $series + #set $series = $book.series + #set $snum += 1 + + + + $author — #if $book.series $cgi.escape($series, 1)#slurp #else Вне серий#slurp #end if -"> + + + #end if + + + #for $column in $columns + #if $column in ('ser_no', 'size') + #set $style = ' style="text-align: right; width: 5ex"' + #else + #set $style = '' #end if - + $cgi.escape(unicode($getattr($book, $column) or '')) + #end for + + #end for #end for - - -
-
- -
+ + + +
#else

Не найдено ни одной книги!