Ignore:
Timestamp:
15 Feb 2022, 22:55:42 (3 years ago)
Author:
Henrik Bettermann
Message:

Provide button.

Location:
main/waeup.uniben/trunk/src/waeup/uniben/students
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.uniben/trunk/src/waeup/uniben/students/browser_templates/plagtestinfopage.pt

    r16795 r16808  
    11<h1>Final Year Plagiarism Test</h1>
    22
    3 <p> Your payment was successful. Please upload your project / thesis file on the
    4 <a tal:attributes="href view/facdep">Turn-it-in Web Site</a>.</p>
     3<p> Your payment was successful. Please upload your project/thesis file
     4<a tal:attributes="href view/facdep">here: Turn-it-in Web Site</a>.</p>
    55
    66
  • main/waeup.uniben/trunk/src/waeup/uniben/students/viewlets.py

    r16473 r16808  
    2727    ExportPDFClearanceSlip, StudyCourseDisplayFormPage,
    2828    StudyLevelDisplayFormPage, StudentClearanceDisplayFormPage,
    29     StudentBaseDisplayFormPage)
     29    StudentBaseDisplayFormPage, OnlinePaymentDisplayFormPage)
    3030from waeup.kofa.students.viewlets import (
    3131    RequestTranscriptActionButton, StudentPassportActionButton)
     
    3333from waeup.uniben.students.interfaces import (
    3434    ICustomStudentStudyCourse, ICustomStudentStudyLevel,
    35     ICustomStudent,)
     35    ICustomStudent, ICustomStudentOnlinePayment)
    3636
    3737from waeup.uniben.students.browser import StudentMedicalHistoryEditFormPage
     
    201201    target = 'medical_questionnaire_slip.pdf'
    202202
     203class PlagTestLinkActionButton(ManageActionButton):
     204    grok.order(10) 
     205    grok.context(ICustomStudentOnlinePayment)
     206    grok.view(OnlinePaymentDisplayFormPage)
     207    grok.require('waeup.viewStudent')
     208    icon = 'actionicon_up.png'
     209    text = _('Upload project/thesis file')
     210    target = 'plagtestinfo'
     211
     212    @property
     213    def target_url(self):
     214        if self.context.p_state != 'paid' \
     215            or self.context.p_category != 'plag_test':
     216            return ''
     217        return self.view.url(self.view.context, self.target)
     218
    203219# JAMB Letter
    204220
Note: See TracChangeset for help on using the changeset viewer.