]> git.phdru.name Git - m_librarian.git/blobdiff - m_librarian/web/views/list_authors.py
Tests(tox): Change syntax for `envlist`
[m_librarian.git] / m_librarian / web / views / list_authors.py
index 5ee4af0a2c7cdc0c97d116db11d5afe3110668c8..a7bf7059a832d186aa66cc658604481d3b920b94 100644 (file)
@@ -25,7 +25,7 @@ from Cheetah.CacheRegion import CacheRegion
 import Cheetah.Filters as Filters
 import Cheetah.ErrorCatchers as ErrorCatchers
 from Cheetah.compat import unicode
-import cgi
+from m_librarian.translations import translations
 from views.layout import layout
 from views.search_authors_form import search_authors_form
 
@@ -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__ = 1528670903.492958
-__CHEETAH_genTimestamp__ = 'Mon Jun 11 01:48:23 2018'
+__CHEETAH_version__ = '3.3.1'
+__CHEETAH_versionTuple__ = (3, 3, 1, 'final', 0)
+__CHEETAH_genTime__ = 1721134725.803056
+__CHEETAH_genTimestamp__ = 'Tue Jul 16 15:58:45 2024'
 __CHEETAH_src__ = 'list_authors.tmpl'
-__CHEETAH_srcLastModified__ = 'Mon Jun 11 01:48:21 2018'
+__CHEETAH_srcLastModified__ = 'Tue Jul 16 15:57:52 2024'
 __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine'
 
 if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple:
@@ -101,19 +101,76 @@ class list_authors(layout):
 
 ''')
         if VFFSL(SL,"authors",True): # generated from line 12, col 1
+            _orig_filter_98722638 = _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'''  <table>
+  <tr>
+  ''')
+            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'''    <td class="center">''')
+                if False:
+                    _(VFFSL(SL,"column",True))
+                _v = VFFSL(SL,"_",False)(VFFSL(SL,"column",True)) # u'$_($column)' on line 18, col 24
+                if _v is not None: write(_filter(_v, rawExpr=u'$_($column)')) # from line 18, col 24.
+                write(u'''
 ''')
-            for author in VFFSL(SL,"authors",True): # generated from line 14, col 3
+                if VFFSL(SL,"sort",True) in (VFFSL(SL,"column",True), '+'+VFFSL(SL,"column",True), '-'+VFFSL(SL,"column",True)): # generated from line 19, col 5
+                    if VFFSL(SL,"sort",True) in (VFFSL(SL,"column",True), '+'+VFFSL(SL,"column",True)): # generated from line 20, col 7
+                        sort_param = '-'+VFFSL(SL,"column",True)
+                        sort_sign = '↓'
+                    elif VFFSL(SL,"sort",True) == '-'+VFFSL(SL,"column",True): # generated from line 23, col 7
+                        sort_param = VFFSL(SL,"quote",False)('+')+VFFSL(SL,"column",True)
+                        sort_sign = '↑'
+                else: # generated from line 27, col 5
+                    sort_param = VFFSL(SL,"quote",False)('+')+VFFSL(SL,"column",True)
+                    sort_sign = '↓'
+                case_param = '1' if VFFSL(SL,"case_sensitive",True) else ''
+                write(u'''    <a href="/list_authors/?search_authors=''')
+                _v = VFFSL(SL,"search_authors",True) # u'$search_authors' on line 32, col 44
+                if _v is not None: write(_filter(_v, rawExpr=u'$search_authors')) # from line 32, col 44.
+                write(u'''&search_type=''')
+                _v = VFFSL(SL,"search_type",True) # u'$search_type' on line 32, col 72
+                if _v is not None: write(_filter(_v, rawExpr=u'$search_type')) # from line 32, col 72.
+                write(u'''&case_sensitive=''')
+                _v = VFFSL(SL,"case_param",True) # u'$case_param' on line 32, col 100
+                if _v is not None: write(_filter(_v, rawExpr=u'$case_param')) # from line 32, col 100.
+                write(u'''&sort=''')
+                _v = VFFSL(SL,"sort_param",True) # u'$sort_param' on line 32, col 117
+                if _v is not None: write(_filter(_v, rawExpr=u'$sort_param')) # from line 32, col 117.
+                write(u'''">''')
+                _v = VFFSL(SL,"sort_sign",True) # u'$sort_sign' on line 32, col 130
+                if _v is not None: write(_filter(_v, rawExpr=u'$sort_sign')) # from line 32, col 130.
+                write(u'''</a>
+    </td>
+''')
+            write(u'''  </tr>
+''')
+            for author in VFFSL(SL,"authors",True): # generated from line 36, col 3
                 write(u'''  <tr>
 ''')
-                for column in VFFSL(SL,"columns",True): # generated from line 16, col 3
-                    write(u'''    <td><a href="/books-by-author/''')
-                    _v = VFFSL(SL,"author.id",True) # u'$author.id' on line 17, col 35
-                    if _v is not None: write(_filter(_v, rawExpr=u'$author.id')) # from line 17, col 35.
+                for column in VFFSL(SL,"columns",True): # generated from line 38, col 3
+                    if VFFSL(SL,"column",True) == 'count': # generated from line 39, col 5
+                        style = ' style="text-align: right; width: 5ex"'
+                    else: # generated from line 41, col 5
+                        style = ''
+                    write(u'''    <td''')
+                    _v = VFFSL(SL,"style",True) # u'$style' on line 44, col 8
+                    if _v is not None: write(_filter(_v, rawExpr=u'$style')) # from line 44, col 8.
+                    write(u'''><a href="/books-by-author/''')
+                    _v = VFFSL(SL,"author.id",True) # u'$author.id' on line 44, col 41
+                    if _v is not None: write(_filter(_v, rawExpr=u'$author.id')) # from line 44, col 41.
                     write(u'''/">
     ''')
-                    _v = VFN(VFFSL(SL,"cgi",True),"escape",False)(unicode(VFFSL(SL,"getattr",False)(VFFSL(SL,"author",True), VFFSL(SL,"column",True)) or '')) # u"$cgi.escape(unicode($getattr($author, $column) or ''))" on line 18, col 5
-                    if _v is not None: write(_filter(_v, rawExpr=u"$cgi.escape(unicode($getattr($author, $column) or ''))")) # from line 18, col 5.
+                    _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 45, col 5
+                    if _v is not None: write(_filter(_v, rawExpr=u"$unicode($getattr($author, $column) or '')")) # from line 45, col 5.
                     write(u'''
     </a></td>
 ''')
@@ -121,7 +178,8 @@ class list_authors(layout):
 ''')
             write(u'''  </table>
 ''')
-        else: # generated from line 24, col 1
+            _filter = self._CHEETAH__currentFilter = _orig_filter_98722638
+        else: # generated from line 52, col 1
             write(u'''  <p>\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u043d\u0438 \u043e\u0434\u043d\u043e\u0433\u043e \u0430\u0432\u0442\u043e\u0440\u0430!</p>
 ''')
         
@@ -189,7 +247,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: