X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=m_librarian%2Fweb%2Fviews%2Flist_authors.py;h=dca1c4090779344699278e1adcc27aed4a0e24d6;hb=HEAD;hp=3c5245a92a31e5bc6b1ca6f0b79265cb211ac15e;hpb=ee485bf9817d65fb5b7641a6638b931cf7747b13;p=m_librarian.git diff --git a/m_librarian/web/views/list_authors.py b/m_librarian/web/views/list_authors.py index 3c5245a..dca1c40 100644 --- a/m_librarian/web/views/list_authors.py +++ b/m_librarian/web/views/list_authors.py @@ -25,6 +25,7 @@ from Cheetah.CacheRegion import CacheRegion import Cheetah.Filters as Filters import Cheetah.ErrorCatchers as ErrorCatchers from Cheetah.compat import unicode +from m_librarian.translations import translations from views.layout import layout from views.search_authors_form import search_authors_form @@ -34,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__ = 1522961824.042332 -__CHEETAH_genTimestamp__ = 'Thu Apr 5 23:57:04 2018' +__CHEETAH_version__ = '3.3.1' +__CHEETAH_versionTuple__ = (3, 3, 1, 'final', 0) +__CHEETAH_genTime__ = 1718725815.054143 +__CHEETAH_genTimestamp__ = 'Tue Jun 18 18:50:15 2024' __CHEETAH_src__ = 'list_authors.tmpl' -__CHEETAH_srcLastModified__ = 'Thu Apr 5 23:54:11 2018' +__CHEETAH_srcLastModified__ = 'Tue Jun 18 18:50:12 2024' __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine' if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple: @@ -72,7 +73,7 @@ class list_authors(layout): - ## CHEETAH: generated from #def body at line 4, col 1. + ## CHEETAH: generated from #def body at line 5, col 1. trans = KWS.get("trans") if (not trans and not self._CHEETAH__isBuffering and not callable(self.transaction)): trans = self.transaction # is None unless self.awake() was called @@ -89,30 +90,67 @@ class list_authors(layout): write(u'''

\u041f\u043e\u0438\u0441\u043a \u0430\u0432\u0442\u043e\u0440\u043e\u0432

''') - _v = VFFSL(SL,"search_authors_form",False)(searchList=VFFSL(SL,"searchList",True)) # u'$search_authors_form(searchList=$searchList)' on line 7, col 1 - if _v is not None: write(_filter(_v, rawExpr=u'$search_authors_form(searchList=$searchList)')) # from line 7, col 1. + _v = VFFSL(SL,"search_authors_form",False)(searchList=VFFSL(SL,"searchList",True)) # u'$search_authors_form(searchList=$searchList)' on line 8, col 1 + if _v is not None: write(_filter(_v, rawExpr=u'$search_authors_form(searchList=$searchList)')) # from line 8, col 1. write(u'''

''') - _v = VFFSL(SL,"title",True) # u'$title' on line 9, col 5 - if _v is not None: write(_filter(_v, rawExpr=u'$title')) # from line 9, col 5. + _v = VFFSL(SL,"title",True) # u'$title' on line 10, col 5 + if _v is not None: write(_filter(_v, rawExpr=u'$title')) # from line 10, col 5. write(u'''

''') - if VFFSL(SL,"authors",True): # generated from line 11, col 1 + if VFFSL(SL,"authors",True): # generated from line 12, col 1 + _orig_filter_63533534 = _filter + filterName = u'WebSafe' + if "WebSafe" in self._CHEETAH__filters: + _filter = self._CHEETAH__currentFilter = self._CHEETAH__filters[filterName] + else: + _filter = self._CHEETAH__currentFilter = \ + self._CHEETAH__filters[filterName] = getattr(self._CHEETAH__filtersLib, filterName)(self).filter write(u''' + + ''') + if False: + _ + _ = VFFSL(SL,"getattr",False)(VFFSL(SL,"translations",True), 'ugettext', None) or VFFSL(SL,"translations.gettext",True) + for column in VFFSL(SL,"columns",True): # generated from line 17, col 3 + write(u''' +''') + write(u''' ''') - for author in VFFSL(SL,"authors",True): # generated from line 13, col 3 + for author in VFFSL(SL,"authors",True): # generated from line 21, col 3 write(u''' - - +''') + for column in VFFSL(SL,"columns",True): # generated from line 23, col 3 + if VFFSL(SL,"column",True) == 'count': # generated from line 24, col 5 + style = ' style="text-align: right; width: 5ex"' + else: # generated from line 26, col 5 + style = '' + write(u''' + ''') + _v = VFFSL(SL,"unicode",False)(VFFSL(SL,"getattr",False)(VFFSL(SL,"author",True), VFFSL(SL,"column",True)) or '') # u"$unicode($getattr($author, $column) or '')" on line 30, col 5 + if _v is not None: write(_filter(_v, rawExpr=u"$unicode($getattr($author, $column) or '')")) # from line 30, col 5. + write(u''' + +''') + write(u''' ''') write(u'''
''') + if False: + _(VFFSL(SL,"column",True)) + _v = VFFSL(SL,"_",False)(VFFSL(SL,"column",True)) # u'$_($column)' on line 18, col 36 + if _v is not None: write(_filter(_v, rawExpr=u'$_($column)')) # from line 18, col 36. + write(u'''
''') - _v = VFFSL(SL,"author.fullname",True) # u'$author.fullname' on line 15, col 9 - if _v is not None: write(_filter(_v, rawExpr=u'$author.fullname')) # from line 15, col 9. - write(u'''
''') - else: # generated from line 19, col 1 + _filter = self._CHEETAH__currentFilter = _orig_filter_63533534 + else: # generated from line 37, col 1 write(u'''

\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u043d\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u0430\u0432\u0442\u043e\u0440\u0430!

''') @@ -180,7 +218,7 @@ if not hasattr(list_authors, '_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: