Ignore:
Timestamp:
31 Aug 2013, 08:19:05 (11 years ago)
Author:
Henrik Bettermann
Message:

UG programmes (utme and de) are in affiliation with Ibadan. Use appropriate header in slips.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.fceokene/trunk/src/waeup/fceokene/applicants/browser.py

    r10533 r10570  
    2626    PaymentReceiptActionButton, PDFActionButton)
    2727from waeup.kofa.applicants.pdf import PDFApplicationSlip
     28from waeup.kofa.interfaces import IKofaUtils
     29from waeup.kofa.browser.interfaces import IPDFCreator
    2830
    2931from kofacustom.nigeria.applicants.browser import (
    3032    NigeriaExportPDFPaymentSlipPage, NigeriaApplicantManageFormPage,
    3133    NigeriaApplicantDisplayFormPage, NigeriaApplicantEditFormPage)
     34
     35from waeup.fceokene.interfaces import MessageFactory as _
    3236
    3337from kofacustom.nigeria.applicants.interfaces import (
     
    8084    def _reduced_slip(self):
    8185        return getattr(self.context, 'result_uploaded', False)
     86
     87    def _getPDFCreator(self):
     88        if 'putme' in self.target or 'pude' in self.target:
     89            return getUtility(IPDFCreator, name='ibadan_pdfcreator')
     90        return getUtility(IPDFCreator)
     91
     92    @property
     93    def title(self):
     94        container_title = self.context.__parent__.title
     95        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
     96        ar_translation = translate(_('Application Record'),
     97            'waeup.kofa', target_language=portal_language)
     98        if 'putme' in self.target or 'pude' in self.target:
     99            return 'IN AFFILIATION WITH UNIVERSITY OF IBADAN - %s %s %s' % (
     100                container_title, ar_translation,
     101                self.context.application_number)
     102        return '%s - %s %s' % (container_title,
     103            ar_translation, self.context.application_number)
     104
    82105
    83106    @property
Note: See TracChangeset for help on using the changeset viewer.