Ignore:
Timestamp:
22 May 2013, 07:34:47 (11 years ago)
Author:
Henrik Bettermann
Message:

Prepare getTitle for customization.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/applicants
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/interfaces.py

    r10184 r10186  
    104104        return result
    105105
     106    def getTitle(self, context, value):
     107        return getUtility(
     108            IApplicantsUtils).getCertTitle(context, value)
     109
    106110class ApplicationTypeSource(BasicContextualSourceFactory):
    107111    """An application type source delivers screening types defined in the
     
    163167        """
    164168
     169    def getCertTitle(context, value):
     170        """Compose the titles in AppCatCertificateSource.
     171        """
     172
    165173class IApplicantsRoot(IKofaObject, IContainer):
    166174    """A container for university applicants containers.
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/utils.py

    r10184 r10186  
    7979
    8080    def filterCertificates(self, resultset):
    81         """Filter and sort certificates for AppCatCertificateSource.
     81        """Filter and sort certificates in AppCatCertificateSource.
    8282        """
    8383        return sorted(resultset, key=lambda value: value.code)
     84
     85    def getCertTitle(self, context, value):
     86        """Compose the titles in AppCatCertificateSource.
     87        """
     88        return "%s - %s" % (value.code, value.title)
Note: See TracChangeset for help on using the changeset viewer.