Ignore:
Timestamp:
26 May 2011, 06:58:55 (13 years ago)
Author:
Henrik Bettermann
Message:

Convert waeup.local.ApplicationsOfficer? to waeup.ApplicationsOfficer?.
Change and simplify permission settings in application section.
Assign application section permissions to Portal Manager.

Actually we need a Campus Manager (Academics Section Manager) too. Then manageUniversity should be renamed to manageAcademics.

File:
1 edited

Legend:

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

    r6196 r6198  
    8989    grok.context(IApplicantsRoot)
    9090    grok.view(ApplicantsRootPage)
    91     grok.require('waeup.manageUniversity')
     91    grok.require('waeup.manageApplications')
    9292    text = 'Manage application section'
    9393
     
    9999    label = 'Manage application section'
    100100    pnav = 3
    101     grok.require('waeup.manageUniversity')
     101    grok.require('waeup.manageApplications')
    102102    taboneactions = ['Add applicants container', 'Remove selected','Cancel']
    103103    tabtwoactions1 = ['Remove selected local roles']
     
    164164class ApplicantsContainerAddFormPage(WAeUPAddFormPage):
    165165    grok.context(IApplicantsRoot)
    166     grok.require('waeup.manageUniversity')
     166    grok.require('waeup.manageApplications')
    167167    grok.name('add')
    168168    grok.template('applicantscontaineraddpage')
     
    236236    grok.context(IWAeUPObject)
    237237    grok.order(3)
    238     grok.require('waeup.manageUniversity')
     238    grok.require('waeup.manageApplications')
    239239    grok.template('primarynavtab')
    240240
     
    271271    grok.context(IApplicantsContainer)
    272272    grok.view(ApplicantsContainerPage)
     273    grok.require('waeup.manageApplications')
    273274    text = 'Manage applicants container'
    274275
     
    286287    form_fields['startdate'].custom_widget = FriendlyDateWidget('le')
    287288    form_fields['enddate'].custom_widget = FriendlyDateWidget('le')
    288     grok.require('waeup.manageUniversity')
     289    grok.require('waeup.manageApplications')
    289290
    290291    @property
     
    426427            applicant_object = get_applicant_data(access_code)
    427428            url = absoluteURL(applicant_object, self.request)
    428             return u'<div class="portlet"><a href="%s">%s</a></div>' % (
     429            return u'<div class="portlet"><a href="%s/edit">%s</a></div>' % (
    429430                url,access_code)
    430431        return ''
     
    433434    grok.context(IApplicant)
    434435    grok.name('index')
    435     grok.require('waeup.viewApplication')
     436    grok.require('waeup.handleApplication')
    436437    form_fields = grok.AutoFields(IApplicant).omit('locked')
    437438    #form_fields['fst_sit_results'].custom_widget = list_results_display_widget
     
    450451        return '%s Application Record' % container_title
    451452
     453class ApplicantsManageActionButton(ManageActionButton):
     454    grok.context(IApplicant)
     455    grok.view(DisplayApplicant)
     456    grok.require('waeup.manageApplications')
     457    text = 'Edit application record'
     458    target = 'edit_full'
     459
    452460class EditApplicantFull(WAeUPEditFormPage):
    453461    """A full edit view for applicant data.
     
    455463    grok.context(IApplicant)
    456464    grok.name('edit_full')
    457     grok.require('waeup.editFullApplication')
     465    grok.require('waeup.manageApplications')
    458466    form_fields = grok.AutoFields(IApplicant)   #.omit('locked')
    459467    form_fields['passport'].custom_widget = EncodingImageFileWidget
     
    488496    grok.context(IApplicantEdit)
    489497    grok.name('edit')
    490     grok.require('waeup.editApplication')
     498    grok.require('waeup.handleApplication')
    491499    form_fields = grok.AutoFields(IApplicantEdit).omit('locked')
    492500    form_fields['passport'].custom_widget = EncodingImageFileWidget
     
    501509    def update(self):
    502510        if self.context.locked:
    503             self.emitLockMessage()
     511            self.redirect(self.url(self.context))
    504512            return
    505513        datepicker.need() # Enable jQuery datepicker in date fields.
Note: See TracChangeset for help on using the changeset viewer.