Changeset 6367 for main/waeup.sirp/trunk
- Timestamp:
- 14 Jun 2011, 14:06:02 (14 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp/applicants
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/applicants/browser.py
r6366 r6367 422 422 return 423 423 pin = self.request.principal.access_code 424 state = IWorkflowState(self.context[pin]).getState() 425 if state == INITIALIZED: 426 IWorkflowInfo(self.context[pin]).fireTransition('start') 424 427 if pin in self.context.keys(): 425 428 self.redirect(self.url(self.context[pin], 'edit')) … … 443 446 role_manager.assignRoleToPrincipal( 444 447 'waeup.PortalUser', self.request.principal.id) 445 # XXX: disable for now. Pins will get a different workflow.446 #state = IWorkflowState(self.context[pin]).getState()447 #if state == INITIALIZED:448 # IWorkflowInfo(self.context[pin]).fireTransition('start')449 448 self.redirect(self.url(self.context[pin], 'edit')) 450 449 return … … 536 535 grok.require('waeup.handleApplication') 537 536 icon = 'actionicon_pdf.png' 538 text = ' Application slip'537 text = 'Download application slip' 539 538 target = 'application_slip.pdf' 540 539 … … 650 649 target = 'edit_full' 651 650 651 class ApplicantEditActionButton(ManageActionButton): 652 grok.context(IApplicant) 653 grok.view(DisplayApplicant) 654 grok.require('waeup.handleApplication') 655 text = 'Edit application record' 656 target = 'edit' 657 652 658 class EditApplicantFull(WAeUPEditFormPage): 653 659 """A full edit view for applicant data. … … 721 727 def update(self): 722 728 if self.context.locked: 723 self. redirect(self.url(self.context))729 self.emitLockMessage() 724 730 return 725 731 datepicker.need() # Enable jQuery datepicker in date fields. … … 766 772 return 767 773 774 class ApplicantViewActionButton(ManageActionButton): 775 grok.context(IApplicant) 776 grok.view(EditApplicantStudent) 777 grok.require('waeup.handleApplication') 778 text = 'View application record' 779 target = 'index' -
main/waeup.sirp/trunk/src/waeup/sirp/applicants/permissions.py
r6198 r6367 30 30 grok.name('waeup.handleApplication') 31 31 32 class ViewApplication(grok.Permission): 33 grok.name('waeup.viewApplication') 34 32 35 class ManageApplications(grok.Permission): 33 36 grok.name('waeup.manageApplications') … … 37 40 grok.name('waeup.local.ApplicationOwner') 38 41 grok.title(u'Application Owner') 39 grok.permissions('waeup.handleApplication' )42 grok.permissions('waeup.handleApplication', 'waeup.viewApplication') 40 43 41 44 # Global role … … 43 46 grok.name('waeup.ApplicationsOfficer') 44 47 grok.title(u'Applications Officer') 45 grok.permissions('waeup.manageApplications', 'waeup. handleApplication')48 grok.permissions('waeup.manageApplications', 'waeup.viewApplication')
Note: See TracChangeset for help on using the changeset viewer.