Ignore:
Timestamp:
23 Feb 2016, 17:36:46 (9 years ago)
Author:
Henrik Bettermann
Message:

Add exam schedule examination slip.

Fix test.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.uniben/trunk/src/waeup/uniben/students/viewlets.py

    r13063 r13723  
    2424    ICustomStudent, )
    2525from waeup.kofa.students.fileviewlets import (
    26     StudentFileDisplay, StudentFileUpload, StudentImage)
     26    StudentFileDisplay, StudentFileUpload, StudentImage,)
    2727from waeup.kofa.students.browser import (
    2828    ExportPDFClearanceSlip, StudyCourseDisplayFormPage,
    29     StudyLevelDisplayFormPage, StudentClearanceDisplayFormPage)
     29    StudyLevelDisplayFormPage, StudentClearanceDisplayFormPage,
     30    StudentBaseDisplayFormPage)
    3031
    3132from kofacustom.nigeria.interfaces import MessageFactory as _
     
    9495        return False
    9596
     97class ExaminationScheduleSlipActionButton(ManageActionButton):
     98    grok.order(10)
     99    grok.context(ICustomStudent)
     100    grok.view(StudentBaseDisplayFormPage)
     101    grok.require('waeup.viewStudent')
     102    icon = 'actionicon_pdf.png'
     103    text = _('Download examination schedule slip')
     104    target = 'examination_schedule_slip.pdf'
     105
     106    @property
     107    def target_url(self):
     108        if self.context.flash_notice \
     109            and 'exam' in self.context.flash_notice.lower():
     110            return self.view.url(self.view.context, self.target)
     111        return False
    96112
    97113# JAMB Letter
Note: See TracChangeset for help on using the changeset viewer.