Ignore:
Timestamp:
12 Aug 2024, 13:07:04 (5 months ago)
Author:
Henrik Bettermann
Message:

Add external link button.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.udss/trunk/src/kofacustom/udss/students/viewlets.py

    r17689 r17887  
    2121from waeup.kofa.browser.viewlets import ManageActionButton
    2222from kofacustom.udss.students.interfaces import (
     23    ICustomStudent,
    2324    ICustomStudentStudyCourse, ICustomStudentStudyLevel)
    2425from waeup.kofa.students.fileviewlets import (
    2526    StudentFileDisplay, StudentFileUpload, StudentImage)
    2627from waeup.kofa.students.browser import (
     28    StudentBaseDisplayFormPage,
    2729    ExportPDFClearanceSlip, StudyCourseDisplayFormPage,
    2830    StudyLevelDisplayFormPage)
    2931
    3032from kofacustom.nigeria.interfaces import MessageFactory as _
     33
     34class DashboardLinkActionButton(ManageActionButton):
     35    grok.order(10)
     36    grok.context(ICustomStudent)
     37    grok.view(StudentBaseDisplayFormPage)
     38    grok.require('waeup.handleStudent')
     39    icon = 'actionicon_book.png'
     40    text = _('Open dashboard')
     41
     42    @property
     43    def target_url(self):
     44        return 'https://udss.kofadata.com/Default.aspx?student_id=%s' % self.context.student_id
Note: See TracChangeset for help on using the changeset viewer.