Changeset 609:7962e6891d99 in documentViewer
- Timestamp:
- Jan 15, 2013, 5:15:32 PM (12 years ago)
- Branch:
- default
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
MpiwgXmlTextServer.py
r587 r609 96 96 97 97 field = '' 98 if mode in ['pages', 'toc', 'figures', ' handwritten']:98 if mode in ['pages', 'toc', 'figures', 'notes', 'handwritten']: 99 99 # translate mode to field param 100 field = '&field=%s'%mode 100 if mode == 'handwritten': 101 field = '&field=notesHandwritten' 102 else: 103 field = '&field=%s'%mode 101 104 else: 102 105 mode = None … … 132 135 docinfo['numTextPages'] = getInt(getText(sys.find('countPages'))) 133 136 docinfo['numFigureEntries'] = getInt(getText(sys.find('countFigures'))) 134 docinfo['numHandwritten'] = getInt(getText(sys.find('countHandwritten'))) 137 docinfo['numHandwritten'] = getInt(getText(sys.find('countNotesHandwritten'))) 138 docinfo['numNotes'] = getInt(getText(sys.find('countNotes'))) 139 docinfo['numPlaces'] = getInt(getText(sys.find('countPlaces'))) 135 140 docinfo['numTocEntries'] = getInt(getText(sys.find('countTocEntries'))) 136 141 … … 162 167 163 168 # toc 164 elif lt == 'toc' or lt == 'figures' or lt == 'handwritten':169 elif lt in ['toc', 'figures', 'notes', 'notesHandwritten']: 165 170 # contains tags with table of contents/figures 166 171 # <item n="2.1." lv="2">CAP.I. <ref o="119">132</ref></item> … … 661 666 tocs = fulltoc[first:last] 662 667 tp = '<div>' 663 label = {'figures': 'Figure', ' handwritten': 'Handwritten note'}.get(mode, 'Item')668 label = {'figures': 'Figure', 'notes': 'Note', 'handwritten': 'Handwritten note'}.get(mode, 'Item') 664 669 for toc in tocs: 665 670 pageurl = self.getLink('pn', toc['pn']) 666 671 tp += '<div class="tocline">' 667 672 content = toc['content'] 673 lvs = toc['level-string'] 668 674 if content: 669 tp += '<div class="toc name">[%s] %s</div>'%(toc['level-string'], toc['content']) 675 tp += '<div class="toc name">[%s] %s</div>'%(lvs, toc['content']) 676 elif lvs: 677 tp += '<div class="toc name">[%s %s]</div>'%(label, lvs) 670 678 else: 671 tp += '<div class="toc name">[%s %s]</div>'%(label, toc['level-string'])679 tp += '<div class="toc name">[%s]</div>'%(label) 672 680 673 681 if toc.get('no', None): -
css/docuviewer.css
r608 r609 102 102 -o-transform-origin: top left; 103 103 left: 7px; 104 top: 34em;105 width: 4 0em;104 top: 42em; 105 width: 45em; 106 106 padding: 0px; 107 107 } -
documentViewer.py
r608 r609 120 120 toc_figures = PageTemplateFile('zpt/viewer/toc_figures', globals()) 121 121 toc_concordance = PageTemplateFile('zpt/viewer/toc_concordance', globals()) 122 toc_notes = PageTemplateFile('zpt/viewer/toc_notes', globals()) 122 123 toc_handwritten = PageTemplateFile('zpt/viewer/toc_handwritten', globals()) 123 124 toc_none = PageTemplateFile('zpt/viewer/toc_none', globals()) -
version.txt
r607 r609 1 DocumentViewer 2.2.1 01 DocumentViewer 2.2.11 -
zpt/viewer/common_template.zpt
r608 r609 116 116 tal:condition="python:docpath and docinfo.get('pageNumbers', None)"><span><a 117 117 tal:omit-tag="python:tocMode=='concordance'" tal:attributes="href python:here.getLink('tocMode','concordance')">Concordance</a></span></li> 118 <li tal:attributes="class python:here.getStyle(tocMode, 'notes')" 119 tal:condition="python:docpath and docinfo.get('numNotes', None)"><span><a 120 tal:omit-tag="python:tocMode=='notes'" tal:attributes="href python:here.getLink('tocMode','notes')">Notes</a></span></li> 118 121 <li tal:attributes="class python:here.getStyle(tocMode, 'handwritten')" 119 122 tal:condition="python:docpath and docinfo.get('numHandwritten', None)"><span><a 120 tal:omit-tag="python:tocMode=='handwritten'" tal:attributes="href python:here.getLink('tocMode','handwritten')"> Notes</a></span></li>123 tal:omit-tag="python:tocMode=='handwritten'" tal:attributes="href python:here.getLink('tocMode','handwritten')">Handwritten</a></span></li> 121 124 <li tal:attributes="class python:here.getStyle(tocMode, 'figures')" 122 125 tal:condition="python:docpath and docinfo.get('numFigureEntries', None)"><span><a
Note: See TracChangeset
for help on using the changeset viewer.