appy.pod: bugfix while including a PDF file into a document; ease the inclusion of Plone images from a Plone/Zope DB through 'do text from document' statements; appy.gen: added obj.mayAct method that allows to display conditionnally the column 'Actions' when an object is shown in a list (query or ref); improved navigation from sub-objects to parent objects; improved layout.

This commit is contained in:
Gaetan Delannay 2012-02-23 15:58:06 +01:00
parent 9c5f92337b
commit 13f3400577
9 changed files with 90 additions and 62 deletions

View file

@ -146,7 +146,7 @@ class PdfImporter(DocImporter):
if os.path.exists(nextImage):
# Use internally an Image importer for doing this job.
imgImporter =ImageImporter(None, nextImage, 'jpg',self.renderer)
imgImporter.setAnchor('paragraph')
imgImporter.setImageInfo('paragraph', True, None, None, None)
self.res += imgImporter.run()
os.remove(nextImage)
else:

View file

@ -297,6 +297,9 @@ class Renderer:
# Guess document format
if isinstance(content, FileWrapper):
format = content.mimeType
elif hasattr(content, 'filename') and content.filename:
format = os.path.splitext(content.filename)[1][1:]
content = content.data
if not format:
# It should be deduced from p_at
if not at: