]> git.phdru.name Git - m_librarian.git/commitdiff
Feat(web): В таблицах авторов и книг добавить заголовки колонок
authorOleg Broytman <phd@phdru.name>
Mon, 11 Jun 2018 11:53:47 +0000 (14:53 +0300)
committerOleg Broytman <phd@phdru.name>
Mon, 11 Jun 2018 12:07:21 +0000 (15:07 +0300)
m_librarian/translations/ru.mo
m_librarian/translations/ru.po
m_librarian/web/views/books_by_author.py
m_librarian/web/views/books_by_author.tmpl
m_librarian/web/views/list_authors.py
m_librarian/web/views/list_authors.tmpl
m_librarian/web/views/list_books.py
m_librarian/web/views/list_books.tmpl

index c047f7a11a0447a01d3a2d4f3c3c0462e35c7f77..bd67d64a2757706d0e6eafd7b2c2950811c3e9e9 100644 (file)
Binary files a/m_librarian/translations/ru.mo and b/m_librarian/translations/ru.mo differ
index 3633d51862ca1d379bed48718594a2fd57e102b4..9ccb0697b134232f10469cb9b1d9aec4a38b2f85 100644 (file)
@@ -1,5 +1,5 @@
 # Russian translation
 # Russian translation
-# Copyright 2016, 2017 (C) PhiloSoft Design
+# Copyright 2016-2018 (C) PhiloSoft Design
 # Created by Oleg Broytman <phd@phdru.name>
 #
 msgid ""
 # Created by Oleg Broytman <phd@phdru.name>
 #
 msgid ""
@@ -7,7 +7,7 @@ msgstr ""
 "Project-Id-Version: 0.0.14\n"
 "Report-Msgid-Bugs-To: Oleg Broytman <phd@phdru.name>\n"
 "POT-Creation-Date: 2016-03-29\n"
 "Project-Id-Version: 0.0.14\n"
 "Report-Msgid-Bugs-To: Oleg Broytman <phd@phdru.name>\n"
 "POT-Creation-Date: 2016-03-29\n"
-"PO-Revision-Date: 2016-05-15\n"
+"PO-Revision-Date: 2018-06-11\n"
 "Last-Translator: Oleg Broytman <phd@phdru.name>\n"
 "Language: Russian\n"
 "Language-Team: Oleg Broytman <phd@phdru.name>\n"
 "Last-Translator: Oleg Broytman <phd@phdru.name>\n"
 "Language: Russian\n"
 "Language-Team: Oleg Broytman <phd@phdru.name>\n"
@@ -60,3 +60,46 @@ msgstr "книг"
 
 msgid "bytes"
 msgstr "байт"
 
 msgid "bytes"
 msgstr "байт"
+
+msgid "surname"
+msgstr "Фамилия"
+
+msgid "name"
+msgstr "Имя"
+
+msgid "misc_name"
+msgstr "Отчество"
+
+msgid "fullname"
+msgstr "Полное имя"
+
+msgid "count"
+msgstr "Число книг"
+
+msgid "title"
+msgstr "Название"
+
+msgid "series"
+msgstr "Серия"
+
+msgid "ser_no"
+msgstr "Номер в серии"
+
+msgid "archive"
+msgstr "Архив"
+
+msgid "file"
+msgstr "Файл"
+
+msgid "size"
+msgstr "Размер"
+
+msgid "lib_id"
+msgstr "ID библиотеки"
+
+msgid "deleted"
+msgstr "Удалена"
+
+msgid "date"
+msgstr "Дата"
+
index 8136ece77d5cff75e5fe5fd7d942a8bf44aee1dd..1183fbd73031d8771af2047aa2c03b06bd29b993 100644 (file)
@@ -26,6 +26,7 @@ import Cheetah.Filters as Filters
 import Cheetah.ErrorCatchers as ErrorCatchers
 from Cheetah.compat import unicode
 import cgi
 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.layout import layout
 
 ##################################################
