- Timestamp:
- 15 Dec 2014, 07:44:01 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/documents/fileviewlets.py
r12225 r12240 19 19 import grok 20 20 from waeup.ikoba.interfaces import MessageFactory as _ 21 21 from waeup.ikoba.interfaces import PUBLISHED 22 from waeup.ikoba.browser.layout import UtilityView 22 23 from waeup.ikoba.browser.fileviewlets import ( 23 24 FileDisplay, FileUpload, Image) … … 55 56 56 57 57 class PDFScanImage(Image ):58 class PDFScanImage(Image, UtilityView): 58 59 """Scan document. 59 60 """ … … 64 65 download_name = u'sample.pdf' 65 66 67 def render(self): 68 if self.context.state != PUBLISHED: 69 self.flash(_('The document requested has not yet been published.'), 70 type="warning") 71 self.redirect(self.url(self.context)) 72 return 73 return super(PDFScanImage, self).render() 74
Note: See TracChangeset for help on using the changeset viewer.