Changeset 7437


Ignore:
Timestamp:
22 Dec 2011, 17:58:29 (13 years ago)
Author:
Henrik Bettermann
Message:

Implement StudentCreateActionButton? which is probably not needed in live systems but useful for demonstration.

Location:
main/waeup.sirp/trunk/src/waeup/sirp
Files:
1 added
1 edited

Legend:

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

    r7433 r7437  
    663663
    664664class PDFActionButton(ManageActionButton):
     665    grok.order(3)
    665666    grok.context(IApplicant)
    666667    grok.require('waeup.viewApplication')
     
    714715
    715716class ApplicantManageActionButton(ManageActionButton):
     717    grok.order(1)
    716718    grok.context(IApplicant)
    717719    grok.view(ApplicantDisplayFormPage)
     
    721723
    722724class ApplicantEditActionButton(ManageActionButton):
     725    grok.order(2)
    723726    grok.context(IApplicant)
    724727    grok.view(ApplicantDisplayFormPage)
     
    732735        """
    733736        if self.context.locked:
     737            return
     738        return self.view.url(self.view.context, self.target)
     739
     740class StudentCreateActionButton(ManageActionButton):
     741    grok.order(4)
     742    grok.context(IApplicant)
     743    grok.require('waeup.manageApplication')
     744    icon = 'actionicon_entrance.png'
     745    text = 'Create student record'
     746    target ='createstudent'
     747
     748    @property
     749    def target_url(self):
     750        """Get a URL to the target...
     751        """
     752        if IWorkflowState(self.context).getState() != 'admitted':
    734753            return
    735754        return self.view.url(self.view.context, self.target)
Note: See TracChangeset for help on using the changeset viewer.