Changeset 541:c4cc01b104d7 in documentViewer
- Timestamp:
- Aug 20, 2012, 6:13:56 PM (12 years ago)
- Branch:
- default
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
documentViewer.py
r538 r541 18 18 import string 19 19 import json 20 21 from Products.MetaDataProvider import MetaDataFolder 20 22 21 23 from SrvTxtUtils import getInt, utf8ify, getText, getHttpData, refreshingImageFileIndexHtml … … 554 556 bib = self.metadataService.getBibData(dom=metaDom) 555 557 if bib: 556 docinfo = self.getDocinfoFromBib(docinfo, bib) 558 # save extended version as 'bibx' 559 bibx = self.metadataService.getBibData(dom=metaDom, all=True, recursive=1) 560 if len(bibx) == 1: 561 # unwrap list if possible 562 bibx = bibx[0] 563 564 docinfo['bibx'] = bibx 565 docinfo = self.getDocinfoFromBib(docinfo, bib, bibx) 557 566 else: 558 567 # no bib - try info.xml … … 668 677 docinfo['oddPage'] = texttool.get('odd-scan-position', 'left') 669 678 670 # number of title page ( 0: not defined)671 docinfo['titlePage'] = texttool.get('title-scan-no', 0)679 # number of title page (default 1) 680 docinfo['titlePage'] = texttool.get('title-scan-no', 1) 672 681 673 682 # old presentation stuff … … 681 690 return docinfo 682 691 683 def getDocinfoFromBib(self, docinfo, bib ):692 def getDocinfoFromBib(self, docinfo, bib, bibx=None): 684 693 """reads contents of bib element into docinfo""" 685 694 logging.debug("getDocinfoFromBib bib=%s"%repr(bib)) -
zpt/viewer_index.zpt
r540 r541 33 33 <h2>Bibliographical information</h2> 34 34 <table border="0" 35 tal:define="formattedData python:here.metadata.getBibFormattedMetaDataExtended(bibdata=docinfo.get('bib', None) )">35 tal:define="formattedData python:here.metadata.getBibFormattedMetaDataExtended(bibdata=docinfo.get('bib', None),bibxdata=docinfo.get('bibx', None))"> 36 36 <tal:x condition="python:formattedData"> 37 37 <!-- wenn es bibinfo in docinfo gibt --> … … 100 100 <tr> 101 101 <td class="type">License:</td> 102 <td class="content"><a href="http://creativecommons.org/licenses/by-sa/3.0/de/">CC-BY-SA</a> </td>102 <td class="content"><a href="http://creativecommons.org/licenses/by-sa/3.0/de/">CC-BY-SA</a> (unless otherwise stated)</td> 103 103 </tr> 104 104 </table>
Note: See TracChangeset
for help on using the changeset viewer.