Ignore:
Timestamp:
23 Oct 2014, 07:24:39 (10 years ago)
Author:
Henrik Bettermann
Message:

Hide 'Create students' button. Only user admin can see this button.

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

Legend:

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

    r11870 r11874  
    584584class CreateAllStudentsPage(UtilityView, grok.View):
    585585    """Create all student objects from applicant data
    586     in a container.
     586    in the root container or in a specific  applicants container only.
    587587
    588588    Only PortalManagers can do this.
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/viewlets.py

    r11599 r11874  
    158158    target ='createallstudents'
    159159
     160    @property
     161    def target_url(self):
     162        if self.target and self.request.principal.id == 'admin':
     163            return self.view.url(self.view.context, self.target)
     164        return
     165
    160166class ApplicantsContainerCreateStudentsActionButton(ManageActionButton):
    161167    grok.order(1)
     
    166172    text = _('Create students')
    167173    target ='createallstudents'
     174
     175    @property
     176    def target_url(self):
     177        if self.target and self.request.principal.id == 'admin':
     178            return self.view.url(self.view.context, self.target)
     179        return
    168180
    169181class ApplicantViewActionButton(ManageActionButton):
Note: See TracChangeset for help on using the changeset viewer.