@@ -36,10 +37,10 @@ VFN=valueForName
 currentTime=time.time
 __CHEETAH_version__ = '3.1.0'
 __CHEETAH_versionTuple__ = (3, 1, 0, 'final', 1)
 currentTime=time.time
 __CHEETAH_version__ = '3.1.0'
 __CHEETAH_versionTuple__ = (3, 1, 0, 'final', 1)
-__CHEETAH_genTime__ = 1528670845.131662
-__CHEETAH_genTimestamp__ = 'Mon Jun 11 01:47:25 2018'
+__CHEETAH_genTime__ = 1528717961.265576
+__CHEETAH_genTimestamp__ = 'Mon Jun 11 14:52:41 2018'
 __CHEETAH_src__ = 'books_by_author.tmpl'
 __CHEETAH_src__ = 'books_by_author.tmpl'
-__CHEETAH_srcLastModified__ = 'Mon Jun 11 01:47:23 2018'
+__CHEETAH_srcLastModified__ = 'Mon Jun 11 14:52:27 2018'
 __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine'
 
 if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple:
 __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine'
 
 if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple:
@@ -72,7 +73,7 @@ class books_by_author(layout):
 
 
 
 
 
 
-        ## CHEETAH: generated from #def body at line 5, col 1.
+        ## CHEETAH: generated from #def body at line 6, 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
         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
@@ -88,61 +89,76 @@ class books_by_author(layout):
         ## START - generated method body
         
         write(u'''<h1>''')
         ## START - generated method body
         
         write(u'''<h1>''')
-        _v = VFFSL(SL,"title",True) # u'$title' on line 6, col 5
-        if _v is not None: write(_filter(_v, rawExpr=u'$title')) # from line 6, col 5.
+        _v = VFFSL(SL,"title",True) # u'$title' on line 7, col 5
+        if _v is not None: write(_filter(_v, rawExpr=u'$title')) # from line 7, col 5.
         write(u''' ''')
         write(u''' ''')
-        _v = VFFSL(SL,"author.fullname",True) # u'$author.fullname' on line 6, col 12
-        if _v is not None: write(_filter(_v, rawExpr=u'$author.fullname')) # from line 6, col 12.
+        _v = VFFSL(SL,"author.fullname",True) # u'$author.fullname' on line 7, col 12
+        if _v is not None: write(_filter(_v, rawExpr=u'$author.fullname')) # from line 7, col 12.
         write(u'''</h1>
 
 ''')
         write(u'''</h1>
 
 ''')
-        if VFFSL(SL,"books",True): # generated from line 8, col 1
+        if VFFSL(SL,"books",True): # generated from line 9, col 1
             write(u'''  <form action="/download/" method="POST" style="height: 80%">
   <table style="width: 100%; height: 90%">
             write(u'''  <form action="/download/" method="POST" style="height: 80%">
   <table style="width: 100%; height: 90%">
+  <tr>
+  <td>&nbsp;</td>
+  ''')
+            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 15, col 3
+                write(u'''    <td style="text-align: center">''')
+                if False:
+                    _(VFFSL(SL,"column",True))
+                _v = VFN(VFFSL(SL,"cgi",True),"escape",False)(VFFSL(SL,"_",False)(VFFSL(SL,"column",True))) # u'$cgi.escape($_($column))' on line 16, col 36
+                if _v is not None: write(_filter(_v, rawExpr=u'$cgi.escape($_($column))')) # from line 16, col 36.
+                write(u'''</td>
+''')
+            write(u'''  </tr>
 ''')
             series = None
             columns1 = VFFSL(SL,"len",False)(VFFSL(SL,"columns",True))+1
 ''')
             series = None
             columns1 = VFFSL(SL,"len",False)(VFFSL(SL,"columns",True))+1
