Ignore:
Timestamp:
19 Nov 2014, 07:41:26 (10 years ago)
Author:
Henrik Bettermann
Message:

Reorder viewlet classes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.ikoba/trunk/src/waeup/ikoba/customers/files.py

    r11987 r11988  
    181181
    182182
    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 * 50
    205     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 
    216183class Image(grok.View):
    217184    """Renders images for customers.
     
    219186    grok.baseclass()
    220187    grok.name('none.jpg')
    221     grok.context(ICustomer)
    222     grok.require('waeup.viewCustomer')
    223188    download_name = u'none.jpg'
    224189
     
    245210        return image
    246211
     212# File viewlets for customer base page
     213
     214class 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
     226class 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
     240class PassportUploadEdit(PassportUploadManage):
     241    """Passport upload viewlet for customers.
     242    """
     243    grok.view(CustomerFilesUploadPage)
     244    grok.require('waeup.uploadCustomerFile')
     245
    247246
    248247class Passport(Image):
     
    252251    download_name = u'passport.jpg'
    253252    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.