Ignore:
Timestamp:
8 Mar 2012, 22:28:46 (13 years ago)
Author:
Henrik Bettermann
Message:

KOFA -> Kofa

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

Legend:

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

    r7811 r7819  
    2727from hurry.workflow.interfaces import IWorkflowInfo, IWorkflowState
    2828from waeup.kofa.app import University
    29 from waeup.kofa.image import KOFAImageFile
     29from waeup.kofa.image import KofaImageFile
    3030from waeup.kofa.imagestorage import DefaultFileStoreHandler
    3131from waeup.kofa.interfaces import (
    32     IObjectHistory, IFileStoreHandler, IFileStoreNameChooser, IKOFAUtils,
     32    IObjectHistory, IFileStoreHandler, IFileStoreNameChooser, IKofaUtils,
    3333    IExtFileStore, IPDF, IUserAccount)
    3434from waeup.kofa.students.vocabularies import RegNumNotInSource
     
    7676    def display_fullname(self):
    7777        middlename = getattr(self, 'middlename', None)
    78         kofa_utils = getUtility(IKOFAUtils)
     78        kofa_utils = getUtility(IKofaUtils)
    7979        return kofa_utils.fullname(self.firstname, self.lastname, middlename)
    8080
     
    291291            ApplicantImageStoreHandler, self).createFile(
    292292            store, root,  filename, file_id, file)
    293         return file, path, KOFAImageFile(
     293        return file, path, KofaImageFile(
    294294            file_obj.filename, file_obj.data)
    295295
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/browser.py

    r7811 r7819  
    3535from waeup.kofa.applicants.workflow import INITIALIZED, STARTED, PAID, SUBMITTED
    3636from waeup.kofa.browser import (
    37     KOFAPage, KOFAEditFormPage, KOFAAddFormPage, KOFADisplayFormPage,
     37    KofaPage, KofaEditFormPage, KofaAddFormPage, KofaDisplayFormPage,
    3838    DEFAULT_PASSPORT_IMAGE_PATH)
    3939from waeup.kofa.browser.interfaces import ICaptchaManager
     
    4444from waeup.kofa.browser.resources import datepicker, tabs, datatable, warning
    4545from waeup.kofa.interfaces import (
    46     IKOFAObject, ILocalRolesAssignable, IExtFileStore, IPDF,
    47     IFileStoreNameChooser, IPasswordValidator, IUserAccount, IKOFAUtils)
     46    IKofaObject, ILocalRolesAssignable, IExtFileStore, IPDF,
     47    IFileStoreNameChooser, IPasswordValidator, IUserAccount, IKofaUtils)
    4848from waeup.kofa.interfaces import MessageFactory as _
    4949from waeup.kofa.permissions import get_users_with_local_roles
     
    5656from waeup.kofa.widgets.restwidget import ReSTDisplayWidget
    5757
    58 grok.context(IKOFAObject) # Make IKOFAObject the default context
    59 
    60 class ApplicantsRootPage(KOFAPage):
     58grok.context(IKofaObject) # Make IKofaObject the default context
     59
     60class ApplicantsRootPage(KofaPage):
    6161    grok.context(IApplicantsRoot)
    6262    grok.name('index')
     
    7070        return
    7171
    72 class ApplicantsRootManageFormPage(KOFAEditFormPage):
     72class ApplicantsRootManageFormPage(KofaEditFormPage):
    7373    grok.context(IApplicantsRoot)
    7474    grok.name('manage')
     
    141141        return del_local_roles(self,3,**data)
    142142
    143 class ApplicantsContainerAddFormPage(KOFAAddFormPage):
     143class ApplicantsContainerAddFormPage(KofaAddFormPage):
    144144    grok.context(IApplicantsRoot)
    145145    grok.require('waeup.manageApplication')
     
    215215        return self.context.p_id
    216216
    217 class ApplicantsContainerPage(KOFADisplayFormPage):
     217class ApplicantsContainerPage(KofaDisplayFormPage):
    218218    """The standard view for regular applicant containers.
    219219    """
     
    232232    @property
    233233    def introduction(self):
    234         portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     234        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    235235        lang = self.request.cookies.get('kofa.language', portal_language)
    236236        html = self.context.description_dict.get(lang,'')
     
    246246        return "%s" % self.context.title
    247247
    248 class ApplicantsContainerManageFormPage(KOFAEditFormPage):
     248class ApplicantsContainerManageFormPage(KofaEditFormPage):
    249249    grok.context(IApplicantsContainer)
    250250    grok.name('manage')
     
    349349        return del_local_roles(self,3,**data)
    350350
    351 class ApplicantAddFormPage(KOFAAddFormPage):
     351class ApplicantAddFormPage(KofaAddFormPage):
    352352    """Add-form to add an applicant.
    353353    """
     
    372372        return
    373373
    374 class ApplicantDisplayFormPage(KOFADisplayFormPage):
     374class ApplicantDisplayFormPage(KofaDisplayFormPage):
    375375    grok.context(IApplicant)
    376376    grok.name('index')
     
    484484
    485485
    486 class OnlinePaymentDisplayFormPage(KOFADisplayFormPage):
     486class OnlinePaymentDisplayFormPage(KofaDisplayFormPage):
    487487    """ Page to view an online payment ticket
    488488    """
     
    547547    @property
    548548    def title(self):
    549         portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     549        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    550550        return translate(_('Payment Data'), 'waeup.kofa',
    551551            target_language=portal_language)
     
    553553    @property
    554554    def label(self):
    555         portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     555        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    556556        return translate(_('Online Payment Receipt'),
    557557            'waeup.kofa', target_language=portal_language) \
     
    582582    #@property
    583583    #def label(self):
    584     #    portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     584    #    portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    585585    #    container_title = self.context.__parent__.title
    586586    #    label = translate('Application Record',
     
    638638    return True
    639639
    640 class ApplicantManageFormPage(KOFAEditFormPage):
     640class ApplicantManageFormPage(KofaEditFormPage):
    641641    """A full edit view for applicant data.
    642642    """
     
    883883        return image
    884884
    885 class ApplicantRegistrationPage(KOFAAddFormPage):
     885class ApplicantRegistrationPage(KofaAddFormPage):
    886886    """Captcha'd registration page for applicants.
    887887    """
     
    926926        self.applyData(applicant, **data)
    927927        self.context.addApplicant(applicant)
    928         kofa_utils = getUtility(IKOFAUtils)
     928        kofa_utils = getUtility(IKofaUtils)
    929929        password = kofa_utils.genPassword()
    930930        IUserAccount(applicant).setPassword(password)
     
    941941        return
    942942
    943 class ApplicantRegistrationEmailSent(KOFAPage):
     943class ApplicantRegistrationEmailSent(KofaPage):
    944944    """Landing page after successful registration.
    945945    """
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/interfaces.py

    r7811 r7819  
    2929from waeup.kofa.schema import TextLineChoice
    3030from waeup.kofa.interfaces import (
    31     IKOFAObject, year_range, validate_email, academic_sessions_vocab)
     31    IKofaObject, year_range, validate_email, academic_sessions_vocab)
    3232from waeup.kofa.interfaces import MessageFactory as _
    3333from waeup.kofa.payments.interfaces import IOnlinePayment
     
    178178    pass
    179179
    180 class IApplicantsRoot(IKOFAObject, IContainer):
     180class IApplicantsRoot(IKofaObject, IContainer):
    181181    """A container for university applicants containers.
    182182    """
    183183    pass
    184184
    185 class IApplicantsContainer(IKOFAObject):
     185class IApplicantsContainer(IKofaObject):
    186186    """An applicants container contains university applicants.
    187187
     
    352352    'provider'].order =  IApplicantsContainer['provider'].order
    353353
    354 class IApplicantBaseData(IKOFAObject):
     354class IApplicantBaseData(IKofaObject):
    355355    """The data for an applicant.
    356356
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/pdf.py

    r7811 r7819  
    3434from waeup.kofa.applicants.interfaces import IApplicant
    3535from waeup.kofa.browser import DEFAULT_PASSPORT_IMAGE_PATH
    36 from waeup.kofa.interfaces import IExtFileStore, IPDF, IKOFAUtils
     36from waeup.kofa.interfaces import IExtFileStore, IPDF, IKofaUtils
    3737from waeup.kofa.interfaces import MessageFactory as _
    3838
     
    5454    def title(self):
    5555        container_title = self.context.__parent__.title
    56         portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     56        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    5757        ar_translation = translate(_('Application Record'),
    5858            'waeup.kofa', target_language=portal_language)
     
    107107        if dept is None:
    108108            return data
    109         portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     109        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    110110        dp_translation = translate(_('Department:'),
    111111            'waeup.kofa', target_language=portal_language)
     
    145145            pdf.setAuthor('%s (%s)' % (view.request.principal.title,
    146146                view.request.principal.id))
    147         pdf.setCreator('KOFA')
     147        pdf.setCreator('Kofa')
    148148        width, height = A4
    149149        style = getSampleStyleSheet()
     
    171171        # Render widget fields
    172172        widgets = self._setUpWidgets()
    173         portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     173        portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE
    174174        for widget in widgets: # self.widgets:
    175175            f_label = '<font size=12>%s</font>:' % translate(
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/root.py

    r7811 r7819  
    2323from hurry.query.interfaces import IQuery
    2424from zope.component import getUtility
    25 from waeup.kofa.interfaces import IKOFAPluggable
     25from waeup.kofa.interfaces import IKofaPluggable
    2626from waeup.kofa.applicants.interfaces import IApplicantsRoot
    2727from waeup.kofa.utils.logger import Logger
     
    4646
    4747class ApplicantsPlugin(grok.GlobalUtility):
    48     """A KOFAPlugin that creates an applicants root in portal.
     48    """A KofaPlugin that creates an applicants root in portal.
    4949
    5050    This plugin should be called by a typical
     
    5353    the main site configuration.
    5454
    55     Implements :class:`waeup.kofa.interfaces.IKOFAPluggable`
     55    Implements :class:`waeup.kofa.interfaces.IKofaPluggable`
    5656    """
    5757    grok.name('applicants')
    58     grok.implements(IKOFAPluggable)
     58    grok.implements(IKofaPluggable)
    5959    log_prefix = 'ApplicantsPlugin'
    6060
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/tests/test_applicant.py

    r7811 r7819  
    2626from zope.interface import verify, implements
    2727from zope.location.interfaces import ILocation
    28 from waeup.kofa.image.interfaces import IKOFAImageFile
     28from waeup.kofa.image.interfaces import IKofaImageFile
    2929from waeup.kofa.imagestorage import DefaultStorage
    3030from waeup.kofa.interfaces import IFileStoreHandler, IFileStoreNameChooser
     
    3838class FakeImageLocation(object):
    3939    implements(ILocation)
    40     adapts(IKOFAImageFile)
     40    adapts(IKofaImageFile)
    4141    def __init__(self, context):
    4242        pass
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/viewlets.py

    r7811 r7819  
    1818import grok
    1919from hurry.workflow.interfaces import IWorkflowState
    20 from waeup.kofa.interfaces import IKOFAObject
     20from waeup.kofa.interfaces import IKofaObject
    2121from waeup.kofa.students.viewlets import PrimaryStudentNavTab
    2222from waeup.kofa.browser.viewlets import ManageActionButton, PrimaryNavTab
     
    3232from waeup.kofa.interfaces import MessageFactory as _
    3333
    34 grok.context(IKOFAObject) # Make IKOFAObject the default context
     34grok.context(IKofaObject) # Make IKofaObject the default context
    3535grok.templatedir('browser_templates')
    3636
     
    3838    """Applicants tab in primary navigation.
    3939    """
    40     grok.context(IKOFAObject)
     40    grok.context(IKofaObject)
    4141    grok.order(3)
    4242    grok.require('waeup.viewApplicantsTab')
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/workflow.py

    r7811 r7819  
    2222from hurry.workflow.interfaces import IWorkflowState, IWorkflowTransitionEvent
    2323from waeup.kofa.applicants.interfaces import IApplicantBaseData
    24 from waeup.kofa.interfaces import IObjectHistory, IKOFAWorkflowInfo, IKOFAUtils
     24from waeup.kofa.interfaces import IObjectHistory, IKofaWorkflowInfo, IKofaUtils
    2525from waeup.kofa.interfaces import MessageFactory as _
    26 from waeup.kofa.workflow import KOFAWorkflow, KOFAWorkflowInfo
     26from waeup.kofa.workflow import KofaWorkflow, KofaWorkflowInfo
    2727
    2828INITIALIZED = 'initialized'
     
    137137    )
    138138
    139 application_workflow = KOFAWorkflow(APPLICATION_TRANSITIONS)
     139application_workflow = KofaWorkflow(APPLICATION_TRANSITIONS)
    140140
    141141class ApplicationWorkflowState(WorkflowState, grok.Adapter):
     
    148148    state_id = 'wf.application.id'
    149149
    150 class ApplicationWorkflowInfo(KOFAWorkflowInfo, grok.Adapter):
     150class ApplicationWorkflowInfo(KofaWorkflowInfo, grok.Adapter):
    151151    """Adapter to adapt Applicant objects to workflow info objects.
    152152    """
    153153    grok.context(IApplicantBaseData)
    154     grok.provides(IKOFAWorkflowInfo)
     154    grok.provides(IKofaWorkflowInfo)
    155155
    156156    def __init__(self, context):
Note: See TracChangeset for help on using the changeset viewer.