-            for book in VFFSL(SL,"books",True): # generated from line 13, col 3
-                if VFFSL(SL,"book.series",True) != VFFSL(SL,"series",True): # generated from line 14, col 3
+            for book in VFFSL(SL,"books",True): # generated from line 21, col 3
+                if VFFSL(SL,"book.series",True) != VFFSL(SL,"series",True): # generated from line 22, col 3
                     series = VFFSL(SL,"book.series",True)
                     write(u'''  <tr>
   <td colspan="''')
                     series = VFFSL(SL,"book.series",True)
                     write(u'''  <tr>
   <td colspan="''')
-                    _v = VFFSL(SL,"columns1",True) # u'$columns1' on line 17, col 16
-                    if _v is not None: write(_filter(_v, rawExpr=u'$columns1')) # from line 17, col 16.
+                    _v = VFFSL(SL,"columns1",True) # u'$columns1' on line 25, col 16
+                    if _v is not None: write(_filter(_v, rawExpr=u'$columns1')) # from line 25, col 16.
                     write(u'''"><b><i>
 ''')
                     write(u'''"><b><i>
 ''')
-                    if VFFSL(SL,"book.series",True): # generated from line 18, col 3
-                        _v = VFN(VFFSL(SL,"cgi",True),"escape",False)(VFFSL(SL,"series",True), 1) # u'$cgi.escape($series, 1)' on line 19, col 1
-                        if _v is not None: write(_filter(_v, rawExpr=u'$cgi.escape($series, 1)')) # from line 19, col 1.
-                    else: # generated from line 20, col 3
+                    if VFFSL(SL,"book.series",True): # generated from line 26, col 3
+                        _v = VFN(VFFSL(SL,"cgi",True),"escape",False)(VFFSL(SL,"series",True), 1) # u'$cgi.escape($series, 1)' on line 27, col 1
+                        if _v is not None: write(_filter(_v, rawExpr=u'$cgi.escape($series, 1)')) # from line 27, col 1.
+                    else: # generated from line 28, col 3
                         write(u'''\u0412\u043d\u0435 \u0441\u0435\u0440\u0438\u0439''')
                     write(u'''  </i></b></td>
   </tr>
 ''')
                 write(u'''  <tr>
   <td><input type=checkbox name=books value="''')
                         write(u'''\u0412\u043d\u0435 \u0441\u0435\u0440\u0438\u0439''')
                     write(u'''  </i></b></td>
   </tr>
 ''')
                 write(u'''  <tr>
   <td><input type=checkbox name=books value="''')
-                _v = VFFSL(SL,"book.id",True) # u'$book.id' on line 27, col 46
-                if _v is not None: write(_filter(_v, rawExpr=u'$book.id')) # from line 27, col 46.
+                _v = VFFSL(SL,"book.id",True) # u'$book.id' on line 35, col 46
+                if _v is not None: write(_filter(_v, rawExpr=u'$book.id')) # from line 35, col 46.
                 write(u'''"></td>
 ''')
                 write(u'''"></td>
 ''')
-                for column in VFFSL(SL,"columns",True): # generated from line 28, col 3
+                for column in VFFSL(SL,"columns",True): # generated from line 36, col 3
                     write(u'''  <td>''')
                     write(u'''  <td>''')
-                    _v = VFN(VFFSL(SL,"cgi",True),"escape",False)(unicode(VFFSL(SL,"getattr",False)(VFFSL(SL,"book",True), VFFSL(SL,"column",True)) or '')) # u"$cgi.escape(unicode($getattr($book, $column) or ''))" on line 29, col 7
-                    if _v is not None: write(_filter(_v, rawExpr=u"$cgi.escape(unicode($getattr($book, $column) or ''))")) # from line 29, col 7.
+                    _v = VFN(VFFSL(SL,"cgi",True),"escape",False)(unicode(VFFSL(SL,"getattr",False)(VFFSL(SL,"book",True), VFFSL(SL,"column",True)) or '')) # u"$cgi.escape(unicode($getattr($book, $column) or ''))" on line 37, col 7
+                    if _v is not None: write(_filter(_v, rawExpr=u"$cgi.escape(unicode($getattr($book, $column) or ''))")) # from line 37, col 7.
                     write(u'''</td>
 ''')
                 write(u'''  </tr>
 ''')
             write(u'''  <tr>
   <td colspan="''')
                     write(u'''</td>
 ''')
                 write(u'''  </tr>
 ''')
             write(u'''  <tr>
   <td colspan="''')
