Ignore:
Timestamp:
21 Oct 2014, 07:07:04 (10 years ago)
Author:
Henrik Bettermann
Message:

Add permission, page and button to mass-clear all students in a department.

File:
1 edited

Legend:

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

    r11254 r11862  
    476476    grok.order(3)
    477477
     478class ClearDepartmentStudentsActionButton(ManageActionButton):
     479    """ 'Clear all students' button for departments.
     480    """
     481    grok.context(IDepartment)
     482    grok.view(DepartmentPage)
     483    grok.name('cleardepartmentstudents')
     484    grok.require('waeup.clearAllStudents')
     485    icon = 'actionicon_accept.png'
     486    text = _('Clear all students')
     487    target = 'clearallstudents'
     488    grok.order(4)
     489
     490    @property
     491    def onclick(self):
     492        return "return window.confirm(%s);" % _(
     493            "'All students, who requested clearance in this department, will be cleared. Are you sure?'")
     494
    478495class ManageCourseActionButton(ManageActionButton):
    479496    """ 'Edit settings' button for courses.
Note: See TracChangeset for help on using the changeset viewer.