From: Oleg Broytman Date: Sat, 17 Dec 2022 15:35:31 +0000 (+0300) Subject: Fix(web/views/list_books): Fix a bug in series naming X-Git-Tag: 0.2.0.post1~12 X-Git-Url: https://git.phdru.name/?p=m_librarian.git;a=commitdiff_plain;h=b18919cd708ccbea99334f8b949e77b1c4dfd2dc Fix(web/views/list_books): Fix a bug in series naming Every new author reset series. [skip ci] --- diff --git a/m_librarian/web/views/list_books.py b/m_librarian/web/views/list_books.py index c9af4b4..210516b 100644 --- a/m_librarian/web/views/list_books.py +++ b/m_librarian/web/views/list_books.py @@ -35,12 +35,12 @@ VFFSL=valueFromFrameOrSearchList VFSL=valueFromSearchList VFN=valueForName currentTime=time.time -__CHEETAH_version__ = '3.1.0' -__CHEETAH_versionTuple__ = (3, 1, 0, 'final', 1) -__CHEETAH_genTime__ = 1528755606.297172 -__CHEETAH_genTimestamp__ = 'Tue Jun 12 01:20:06 2018' +__CHEETAH_version__ = '3.2.6' +__CHEETAH_versionTuple__ = (3, 2, 6, 'final', 0) +__CHEETAH_genTime__ = 1671291302.390272 +__CHEETAH_genTimestamp__ = 'Sat Dec 17 18:35:02 2022' __CHEETAH_src__ = 'list_books.tmpl' -__CHEETAH_srcLastModified__ = 'Tue Jun 12 01:20:03 2018' +__CHEETAH_srcLastModified__ = 'Sat Dec 17 18:34:51 2022' __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine' if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple: @@ -113,9 +113,9 @@ class list_books(layout): ''') write(u''' ''') - series = None columns1 = VFFSL(SL,"len",False)(VFFSL(SL,"columns",True))+1 - for author in VFFSL(SL,"sorted",False)(VFFSL(SL,"books_by_author",True)): # generated from line 21, col 3 + for author in VFFSL(SL,"sorted",False)(VFFSL(SL,"books_by_author",True)): # generated from line 20, col 3 + series = None books = VFFSL(SL,"books_by_author",True)[VFFSL(SL,"author",True)] for book in VFFSL(SL,"books",True): # generated from line 23, col 5 if VFFSL(SL,"book.series",True) != VFFSL(SL,"series",True): # generated from line 24, col 5 @@ -236,7 +236,7 @@ if not hasattr(list_books, '_initCheetahAttributes'): # CHEETAH was developed by Tavis Rudd and Mike Orr # with code, advice and input from many other volunteers. -# For more information visit http://cheetahtemplate.org/ +# For more information visit https://cheetahtemplate.org/ ################################################## ## if run from command line: diff --git a/m_librarian/web/views/list_books.tmpl b/m_librarian/web/views/list_books.tmpl index 5d70c88..e5e885a 100644 --- a/m_librarian/web/views/list_books.tmpl +++ b/m_librarian/web/views/list_books.tmpl @@ -16,9 +16,9 @@ $cgi.escape($_($column)) #end for - #set $series = None #set $columns1 = $len($columns)+1 #for $author in $sorted($books_by_author) + #set $series = None #set $books = $books_by_author[$author] #for $book in $books #if $book.series != $series