-            _v = VFFSL(SL,"columns1",True) # u'$columns1' on line 34, col 16
-            if _v is not None: write(_filter(_v, rawExpr=u'$columns1')) # from line 34, col 16.
+            _v = VFFSL(SL,"columns1",True) # u'$columns1' on line 42, col 16
+            if _v is not None: write(_filter(_v, rawExpr=u'$columns1')) # from line 42, col 16.
             write(u'''" style="text-align: center"><input type="submit" value="\u0421\u043a\u0430\u0447\u0430\u0442\u044c"></td>
   </tr>
   </table>
   </form>
 ''')
             write(u'''" style="text-align: center"><input type="submit" value="\u0421\u043a\u0430\u0447\u0430\u0442\u044c"></td>
   </tr>
   </table>
   </form>
 ''')
-        else: # generated from line 38, col 1
+        else: # generated from line 46, col 1
             write(u'''  <p>\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u043d\u0438 \u043e\u0434\u043d\u043e\u0439 \u043a\u043d\u0438\u0433\u0438!</p>
 ''')
         
             write(u'''  <p>\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u043d\u0438 \u043e\u0434\u043d\u043e\u0439 \u043a\u043d\u0438\u0433\u0438!</p>
 ''')
         
index 52a7eb344e6c9d16f5325624e85f850ce3bf5fed..30a5d8fd296314609f00910887e6ea3b91734ac4 100644 (file)
@@ -1,5 +1,6 @@
 #encoding utf-8
 #import cgi
 #encoding utf-8
 #import cgi
+#from m_librarian.translations import translations
 #extends views.layout
 #attr $title = 'Список книг автора'
 #def body
 #extends views.layout
 #attr $title = 'Список книг автора'
 #def body
@@ -8,6 +9,13 @@
 #if $books
   <form action="/download/" method="POST" style="height: 80%">
   <table style="width: 100%; height: 90%">
 #if $books
   <form action="/download/" method="POST" style="height: 80%">
   <table style="width: 100%; height: 90%">
+  <tr>
+  <td>&nbsp;</td>
+  #set $_ = $getattr($translations, 'ugettext', None) or $translations.gettext
+  #for $column in $columns
+    <td style="text-align: center">$cgi.escape($_($column))</td>
+  #end for
+  </tr>
   #set $series = None
   #set $columns1 = $len($columns)+1
   #for $book in $books
   #set $series = None
   #set $columns1 = $len($columns)+1
   #for $book in $books
index 5ee4af0a2c7cdc0c97d116db11d5afe3110668c8..f7047dd1ec0d5fe9ea9400a24da074e7cf57f40f 100644 (file)
@@ -26,6 +26,7 @@ import Cheetah.Filters as Filters
 import Cheetah.ErrorCatchers as ErrorCatchers
 from Cheetah.compat import unicode
 import cgi
 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
 
 from views.layout import layout
 from views.search_authors_form import search_authors_form
 
@@ -37,10 +38,10 @@ VFN=valueForName
 currentTime=time.time
 __CHEETAH_version__ = '3.1.0'
 __CHEETAH_versionTuple__ = (3, 1, 0, 'final', 1)
 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_genTime__ = 1528717961.404398
+__CHEETAH_genTimestamp__ = 'Mon Jun 11 14:52:41 2018'
 __CHEETAH_src__ = 'list_authors.tmpl'
 __CHEETAH_src__ = 'list_authors.tmpl'
-__CHEETAH_srcLastModified__ = 'Mon Jun 11 01:48:21 2018'
+__CHEETAH_srcLastModified__ = 'Mon Jun 11 14:52:34 2018'
 __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine'
 
 if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple:
 __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine'
 
 if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple:
