Changeset 11988 for main/waeup.ikoba/trunk/src/waeup/ikoba
- Timestamp:
- 19 Nov 2014, 07:41:26 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.ikoba/trunk/src/waeup/ikoba/customers/files.py
r11987 r11988 181 181 182 182 183 class PassportDisplay(FileDisplay):184 """Passport display viewlet.185 """186 grok.order(1)187 grok.context(ICustomer)188 grok.view(CustomerBaseDisplayFormPage)189 grok.require('waeup.viewCustomer')190 grok.template('imagedisplay')191 label = _(u'Passport Picture')192 download_name = u'passport.jpg'193 194 195 class PassportUploadManage(FileUpload):196 """Passport upload viewlet for officers.197 """198 grok.order(1)199 grok.context(ICustomer)200 grok.view(CustomerBaseManageFormPage)201 grok.require('waeup.manageCustomer')202 grok.template('imageupload')203 label = _(u'Passport Picture (jpg only)')204 mus = 1024 * 50205 download_name = u'passport.jpg'206 tab_redirect = '#tab2'207 208 209 class PassportUploadEdit(PassportUploadManage):210 """Passport upload viewlet for customers.211 """212 grok.view(CustomerFilesUploadPage)213 grok.require('waeup.uploadCustomerFile')214 215 216 183 class Image(grok.View): 217 184 """Renders images for customers. … … 219 186 grok.baseclass() 220 187 grok.name('none.jpg') 221 grok.context(ICustomer)222 grok.require('waeup.viewCustomer')223 188 download_name = u'none.jpg' 224 189 … … 245 210 return image 246 211 212 # File viewlets for customer base page 213 214 class PassportDisplay(FileDisplay): 215 """Passport display viewlet. 216 """ 217 grok.order(1) 218 grok.context(ICustomer) 219 grok.view(CustomerBaseDisplayFormPage) 220 grok.require('waeup.viewCustomer') 221 grok.template('imagedisplay') 222 label = _(u'Passport Picture') 223 download_name = u'passport.jpg' 224 225 226 class PassportUploadManage(FileUpload): 227 """Passport upload viewlet for officers. 228 """ 229 grok.order(1) 230 grok.context(ICustomer) 231 grok.view(CustomerBaseManageFormPage) 232 grok.require('waeup.manageCustomer') 233 grok.template('imageupload') 234 label = _(u'Passport Picture (jpg only)') 235 mus = 1024 * 50 236 download_name = u'passport.jpg' 237 tab_redirect = '#tab2' 238 239 240 class PassportUploadEdit(PassportUploadManage): 241 """Passport upload viewlet for customers. 242 """ 243 grok.view(CustomerFilesUploadPage) 244 grok.require('waeup.uploadCustomerFile') 245 247 246 248 247 class Passport(Image): … … 252 251 download_name = u'passport.jpg' 253 252 grok.context(ICustomer) 253 grok.require('waeup.viewCustomer') 254 255 # File viewlets for customer documents
Note: See TracChangeset for help on using the changeset viewer.