Ignore:
Timestamp:
28 Jun 2016, 17:00:24 (8 years ago)
Author:
Henrik Bettermann
Message:

Add button.

Location:
main/waeup.aaue/trunk/src/waeup/aaue
Files:
3 edited

Legend:

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

    r13996 r13997  
    3333from waeup.kofa.interfaces import IPDF
    3434from waeup.kofa.applicants.interfaces import IApplicant
     35from waeup.kofa.browser.viewlets import ManageActionButton
    3536from waeup.aaue.interfaces import MessageFactory as _
    3637from kofacustom.nigeria.applicants.browser import (
     
    344345    grok.template('applicantcheckstatus')
    345346
     347class PaymentReceiptActionButton(ManageActionButton):
     348    grok.order(8) # This button should always be the last one.
     349    grok.context(ICustomApplicant)
     350    grok.view(CustomApplicantDisplayFormPage)
     351    grok.require('waeup.viewApplication')
     352    icon = 'actionicon_pdf.png'
     353    text = _('Download screening invitation letter')
     354    target = 'screening_invitation.pdf'
     355
     356    @property
     357    def target_url(self):
     358        if not self.context.screening_date:
     359            return ''
     360        return self.view.url(self.view.context, self.target)
    346361
    347362class ExportScreeningInvitationLetter(UtilityView, grok.View):
     
    349364    This form page is available only in AAUE.
    350365    """
    351     grok.context(IApplicant)
     366    grok.context(ICustomApplicant)
    352367    grok.name('screening_invitation.pdf')
    353368    grok.require('waeup.viewApplication')
     
    364379<br /><br /><br /><br /><font size='12'>
    365380Dear %s,
    366 <br /><br /><br />
    367 You are invited for your screening exercise on:
    368381<br /><br />
    369 <strong>%s</strong>.
     382You are invited for your screening exercise.
    370383<br /><br />
    371 Please bring along this letter of invitation to the %s
     384<strong>Date/Time: %s
    372385<br /><br />
    373 on your screening date.
    374 <br /><br /><br />
    375 Signed,
     386Venue: %s
     387</strong>
    376388<br /><br />
    377 xyz<br />
     389Please bring along this letter of invitation on your screening date.
    378390</font>
    379391
  • main/waeup.aaue/trunk/src/waeup/aaue/applicants/tests/test_browser.py

    r13996 r13997  
    7272        return
    7373
    74     def test_screening_slip_download(self):
     74    def test_screening_invitation_download(self):
    7575        self.login()
    76         self.applicant.screening_date = u'29th August 2016'
     76        self.applicant.screening_date = u'29th August 2016 / 8:30 am'
    7777        self.applicant.screening_venue = u'Main Auditorium'
    7878        self.applicant.lastname = u'Cox'
    7979        self.applicant.firstname = u'Jo'
    8080        self.applicant.email = 'xx@yy.zz'
    81         self.browser.open(self.view_path + '/screening_invitation.pdf')
     81        self.browser.open(self.view_path)
     82        self.browser.getLink("screening invitation").click()
    8283        self.assertEqual(self.browser.headers['Status'], '200 Ok')
    8384        self.assertEqual(
  • main/waeup.aaue/trunk/src/waeup/aaue/students/browser.py

    r13966 r13997  
    687687            tickets.append(row)
    688688            no += 1
    689         return header + sorted(tickets, key=lambda value: value[5] + value[3])
    690 
     689        return header + sorted(tickets,
     690            key=lambda value: value[5] + str(value[6]) + value[3])
     691
Note: See TracChangeset for help on using the changeset viewer.