@@ -73,7 +74,7 @@ class list_authors(layout):
 
 
 
 
 
 
-        ## CHEETAH: generated from #def body at line 5, col 1.
+        ## CHEETAH: generated from #def body at line 6, 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
         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
@@ -90,30 +91,44 @@ class list_authors(layout):
         
         write(u'''<h1>\u041f\u043e\u0438\u0441\u043a \u0430\u0432\u0442\u043e\u0440\u043e\u0432</h1>
 ''')
         
         write(u'''<h1>\u041f\u043e\u0438\u0441\u043a \u0430\u0432\u0442\u043e\u0440\u043e\u0432</h1>
 ''')
-        _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.
+        _v = VFFSL(SL,"search_authors_form",False)(searchList=VFFSL(SL,"searchList",True)) # u'$search_authors_form(searchList=$searchList)' on line 9, col 1
+        if _v is not None: write(_filter(_v, rawExpr=u'$search_authors_form(searchList=$searchList)')) # from line 9, col 1.
         write(u'''
 
 <h1>''')
         write(u'''
 
 <h1>''')
-        _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.
+        _v = VFFSL(SL,"title",True) # u'$title' on line 11, col 5
+        if _v is not None: write(_filter(_v, rawExpr=u'$title')) # from line 11, col 5.
         write(u'''</h1>
 
 ''')
         write(u'''</h1>
 
 ''')
-        if VFFSL(SL,"authors",True): # generated from line 12, col 1
+        if VFFSL(SL,"authors",True): # generated from line 13, col 1
             write(u'''  <table>
             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 style="text-align: center">''')
+                if False:
+                    _(VFFSL(SL,"column",True))
+                _v = VFN(VFFSL(SL,"cgi",True),"escape",False)(VFFSL(SL,"_",False)(VFFSL(SL,"column",True))) # u'$cgi.escape($_($column))' on line 18, col 36
+                if _v is not None: write(_filter(_v, rawExpr=u'$cgi.escape($_($column))')) # from line 18, col 36.
+                write(u'''</td>
 ''')
 ''')
-            for author in VFFSL(SL,"authors",True): # generated from line 14, col 3
+            write(u'''  </tr>
+''')
+            for author in VFFSL(SL,"authors",True): # generated from line 21, col 3
                 write(u'''  <tr>
 ''')
                 write(u'''  <tr>
 ''')
-                for column in VFFSL(SL,"columns",True): # generated from line 16, col 3
+                for column in VFFSL(SL,"columns",True): # generated from line 23, col 3
                     write(u'''    <td><a href="/books-by-author/''')
                     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.
+                    _v = VFFSL(SL,"author.id",True) # u'$author.id' on line 24, col 35
+                    if _v is not None: write(_filter(_v, rawExpr=u'$author.id')) # from line 24, col 35.
                     write(u'''/">
     ''')
                     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 = 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 25, col 5
+                    if _v is not None: write(_filter(_v, rawExpr=u"$cgi.escape(unicode($getattr($author, $column) or ''))")) # from line 25, col 5.
                     write(u'''
     </a></td>
 ''')
                     write(u'''
     </a></td>
 ''')
@@ -121,7 +136,7 @@ class list_authors(layout):
 ''')
             write(u'''  </table>
 ''')
 ''')
             write(u'''  </table>
 ''')
-        else: # generated from line 24, col 1
+        else: # generated from line 31, 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>
 ''')
         
             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>
 ''')
         
index a872afc8b21b171aa218feadee90da4cb116fbad..74a2bce93219517d5a3d53b69ac8f8197183ec59 100644 (file)
@@ -1,5 +1,6 @@
 #encoding utf-8
 #import cgi
 #encoding utf-8
 #import cgi
+#from m_librarian.translations import translations
 #extends views.layout
 #attr $title = 'Список авторов'
 #def body
 #extends views.layout
 #attr $title = 'Список авторов'
 #def body
