Changeset 489:55e3398e395e in documentViewer
- Timestamp:
- Aug 25, 2011, 3:05:22 PM (13 years ago)
- Branch:
- elementtree
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
css/docuviewer.css
r488 r489 16 16 } 17 17 18 div. col-left.text{18 div.toc-text, div.toc-figures { 19 19 max-width: 20em; 20 20 } -
documentViewer.py
r488 r489 3 3 from Products.PageTemplates.PageTemplateFile import PageTemplateFile 4 4 from App.ImageFile import ImageFile 5 from App.Common import rfc1123_date 5 6 #from Products.ZSimpleFile.ZSimpleFile import ZSimpleFile 6 7 from AccessControl import ClassSecurityInfo … … 10 11 import xml.etree.ElementTree as ET 11 12 12 import os.path 13 import os 14 import stat 13 15 import sys 14 16 import urllib … … 105 107 return '/'.join(path.split('/')[0:-cnt]) 106 108 109 def devImageFileIndexHtml(self, REQUEST, RESPONSE): 110 """index_html method for App.ImageFile that updates the file info for each request.""" 111 stat_info = os.stat(self.path) 112 self.size = stat_info[stat.ST_SIZE] 113 self.lmt = float(stat_info[stat.ST_MTIME]) or time.time() 114 self.lmh = rfc1123_date(self.lmt) 115 # call original method 116 return ImageFile.index_html(self, REQUEST, RESPONSE) 107 117 108 118 ## … … 137 147 head_main = PageTemplateFile('zpt/head_main', globals()) 138 148 info_xml = PageTemplateFile('zpt/info_xml', globals()) 139 # TODO: can this be nicer?140 149 docuviewer_css = ImageFile('css/docuviewer.css',globals()) 150 # make ImageFile better for development 151 docuviewer_css.index_html = devImageFileIndexHtml 141 152 142 153 -
zpt/head_main.zpt
r480 r489 13 13 bib docinfo/bib | nothing; bibType docinfo/bibType | nothing; 14 14 formattedLabel python:here.metadataService.getBibFormattedLabel(bibdata=bib);"> 15 < spantal:condition="not:formattedLabel"15 <div tal:condition="not:formattedLabel" 16 16 tal:content="string:(no bibliographical information for ${bibType})" /> 17 < spantal:condition="formattedLabel" tal:content="structure formattedLabel" />17 <div tal:condition="formattedLabel" tal:content="structure formattedLabel" /> 18 18 </metal:block> 19 19 </body> -
zpt/toc_figures.zpt
r488 r489 7 7 <body> 8 8 <!-- block used for main content area --> 9 <div class=" col-left" metal:define-macro="main"9 <div class="toc-figures" metal:define-macro="main" 10 10 tal:define="start pageinfo/start; tocsize docinfo/tocSize_figures; grpsize pageinfo/tocPageSize; 11 11 batch python:here.getBatch(start=start,size=grpsize,end=tocsize);"> -
zpt/toc_text.zpt
r488 r489 7 7 <body> 8 8 <!-- block used for main content area --> 9 <div class=" col-left" metal:define-macro="main"9 <div class="toc-text" metal:define-macro="main" 10 10 tal:define="start pageinfo/start; tocsize docinfo/tocSize_text; grpsize pageinfo/tocPageSize; 11 11 batch python:here.getBatch(start=start,size=grpsize,end=tocsize);"> -
zpt/toc_thumbs.zpt
r488 r489 7 7 <body> 8 8 <!-- block used for main content area --> 9 <div class=" col-left" metal:define-macro="main"9 <div class="toc-thumbs" metal:define-macro="main" 10 10 tal:define="start pageinfo/start; 11 11 grpsize pageinfo/groupsize; -
zpt/viewer_images.zpt
r485 r489 54 54 <div class="page-body" tal:condition="python:here.isAccessible(docinfo)"> 55 55 <!--table of contents--> 56 <div class="col-left" metal:use-macro="python:path('here/template/toc_%s/macros/main'%tocMode)" /> 56 <div class="col-left"> 57 <metal:block metal:use-macro="python:path('here/template/toc_%s/macros/main'%tocMode)" /> 58 </div> 57 59 <!-- text page --> 58 60 <div class="col-main"> -
zpt/viewer_text.zpt
r485 r489 22 22 <div class="page-body" tal:condition="python:here.isAccessible(docinfo)"> 23 23 <!--table of contents--> 24 <div class="col-left" 25 metal:use-macro="python:path('here/template/toc_%s/macros/main'%tocMode)" /> 24 <div class="col-left"> 25 <metal:block metal:use-macro="python:path('here/template/toc_%s/macros/main'%tocMode)" /> 26 </div> 26 27 27 28 <!-- text page -->
Note: See TracChangeset
for help on using the changeset viewer.