- Timestamp:
- 1 Feb 2015, 07:11:07 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/ikobacustom.pcn/trunk/src/ikobacustom/pcn/customers/fileviewlets.py
r12460 r12534 19 19 import grok 20 20 from waeup.ikoba.interfaces import MessageFactory as _ 21 21 from waeup.ikoba.customers.interfaces import ICustomer 22 22 from waeup.ikoba.browser.fileviewlets import ( 23 23 FileDisplay, FileUpload, Image) … … 27 27 28 28 from waeup.ikoba.customers.browser import ( 29 CustomerBaseDisplayFormPage, 30 CustomerBaseManageFormPage, 31 CustomerFilesUploadPage, 29 32 DocumentDisplayFormPage, 30 33 DocumentManageFormPage, 31 34 DocumentEditFormPage, 32 PDFDocumentSlipPage ,)35 PDFDocumentSlipPage) 33 36 34 37 grok.templatedir('browser_templates') 38 39 # File viewlets for customer base page 40 41 class BirthCertificateDisplay(FileDisplay): 42 """Birth certificate display viewlet. 43 """ 44 grok.order(2) 45 grok.context(ICustomer) 46 grok.view(CustomerBaseDisplayFormPage) 47 grok.require('waeup.viewCustomer') 48 label = _(u'Birth Certificate') 49 download_name = u'birth_certificate.pdf' 50 download_filename = u'birth_certificate.pdf' 51 52 53 class BirthCertificateManageUpload(FileUpload): 54 """Birth Certificate upload viewlet for officers. 55 """ 56 grok.order(2) 57 grok.context(ICustomer) 58 grok.view(CustomerBaseManageFormPage) 59 grok.require('waeup.manageCustomer') 60 label = _(u'Birth Certificate (pdf only)') 61 mus = 1024 * 200 62 download_name = u'birth_certificate.pdf' 63 download_filename = u'birth_certificate.pdf' 64 tab_redirect = '#tab2' 65 66 67 class BirthCertificateEditUpload(BirthCertificateManageUpload): 68 """Birth certificate upload viewlet for customers. 69 """ 70 grok.view(CustomerFilesUploadPage) 71 grok.require('waeup.handleCustomer') 72 73 74 class BirthCertificate(Image): 75 """Renders pdf. 76 """ 77 grok.name('birth_certificate.pdf') 78 download_name = u'birth_certificate.pdf' 79 grok.context(ICustomer) 80 grok.require('waeup.viewCustomer') 81 download_filename = u'birth_certificate.pdf' 35 82 36 83 # File viewlets for customer documents
Note: See TracChangeset for help on using the changeset viewer.