@@ -11,6 +12,12 @@ $search_authors_form(searchList=$searchList)
 
 #if $authors
   <table>
 
 #if $authors
   <table>
+  <tr>
+  #set $_ = $getattr($translations, 'ugettext', None) or $translations.gettext
+  #for $column in $columns
+    <td style="text-align: center">$cgi.escape($_($column))</td>
+  #end for
+  </tr>
   #for $author in $authors
   <tr>
   #for $column in $columns
   #for $author in $authors
   <tr>
   #for $column in $columns
index 0b2f8c62780b05b1f6292ad3692408393f67ff98..0eadec04e75f6abdbf306de096579bfd3e169447 100644 (file)
@@ -26,6 +26,7 @@ import Cheetah.Filters as Filters
 import Cheetah.ErrorCatchers as ErrorCatchers
 from Cheetah.compat import unicode
 import cgi
 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.layout import layout
 
 ##################################################
@@ -36,10 +37,10 @@ VFN=valueForName
 currentTime=time.time
 __CHEETAH_version__ = '3.1.0'
 __CHEETAH_versionTuple__ = (3, 1, 0, 'final', 1)
 currentTime=time.time
 __CHEETAH_version__ = '3.1.0'
 __CHEETAH_versionTuple__ = (3, 1, 0, 'final', 1)
-__CHEETAH_genTime__ = 1528670845.332275
-__CHEETAH_genTimestamp__ = 'Mon Jun 11 01:47:25 2018'
+__CHEETAH_genTime__ = 1528717961.535029
+__CHEETAH_genTimestamp__ = 'Mon Jun 11 14:52:41 2018'
 __CHEETAH_src__ = 'list_books.tmpl'
 __CHEETAH_src__ = 'list_books.tmpl'
-__CHEETAH_srcLastModified__ = 'Mon Jun 11 01:46:57 2018'
+__CHEETAH_srcLastModified__ = 'Mon Jun 11 14:52:39 2018'
 __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine'
 
 if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple:
 __CHEETAH_docstring__ = 'Autogenerated by Cheetah: The Python-Powered Template Engine'
 
 if __CHEETAH_versionTuple__ < RequiredCheetahVersionTuple:
@@ -72,7 +73,7 @@ class list_books(layout):
 
 
 
 
 
 
-        ## CHEETAH: generated from #def body at line 5, col 1.
+        ## CHEETAH: generated from #def body at line 6, 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
         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
@@ -88,64 +89,79 @@ class list_books(layout):
         ## START - generated method body
         
         write(u'''<h1>''')
         ## START - generated method body
         
         write(u'''<h1>''')
-        _v = VFFSL(SL,"title",True) # u'$title' on line 6, col 5
-        if _v is not None: write(_filter(_v, rawExpr=u'$title')) # from line 6, col 5.
+        _v = VFFSL(SL,"title",True) # u'$title' on line 7, col 5
+        if _v is not None: write(_filter(_v, rawExpr=u'$title')) # from line 7, col 5.
         write(u'''</h1>
 
 ''')
         write(u'''</h1>
 
 ''')
-        if VFFSL(SL,"books_by_author",True): # generated from line 8, col 1
+        if VFFSL(SL,"books_by_author",True): # generated from line 9, col 1
             write(u'''  <form action="/download/" method="POST" style="height: 80%">
   <table style="width: 100%; height: 90%">
             write(u'''  <form action="/download/" method="POST" style="height: 80%">
   <table style="width: 100%; height: 90%">
+  <tr>
+  <td>&nbsp;</td>
+  ''')
+            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 15, col 3
+                write(u'''    <td style="text-align: center">''')
+                if False:
+                    _(VFFSL(SL,"column",True))
+                _v = VFN(VFFSL(SL,"cgi",True),"escape",False)(VFFSL(SL,"_",False)(VFFSL(SL,"column",True))) # u'$cgi.escape($_($column))' on line 16, col 36
+                if _v is not None: write(_filter(_v, rawExpr=u'$cgi.escape($_($column))')) # from line 16, col 36.
+                write(u'''</td>
+''')
+            write(u'''  </tr>
 ''')
             series = None
             columns1 = VFFSL(SL,"len",False)(VFFSL(SL,"columns",True))+1
 ''')
             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 13, col 3
