Changeset 12444 for main/waeup.ikoba/trunk/src/waeup/ikoba/browser
- Timestamp:
- 11 Jan 2015, 22:43:35 (10 years ago)
- Location:
- main/waeup.ikoba/trunk/src/waeup/ikoba/browser
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/browser/fileviewlets.py
r12386 r12444 109 109 label = _(u'File') 110 110 title = _(u'Scan') 111 download_name = u'filename.jpg' 111 download_name = None 112 113 @property 114 def download_filename(self): 115 return u"%s.pdf" % self.context.document_id[:9] 112 116 113 117 @property … … 131 135 upload_button =_('Upload selected file') 132 136 delete_button = _('Delete') 137 138 @property 139 def download_filename(self): 140 return u"%s.pdf" % self.context.document_id[:9] 133 141 134 142 @property … … 175 183 """ 176 184 grok.baseclass() 177 grok.name('none.jpg') 178 download_name = u'none.jpg' 185 download_name = None 186 187 @property 188 def download_filename(self): 189 return u"%s.pdf" % self.context.document_id[:9] 179 190 180 191 def render(self): … … 198 209 elif ext == '.tif': 199 210 self.response.setHeader('Content-Type', 'image/tiff') 211 if self.download_filename: 212 self.response.setHeader('Content-Disposition', 213 'attachment; filename="%s' % self.download_filename) 200 214 return image -
main/waeup.ikoba/trunk/src/waeup/ikoba/browser/templates/filedisplay.pt
r12242 r12444 5 5 <td> 6 6 <a tal:attributes="href python: view.url(context, viewlet.download_name)" 7 tal:content="viewlet/download_ name"7 tal:content="viewlet/download_filename" 8 8 target="image"> 9 9 LINK -
main/waeup.ikoba/trunk/src/waeup/ikoba/browser/templates/fileupload.pt
r11949 r12444 7 7 <tal:file tal:condition="viewlet/file_exists"> 8 8 <a tal:attributes="href python: view.url(context, viewlet.download_name)" 9 tal:content="viewlet/ title"9 tal:content="viewlet/download_filename" 10 10 target="image"> 11 11 LINK
Note: See TracChangeset for help on using the changeset viewer.