Changeset 9950 for main/waeup.fceokene
- Timestamp:
- 15 Feb 2013, 06:54:39 (12 years ago)
- Location:
- main/waeup.fceokene/trunk/src/waeup/fceokene
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.fceokene/trunk/src/waeup/fceokene/browser/pdf.py
r8639 r9950 21 21 22 22 import os 23 import grok 23 24 from waeup.kofa.browser.pdf import PDFCreator 24 25 25 class CustomPDFCreator(PDFCreator): 26 """A utility to help with generating PDF docs. 27 """ 26 class DefaultPDFCreator(PDFCreator): 28 27 29 #header_logo_path = os.path.join( 30 # os.path.dirname(__file__), 'static', 'pdf_logo.jpg') 31 #watermark_path = os.path.join( 32 # os.path.dirname(__file__), 'static', 'pdf_watermark.jpg') 28 header_logo_path = os.path.join( 29 os.path.dirname(__file__), 'static', 'pdf_logo.jpg') 33 30 34 #watermark_pos = [-25, 100] 35 #logo_pos = [507, 720, 40] 31 logo_pos = [510, 750, 60] 32 33 class IbadanPDFCreator(PDFCreator): 34 35 grok.name('ibadan_pdfcreator') 36 37 header_logo_path = os.path.join( 38 os.path.dirname(__file__), 'static', 'pdf_logo_2.jpg') 39 40 logo_pos = [480, 740, 90] 41 -
main/waeup.fceokene/trunk/src/waeup/fceokene/students/utils.py
r9923 r9950 19 19 import random 20 20 from time import time 21 from zope.component import createObject 21 from zope.component import createObject, getUtility 22 22 from waeup.kofa.interfaces import CLEARED, RETURNING, PAID 23 23 from kofacustom.nigeria.students.utils import NigeriaStudentsUtils … … 25 25 from waeup.kofa.interfaces import CLEARED, RETURNING 26 26 from waeup.fceokene.interfaces import MessageFactory as _ 27 from waeup.kofa.browser.interfaces import IPDFCreator 27 28 28 29 class CustomStudentsUtils(NigeriaStudentsUtils): … … 282 283 return 58 283 284 285 def getPDFCreator(self, context): 286 """Get a pdf creator suitable for `context`. 287 288 The default implementation always returns the default creator. 289 """ 290 mode = getattr(context, 'current_mode', None) 291 if mode and mode.startswith('ug'): 292 return getUtility(IPDFCreator, name='ibadan_pdfcreator') 293 return getUtility(IPDFCreator) 294 284 295 # FCEOkene prefix 285 296 STUDENT_ID_PREFIX = u'K'
Note: See TracChangeset for help on using the changeset viewer.