+            for author in VFFSL(SL,"sorted",False)(VFFSL(SL,"books_by_author",True)): # generated from line 21, col 3
                 books = VFFSL(SL,"books_by_author",True)[VFFSL(SL,"author",True)]
                 books = VFFSL(SL,"books_by_author",True)[VFFSL(SL,"author",True)]
-                for book in VFFSL(SL,"books",True): # generated from line 15, col 5
-                    if VFFSL(SL,"book.series",True) != VFFSL(SL,"series",True): # generated from line 16, col 5
+                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
                         series = VFFSL(SL,"book.series",True)
                         write(u'''  <tr>
   <td colspan="''')
                         series = VFFSL(SL,"book.series",True)
                         write(u'''  <tr>
   <td colspan="''')
-                        _v = VFFSL(SL,"columns1",True) # u'$columns1' on line 19, col 16
-                        if _v is not None: write(_filter(_v, rawExpr=u'$columns1')) # from line 19, col 16.
+                        _v = VFFSL(SL,"columns1",True) # u'$columns1' on line 27, col 16
+                        if _v is not None: write(_filter(_v, rawExpr=u'$columns1')) # from line 27, col 16.
                         write(u'''"><b>
   ''')
                         write(u'''"><b>
   ''')
-                        _v = VFFSL(SL,"author",True) # u'$author' on line 20, col 3
-                        if _v is not None: write(_filter(_v, rawExpr=u'$author')) # from line 20, col 3.
+                        _v = VFFSL(SL,"author",True) # u'$author' on line 28, col 3
+                        if _v is not None: write(_filter(_v, rawExpr=u'$author')) # from line 28, col 3.
                         write(u''' \u2014 <i>
 ''')
                         write(u''' \u2014 <i>
 ''')
-                        if VFFSL(SL,"book.series",True): # generated from line 21, col 3
-                            _v = VFN(VFFSL(SL,"cgi",True),"escape",False)(VFFSL(SL,"series",True), 1) # u'$cgi.escape($series, 1)' on line 22, col 1
-                            if _v is not None: write(_filter(_v, rawExpr=u'$cgi.escape($series, 1)')) # from line 22, col 1.
-                        else: # generated from line 23, col 3
+                        if VFFSL(SL,"book.series",True): # generated from line 29, col 3
+                            _v = VFN(VFFSL(SL,"cgi",True),"escape",False)(VFFSL(SL,"series",True), 1) # u'$cgi.escape($series, 1)' on line 30, col 1
+                            if _v is not None: write(_filter(_v, rawExpr=u'$cgi.escape($series, 1)')) # from line 30, col 1.
+                        else: # generated from line 31, col 3
                             write(u'''\u0412\u043d\u0435 \u0441\u0435\u0440\u0438\u0439''')
                         write(u'''  </i></b></td>
   </tr>
 ''')
                     write(u'''  <tr>
   <td><input type=checkbox name=books value="''')
                             write(u'''\u0412\u043d\u0435 \u0441\u0435\u0440\u0438\u0439''')
                         write(u'''  </i></b></td>
   </tr>
 ''')
                     write(u'''  <tr>
   <td><input type=checkbox name=books value="''')
-                    _v = VFFSL(SL,"book.id",True) # u'$book.id' on line 30, col 46
-                    if _v is not None: write(_filter(_v, rawExpr=u'$book.id')) # from line 30, col 46.
+                    _v = VFFSL(SL,"book.id",True) # u'$book.id' on line 38, col 46
+                    if _v is not None: write(_filter(_v, rawExpr=u'$book.id')) # from line 38, col 46.
                     write(u'''"></td>
 ''')
                     write(u'''"></td>
 ''')
-                    for column in VFFSL(SL,"columns",True): # generated from line 31, col 3
+                    for column in VFFSL(SL,"columns",True): # generated from line 39, col 3
                         write(u'''  <td>''')
                         write(u'''  <td>''')
-                        _v = VFN(VFFSL(SL,"cgi",True),"escape",False)(unicode(VFFSL(SL,"getattr",False)(VFFSL(SL,"book",True), VFFSL(SL,"column",True)) or '')) # u"$cgi.escape(unicode($getattr($book, $column) or ''))" on line 32, col 7
-                        if _v is not None: write(_filter(_v, rawExpr=u"$cgi.escape(unicode($getattr($book, $column) or ''))")) # from line 32, col 7.
+                        _v = VFN(VFFSL(SL,"cgi",True),"escape",False)(unicode(VFFSL(SL,"getattr",False)(VFFSL(SL,"book",True), VFFSL(SL,"column",True)) or '')) # u"$cgi.escape(unicode($getattr($book, $column) or ''))" on line 40, col 7
+                        if _v is not None: write(_filter(_v, rawExpr=u"$cgi.escape(unicode($getattr($book, $column) or ''))")) # from line 40, col 7.
                         write(u'''</td>
 ''')
                     write(u'''  </tr>
 ''')
             write(u'''  <tr>
   <td colspan="''')
                         write(u'''</td>
 ''')
                     write(u'''  </tr>
 ''')
             write(u'''  <tr>
   <td colspan="''')
-            _v = VFFSL(SL,"columns1",True) # u'$columns1' on line 38, col 16
-            if _v is not None: write(_filter(_v, rawExpr=u'$columns1')) # from line 38, col 16.
+            _v = VFFSL(SL,"columns1",True) # u'$columns1' on line 46, col 16
+            if _v is not None: write(_filter(_v, rawExpr=u'$columns1')) # from line 46, col 16.
             write(u'''" style="text-align: center"><input type="submit" value="\u0421\u043a\u0430\u0447\u0430\u0442\u044c"></td>
   </tr>
   </table>
   </form>
 ''')
             write(u'''" style="text-align: center"><input type="submit" value="\u0421\u043a\u0430\u0447\u0430\u0442\u044c"></td>
   </tr>
   </table>
   </form>
 ''')
-        else: # generated from line 42, col 1
+        else: # generated from line 50, col 1
             write(u'''  <p>\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u043d\u0438 \u043e\u0434\u043d\u043e\u0439 \u043a\u043d\u0438\u0433\u0438!</p>
 ''')
         
             write(u'''  <p>\u041d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u043e \u043d\u0438 \u043e\u0434\u043d\u043e\u0439 \u043a\u043d\u0438\u0433\u0438!</p>
 ''')
         
index 5822ce20e1f752287d034f8d45adba6fa5885886..7a78f975c001e85c7d7e7c598f0efea04168cb68 100644 (file)
@@ -1,5 +1,6 @@
 #encoding utf-8
 #import cgi
 #encoding utf-8
 #import cgi
+#from m_librarian.translations import translations
 #extends views.layout
 #attr $title = 'Список книг'
 #def body
 #extends views.layout
 #attr $title = 'Список книг'
 #def body
@@ -8,6 +9,13 @@
 #if $books_by_author
   <form action="/download/" method="POST" style="height: 80%">
   <table style="width: 100%; height: 90%">
 #if $books_by_author
   <form action="/download/" method="POST" style="height: 80%">
   <table style="width: 100%; height: 90%">
+  <tr>
+  <td>&nbsp;</td>
+  #set $_ = $getattr($translations, 'ugettext', None) or $translations.gettext
+  #for $column in $columns
+    <td style="text-align: center">$cgi.escape($_($column))</td>
+  #end for
+  </tr>
   #set $series = None
   #set $columns1 = $len($columns)+1
   #for $author in $sorted($books_by_author)
   #set $series = None
   #set $columns1 = $len($columns)+1
   #for $author in $sorted($books_by_author)