[8862] | 1 | ## $Id: viewlets.py 15846 2019-11-25 13:29:09Z henrik $ |
---|
| 2 | ## |
---|
| 3 | ## Copyright (C) 2011 Uli Fouquet & Henrik Bettermann |
---|
| 4 | ## This program is free software; you can redistribute it and/or modify |
---|
| 5 | ## it under the terms of the GNU General Public License as published by |
---|
| 6 | ## the Free Software Foundation; either version 2 of the License, or |
---|
| 7 | ## (at your option) any later version. |
---|
| 8 | ## |
---|
| 9 | ## This program is distributed in the hope that it will be useful, |
---|
| 10 | ## but WITHOUT ANY WARRANTY; without even the implied warranty of |
---|
| 11 | ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
---|
| 12 | ## GNU General Public License for more details. |
---|
| 13 | ## |
---|
| 14 | ## You should have received a copy of the GNU General Public License |
---|
| 15 | ## along with this program; if not, write to the Free Software |
---|
| 16 | ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
---|
| 17 | ## |
---|
| 18 | |
---|
| 19 | import grok |
---|
[10022] | 20 | from zope.component import getUtility |
---|
[15826] | 21 | from waeup.kofa.interfaces import IExtFileStore |
---|
[13620] | 22 | from waeup.kofa.browser.viewlets import ManageActionButton |
---|
[10022] | 23 | from waeup.kofa.students.interfaces import IStudentsUtils |
---|
[15826] | 24 | from waeup.kofa.students.viewlets import ( |
---|
| 25 | PaymentReceiptActionButton, StudentPassportActionButton) |
---|
[12422] | 26 | from waeup.kofa.students.fileviewlets import ( |
---|
[12449] | 27 | StudentFileDisplay, StudentFileUpload, StudentImage) |
---|
[13058] | 28 | from waeup.kofa.students.browser import ExportPDFClearanceSlip |
---|
[15826] | 29 | from kofacustom.nigeria.students.interfaces import ( |
---|
| 30 | INigeriaStudent, INigeriaStudentOnlinePayment) |
---|
[13620] | 31 | from kofacustom.nigeria.students.browser import NigeriaStudentBaseDisplayFormPage |
---|
[8862] | 32 | from kofacustom.nigeria.interfaces import MessageFactory as _ |
---|
| 33 | |
---|
[10022] | 34 | def show_viewlet(viewlet): |
---|
| 35 | students_utils = getUtility(IStudentsUtils) |
---|
| 36 | if viewlet.__name__ in students_utils.SKIP_UPLOAD_VIEWLETS: |
---|
| 37 | return False |
---|
| 38 | cm = getattr(viewlet.context,'current_mode', None) |
---|
| 39 | if cm is not None and cm.startswith('pg'): |
---|
| 40 | return True |
---|
| 41 | return False |
---|
| 42 | |
---|
[15826] | 43 | class StudentPassportActionButton(StudentPassportActionButton): |
---|
| 44 | |
---|
| 45 | @property |
---|
| 46 | def target_url(self): |
---|
| 47 | # Passport pictures must not be editable if application slip |
---|
| 48 | # exists. |
---|
| 49 | slip = getUtility(IExtFileStore).getFileByContext( |
---|
| 50 | self.context, 'application_slip') |
---|
| 51 | PORTRAIT_CHANGE_STATES = getUtility(IStudentsUtils).PORTRAIT_CHANGE_STATES |
---|
| 52 | if self.context.state not in PORTRAIT_CHANGE_STATES or slip is not None: |
---|
| 53 | return '' |
---|
| 54 | return self.view.url(self.view.context, self.target) |
---|
| 55 | |
---|
| 56 | class PaymentReceiptActionButton(PaymentReceiptActionButton): |
---|
| 57 | grok.order(4) |
---|
| 58 | grok.context(INigeriaStudentOnlinePayment) |
---|
| 59 | |
---|
| 60 | @property |
---|
| 61 | def target_url(self): |
---|
[15846] | 62 | if not self.context.p_state in ('paid', 'waived', 'scholarship') \ |
---|
[15842] | 63 | and not self.context.r_company: |
---|
[15826] | 64 | return '' |
---|
| 65 | return self.view.url(self.view.context, self.target) |
---|
| 66 | |
---|
[13856] | 67 | # Financial Clearance Officer buttons |
---|
[13620] | 68 | |
---|
[13856] | 69 | class StudentFinanciallyClearActionButton(ManageActionButton): |
---|
[13620] | 70 | grok.order(10) |
---|
| 71 | grok.context(INigeriaStudent) |
---|
| 72 | grok.view(NigeriaStudentBaseDisplayFormPage) |
---|
| 73 | grok.require('waeup.clearStudentFinancially') |
---|
| 74 | text = _('Clear student financially') |
---|
| 75 | target = 'clear_financially' |
---|
| 76 | icon = 'actionicon_accept.png' |
---|
| 77 | |
---|
| 78 | @property |
---|
| 79 | def target_url(self): |
---|
| 80 | if self.context.financially_cleared_by: |
---|
| 81 | return '' |
---|
| 82 | return self.view.url(self.view.context, self.target) |
---|
| 83 | |
---|
[13856] | 84 | class StudentWithdrawFinancialClearanceActionButton(ManageActionButton): |
---|
[13620] | 85 | grok.order(11) |
---|
| 86 | grok.context(INigeriaStudent) |
---|
| 87 | grok.view(NigeriaStudentBaseDisplayFormPage) |
---|
| 88 | grok.require('waeup.clearStudentFinancially') |
---|
| 89 | text = _('Withdraw financial clearance') |
---|
| 90 | target = 'withdraw_financial_clearance' |
---|
| 91 | icon = 'actionicon_reject.png' |
---|
| 92 | |
---|
| 93 | @property |
---|
| 94 | def target_url(self): |
---|
| 95 | if not self.context.financially_cleared_by: |
---|
| 96 | return '' |
---|
| 97 | return self.view.url(self.view.context, self.target) |
---|
| 98 | |
---|
[13634] | 99 | class FinancialClearanceSlipActionButton(ManageActionButton): |
---|
[13623] | 100 | grok.order(12) |
---|
| 101 | grok.context(INigeriaStudent) |
---|
| 102 | grok.view(NigeriaStudentBaseDisplayFormPage) |
---|
| 103 | grok.require('waeup.viewStudent') |
---|
[13781] | 104 | text = _('Download fee payment history') |
---|
| 105 | target = 'fee_payment_history.pdf' |
---|
[13623] | 106 | icon = 'actionicon_pdf.png' |
---|
[13620] | 107 | |
---|
[9236] | 108 | # Acceptance Letter |
---|
| 109 | |
---|
[12449] | 110 | class AcceptanceLetterDisplay(StudentFileDisplay): |
---|
[9236] | 111 | """Acceptance Letter display viewlet. |
---|
| 112 | """ |
---|
| 113 | grok.order(2) |
---|
| 114 | label = _(u'Acceptance Letter') |
---|
| 115 | title = _(u'Acceptance Letter Scan') |
---|
| 116 | download_name = u'acc_let' |
---|
| 117 | |
---|
| 118 | class AcceptanceLetterSlip(AcceptanceLetterDisplay): |
---|
[13058] | 119 | grok.view(ExportPDFClearanceSlip) |
---|
[9236] | 120 | |
---|
[12449] | 121 | class AcceptanceLetterUpload(StudentFileUpload): |
---|
[9236] | 122 | """AcceptanceLetter upload viewlet. |
---|
| 123 | """ |
---|
| 124 | grok.order(2) |
---|
| 125 | label = _(u'Acceptance Letter') |
---|
| 126 | title = _(u'Acceptance Letter Scan') |
---|
| 127 | download_name = u'acc_let' |
---|
| 128 | tab_redirect = '?tab2' |
---|
| 129 | |
---|
[12449] | 130 | class AcceptanceLetterImage(StudentImage): |
---|
[9236] | 131 | """Renders acceptance letter scan. |
---|
| 132 | """ |
---|
| 133 | grok.name('acc_let') |
---|
| 134 | download_name = u'acc_let' |
---|
| 135 | |
---|
[8862] | 136 | # LGA Identification |
---|
| 137 | |
---|
[12449] | 138 | class LGAIdentificationDisplay(StudentFileDisplay): |
---|
[8862] | 139 | """LGA Identification display viewlet. |
---|
| 140 | """ |
---|
[9236] | 141 | grok.order(3) |
---|
[8862] | 142 | label = _(u'LGA Identification') |
---|
| 143 | title = _(u'LGA Identification Scan') |
---|
| 144 | download_name = u'lga_ident' |
---|
| 145 | |
---|
| 146 | class LGAIdentificationSlip(LGAIdentificationDisplay): |
---|
[13058] | 147 | grok.view(ExportPDFClearanceSlip) |
---|
[8862] | 148 | |
---|
[12449] | 149 | class LGAIdentificationUpload(StudentFileUpload): |
---|
[8862] | 150 | """LGA Identification upload viewlet. |
---|
| 151 | """ |
---|
[9236] | 152 | grok.order(3) |
---|
[8862] | 153 | label = _(u'LGA Identification') |
---|
| 154 | title = _(u'LGA Identification Scan') |
---|
| 155 | download_name = u'lga_ident' |
---|
| 156 | |
---|
[12449] | 157 | class LGAIdentificationImage(StudentImage): |
---|
[8862] | 158 | """Renders LGA Identification scan. |
---|
| 159 | """ |
---|
| 160 | grok.name('lga_ident') |
---|
| 161 | download_name = u'lga_ident' |
---|
| 162 | |
---|
| 163 | # First Sitting Result |
---|
| 164 | |
---|
[12449] | 165 | class FirstSittingResultDisplay(StudentFileDisplay): |
---|
[8862] | 166 | """First Sitting Result display viewlet. |
---|
| 167 | """ |
---|
[9236] | 168 | grok.order(4) |
---|
[8862] | 169 | label = _(u'First Sitting Result') |
---|
| 170 | title = _(u'First Sitting Result') |
---|
| 171 | download_name = u'fst_sit_scan' |
---|
| 172 | |
---|
| 173 | class FirstSittingResultSlip(FirstSittingResultDisplay): |
---|
[13058] | 174 | grok.view(ExportPDFClearanceSlip) |
---|
[8862] | 175 | |
---|
[12449] | 176 | class FirstSittingResultUpload(StudentFileUpload): |
---|
[8862] | 177 | """First Sitting Result upload viewlet. |
---|
| 178 | """ |
---|
[9236] | 179 | grok.order(4) |
---|
[8862] | 180 | label = _(u'First Sitting Result') |
---|
| 181 | title = _(u'First Sitting Result Scan') |
---|
| 182 | download_name = u'fst_sit_scan' |
---|
| 183 | |
---|
[12449] | 184 | class FirstSittingResultImage(StudentImage): |
---|
[8862] | 185 | """Renders First Sitting Result scan. |
---|
| 186 | """ |
---|
| 187 | grok.name('fst_sit_scan') |
---|
| 188 | download_name = u'fst_sit_scan' |
---|
| 189 | |
---|
| 190 | # Second Sitting Result |
---|
| 191 | |
---|
[12449] | 192 | class SecondSittingResultDisplay(StudentFileDisplay): |
---|
[8862] | 193 | """Second Sitting Result display viewlet. |
---|
| 194 | """ |
---|
[9236] | 195 | grok.order(5) |
---|
[8862] | 196 | label = _(u'Second Sitting Result') |
---|
| 197 | title = _(u'Second Sitting Result') |
---|
| 198 | download_name = u'scd_sit_scan' |
---|
| 199 | |
---|
| 200 | class SecondSittingResultSlip(SecondSittingResultDisplay): |
---|
[13058] | 201 | grok.view(ExportPDFClearanceSlip) |
---|
[8862] | 202 | |
---|
[12449] | 203 | class SecondSittingResultUpload(StudentFileUpload): |
---|
[8862] | 204 | """Second Sitting Result upload viewlet. |
---|
| 205 | """ |
---|
[9236] | 206 | grok.order(5) |
---|
[8862] | 207 | label = _(u'Second Sitting Result') |
---|
| 208 | title = _(u'Second Sitting Result Scan') |
---|
| 209 | download_name = u'scd_sit_scan' |
---|
| 210 | |
---|
[12449] | 211 | class SecondSittingResultImage(StudentImage): |
---|
[8862] | 212 | """Renders Second Sitting Result scan. |
---|
| 213 | """ |
---|
| 214 | grok.name('scd_sit_scan') |
---|
| 215 | download_name = u'scd_sit_scan' |
---|
| 216 | |
---|
| 217 | # Higher Qualification Result |
---|
| 218 | |
---|
[12449] | 219 | class HigherQualificationResultDisplay(StudentFileDisplay): |
---|
[8862] | 220 | """Higher Qualification Result display viewlet. |
---|
| 221 | """ |
---|
[9236] | 222 | grok.order(6) |
---|
[8862] | 223 | label = _(u'Higher Qualification Result') |
---|
| 224 | title = _(u'Higher Qualification Result') |
---|
| 225 | download_name = u'hq_scan' |
---|
| 226 | |
---|
| 227 | class HigherQualificationResultSlip(HigherQualificationResultDisplay): |
---|
[13058] | 228 | grok.view(ExportPDFClearanceSlip) |
---|
[8862] | 229 | |
---|
[12449] | 230 | class HigherQualificationResultUpload(StudentFileUpload): |
---|
[8862] | 231 | """Higher Qualification Result upload viewlet. |
---|
| 232 | """ |
---|
[9236] | 233 | grok.order(6) |
---|
[8862] | 234 | label = _(u'Higher Qualification Result') |
---|
| 235 | title = _(u'Higher Qualification Result Scan') |
---|
| 236 | download_name = u'hq_scan' |
---|
| 237 | |
---|
[12449] | 238 | class HigherQualificationResultImage(StudentImage): |
---|
[8862] | 239 | """Renders Higher Qualification Result scan. |
---|
| 240 | """ |
---|
| 241 | grok.name('hq_scan') |
---|
| 242 | download_name = u'hq_scan' |
---|
| 243 | |
---|
| 244 | # 2nd Higher Qualification Result (PG Students only) |
---|
| 245 | |
---|
[12449] | 246 | class SecondHigherQualificationResultDisplay(StudentFileDisplay): |
---|
[8862] | 247 | """Second Higher Qualification Result display viewlet. |
---|
| 248 | """ |
---|
[9236] | 249 | grok.order(7) |
---|
[8862] | 250 | label = _(u'Second Higher Qualification Result') |
---|
| 251 | title = _(u'Second Higher Qualification Result') |
---|
| 252 | download_name = u'hq_scan2' |
---|
| 253 | |
---|
| 254 | class SecondHigherQualificationResultSlip(SecondHigherQualificationResultDisplay): |
---|
[13058] | 255 | grok.view(ExportPDFClearanceSlip) |
---|
[8862] | 256 | |
---|
[12449] | 257 | class SecondHigherQualificationResultUpload(StudentFileUpload): |
---|
[8862] | 258 | """Second Higher Qualification Result upload viewlet. |
---|
| 259 | """ |
---|
[9236] | 260 | grok.order(7) |
---|
[8862] | 261 | label = _(u'Second Higher Qualification Result') |
---|
| 262 | title = _(u'Second Higher Qualification Result Scan') |
---|
| 263 | download_name = u'hq_scan2' |
---|
| 264 | |
---|
| 265 | @property |
---|
| 266 | def show_viewlet(self): |
---|
[10022] | 267 | return show_viewlet(self) |
---|
[8862] | 268 | |
---|
[12449] | 269 | class SecondHigherQualificationResultImage(StudentImage): |
---|
[8862] | 270 | """Renders Second Higher Qualification Result scan. |
---|
| 271 | """ |
---|
| 272 | grok.name('hq_scan2') |
---|
| 273 | download_name = u'hq_scan2' |
---|
| 274 | |
---|
| 275 | # Advanced Level Result |
---|
| 276 | |
---|
[12449] | 277 | class AdvancedLevelResultDisplay(StudentFileDisplay): |
---|
[8862] | 278 | """Advanced Level Result display viewlet. |
---|
| 279 | """ |
---|
[9236] | 280 | grok.order(8) |
---|
[8862] | 281 | label = _(u'Advanced Level Result') |
---|
| 282 | title = _(u'Advanced Level Result') |
---|
| 283 | download_name = u'alr_scan' |
---|
| 284 | |
---|
| 285 | class AdvancedLevelResultSlip(AdvancedLevelResultDisplay): |
---|
[13058] | 286 | grok.view(ExportPDFClearanceSlip) |
---|
[8862] | 287 | |
---|
[12449] | 288 | class AdvancedLevelResultUpload(StudentFileUpload): |
---|
[8862] | 289 | """Advanced Level Result upload viewlet. |
---|
| 290 | """ |
---|
[9236] | 291 | grok.order(8) |
---|
[8862] | 292 | label = _(u'Advanced Level Result') |
---|
| 293 | title = _(u'Advanced Level Result Scan') |
---|
| 294 | download_name = u'alr_scan' |
---|
| 295 | |
---|
[12449] | 296 | class AdvancedLevelResultImage(StudentImage): |
---|
[8862] | 297 | """Renders Advanced Level Result scan. |
---|
| 298 | """ |
---|
| 299 | grok.name('alr_scan') |
---|
| 300 | download_name = u'alr_scan' |
---|
| 301 | |
---|
[9381] | 302 | # Certificate |
---|
[8862] | 303 | |
---|
[12449] | 304 | class CertificateDisplay(StudentFileDisplay): |
---|
[9381] | 305 | """Certificate display viewlet. |
---|
[8862] | 306 | """ |
---|
[9236] | 307 | grok.order(9) |
---|
[9381] | 308 | label = _(u'Certificate') |
---|
| 309 | title = _(u'Certificate') |
---|
[9236] | 310 | download_name = u'cert' |
---|
[8862] | 311 | |
---|
| 312 | class CertificateSlip(CertificateDisplay): |
---|
[13058] | 313 | grok.view(ExportPDFClearanceSlip) |
---|
[8862] | 314 | |
---|
[12449] | 315 | class CertificateUpload(StudentFileUpload): |
---|
[9381] | 316 | """Certificate upload viewlet. |
---|
[8862] | 317 | """ |
---|
[9236] | 318 | grok.order(9) |
---|
[9381] | 319 | label = _(u'Certificate') |
---|
| 320 | title = _(u'Certificate Scan') |
---|
[9236] | 321 | download_name = u'cert' |
---|
[8862] | 322 | |
---|
[12449] | 323 | class CertificateImage(StudentImage): |
---|
[9381] | 324 | """Renders Certificate scan. |
---|
[8862] | 325 | """ |
---|
[9236] | 326 | grok.name('cert') |
---|
| 327 | download_name = u'cert' |
---|
[8862] | 328 | |
---|
| 329 | # Second Certificate (PG Students only) |
---|
| 330 | |
---|
[12449] | 331 | class SecondCertificateDisplay(StudentFileDisplay): |
---|
[8862] | 332 | """ Second Certificate display viewlet. |
---|
| 333 | """ |
---|
[9236] | 334 | grok.order(10) |
---|
[8862] | 335 | label = _(u'Second Certificate') |
---|
| 336 | title = _(u'Second Certificate') |
---|
[9236] | 337 | download_name = u'cert2' |
---|
[8862] | 338 | |
---|
| 339 | class SecondCertificateSlip(SecondCertificateDisplay): |
---|
[13058] | 340 | grok.view(ExportPDFClearanceSlip) |
---|
[8862] | 341 | |
---|
[12449] | 342 | class SecondCertificateUpload(StudentFileUpload): |
---|
[8862] | 343 | """Second Certificate upload viewlet. |
---|
| 344 | """ |
---|
[9236] | 345 | grok.order(10) |
---|
[8862] | 346 | label = _(u'Second Certificate') |
---|
| 347 | title = _(u'Second Certificate Scan') |
---|
[9236] | 348 | download_name = u'cert2' |
---|
[8862] | 349 | |
---|
| 350 | @property |
---|
| 351 | def show_viewlet(self): |
---|
[10022] | 352 | return show_viewlet(self) |
---|
[8862] | 353 | |
---|
[12449] | 354 | class SecondCertificateImage(StudentImage): |
---|
[8862] | 355 | """Renders Second Certificate scan. |
---|
| 356 | """ |
---|
[9236] | 357 | grok.name('cert2') |
---|
| 358 | download_name = u'cert2' |
---|
[8862] | 359 | |
---|
| 360 | # Third Certificate (PG Students only) |
---|
| 361 | |
---|
[12449] | 362 | class ThirdCertificateDisplay(StudentFileDisplay): |
---|
[8862] | 363 | """ Third Certificate display viewlet. |
---|
| 364 | """ |
---|
[9236] | 365 | grok.order(11) |
---|
[8862] | 366 | label = _(u'Third Certificate') |
---|
| 367 | title = _(u'Third Certificate') |
---|
[9236] | 368 | download_name = u'cert3' |
---|
[8862] | 369 | |
---|
| 370 | class ThirdCertificateSlip(ThirdCertificateDisplay): |
---|
[13058] | 371 | grok.view(ExportPDFClearanceSlip) |
---|
[8862] | 372 | |
---|
[12449] | 373 | class ThirdCertificateUpload(StudentFileUpload): |
---|
[8862] | 374 | """Third Certificate upload viewlet. |
---|
| 375 | """ |
---|
[9236] | 376 | grok.order(11) |
---|
[8862] | 377 | label = _(u'Third Certificate') |
---|
| 378 | title = _(u'Third Certificate Scan') |
---|
[9236] | 379 | download_name = u'cert3' |
---|
[8862] | 380 | |
---|
| 381 | @property |
---|
| 382 | def show_viewlet(self): |
---|
[10022] | 383 | return show_viewlet(self) |
---|
[8862] | 384 | |
---|
[12449] | 385 | class ThirdCertificateImage(StudentImage): |
---|
[8862] | 386 | """Renders Third Certificate scan. |
---|
| 387 | """ |
---|
[9236] | 388 | grok.name('cert3') |
---|
| 389 | download_name = u'cert3' |
---|
[8862] | 390 | |
---|
| 391 | # Evidence of Name |
---|
| 392 | |
---|
[12449] | 393 | class EvidenceNameDisplay(StudentFileDisplay): |
---|
[8862] | 394 | """Evidence of Name display viewlet. |
---|
| 395 | """ |
---|
[9236] | 396 | grok.order(12) |
---|
[8862] | 397 | label = _(u'Evidence of Name') |
---|
| 398 | title = _(u'Evidence of Name') |
---|
| 399 | download_name = u'evid' |
---|
| 400 | |
---|
| 401 | class EvidenceNameSlip(EvidenceNameDisplay): |
---|
[13058] | 402 | grok.view(ExportPDFClearanceSlip) |
---|
[8862] | 403 | |
---|
[12449] | 404 | class EvidenceNameUpload(StudentFileUpload): |
---|
[8862] | 405 | """Evidence of Name upload viewlet. |
---|
| 406 | """ |
---|
[9236] | 407 | grok.order(12) |
---|
[8862] | 408 | label = _(u'Evidence of Name') |
---|
| 409 | title = _(u'Evidence of Name Scan') |
---|
| 410 | download_name = u'evid' |
---|
| 411 | |
---|
[12449] | 412 | class EvidenceNameImage(StudentImage): |
---|
[8862] | 413 | """Renders Evidence of Name scan. |
---|
| 414 | """ |
---|
| 415 | grok.name('evid') |
---|
| 416 | download_name = u'evid' |
---|
| 417 | |
---|
| 418 | # Result Statement |
---|
| 419 | |
---|
[12449] | 420 | class ResultStatementDisplay(StudentFileDisplay): |
---|
[8862] | 421 | """Result Statement display viewlet. |
---|
| 422 | """ |
---|
[9236] | 423 | grok.order(13) |
---|
[8862] | 424 | label = _(u'Result Statement') |
---|
| 425 | title = _(u'Result Statement') |
---|
| 426 | download_name = u'res_stat' |
---|
| 427 | |
---|
| 428 | class ResultStatementSlip(ResultStatementDisplay): |
---|
[13058] | 429 | grok.view(ExportPDFClearanceSlip) |
---|
[8862] | 430 | |
---|
[12449] | 431 | class ResultStatementUpload(StudentFileUpload): |
---|
[8862] | 432 | """Result Statement upload viewlet. |
---|
| 433 | """ |
---|
[9236] | 434 | grok.order(13) |
---|
[8862] | 435 | label = _(u'Result Statement') |
---|
| 436 | title = _(u'Result Statement Scan') |
---|
| 437 | download_name = u'res_stat' |
---|
| 438 | |
---|
[12449] | 439 | class ResultStatementImage(StudentImage): |
---|
[8862] | 440 | """Renders Result Statement scan. |
---|
| 441 | """ |
---|
| 442 | grok.name('res_stat') |
---|
| 443 | download_name = u'res_stat' |
---|
| 444 | |
---|
| 445 | # Referee Letter |
---|
| 446 | |
---|
[12449] | 447 | class RefereeLetterDisplay(StudentFileDisplay): |
---|
[8862] | 448 | """Referee Letter display viewlet. |
---|
| 449 | """ |
---|
[9236] | 450 | grok.order(14) |
---|
[9377] | 451 | label = _(u'Guarantor/Referee Letter') |
---|
| 452 | title = _(u'Guarantor/Referee Letter') |
---|
[8862] | 453 | download_name = u'ref_let' |
---|
| 454 | |
---|
| 455 | class RefereeLetterSlip(RefereeLetterDisplay): |
---|
[13058] | 456 | grok.view(ExportPDFClearanceSlip) |
---|
[8862] | 457 | |
---|
[12449] | 458 | class RefereeLetterUpload(StudentFileUpload): |
---|
[8862] | 459 | """Referee Letter upload viewlet. |
---|
| 460 | """ |
---|
[9236] | 461 | grok.order(14) |
---|
[9377] | 462 | label = _(u'Guarantor/Referee Letter') |
---|
| 463 | title = _(u'Guarantor/Referee Letter Scan') |
---|
[8862] | 464 | download_name = u'ref_let' |
---|
| 465 | |
---|
[12449] | 466 | class RefereeLetterImage(StudentImage): |
---|
[8862] | 467 | """Renders Referee Letter scan. |
---|
| 468 | """ |
---|
| 469 | grok.name('ref_let') |
---|
| 470 | download_name = u'ref_let' |
---|
| 471 | |
---|
| 472 | # Second Referee Letter (PG Students only) |
---|
| 473 | |
---|
[12449] | 474 | class SecondRefereeLetterDisplay(StudentFileDisplay): |
---|
[8862] | 475 | """Second Referee Letter display viewlet. |
---|
| 476 | """ |
---|
[9236] | 477 | grok.order(15) |
---|
[8862] | 478 | label = _(u'Second Referee Letter') |
---|
| 479 | title = _(u'Second Referee Letter') |
---|
| 480 | download_name = u'ref_let2' |
---|
| 481 | |
---|
| 482 | class SecondRefereeLetterSlip(SecondRefereeLetterDisplay): |
---|
[13058] | 483 | grok.view(ExportPDFClearanceSlip) |
---|
[8862] | 484 | |
---|
[12449] | 485 | class SecondRefereeLetterUpload(StudentFileUpload): |
---|
[8862] | 486 | """Referee Letter upload viewlet. |
---|
| 487 | """ |
---|
[9236] | 488 | grok.order(15) |
---|
[8862] | 489 | label = _(u'Second Referee Letter') |
---|
| 490 | title = _(u'Second Referee Letter Scan') |
---|
| 491 | download_name = u'ref_let2' |
---|
| 492 | |
---|
| 493 | @property |
---|
| 494 | def show_viewlet(self): |
---|
[10022] | 495 | return show_viewlet(self) |
---|
[8862] | 496 | |
---|
[12449] | 497 | class SecondRefereeLetterImage(StudentImage): |
---|
[8862] | 498 | """Renders Referee Letter scan. |
---|
| 499 | """ |
---|
| 500 | grok.name('ref_let2') |
---|
| 501 | download_name = u'ref_let2' |
---|
| 502 | |
---|
| 503 | # Third Referee Letter (PG Students only) |
---|
| 504 | |
---|
[12449] | 505 | class ThirdRefereeLetterDisplay(StudentFileDisplay): |
---|
[8862] | 506 | """Third Referee Letter display viewlet. |
---|
| 507 | """ |
---|
[9236] | 508 | grok.order(16) |
---|
[8862] | 509 | label = _(u'Third Referee Letter') |
---|
| 510 | title = _(u'Third Referee Letter') |
---|
| 511 | download_name = u'ref_let3' |
---|
| 512 | |
---|
| 513 | class ThirdRefereeLetterSlip(ThirdRefereeLetterDisplay): |
---|
[13058] | 514 | grok.view(ExportPDFClearanceSlip) |
---|
[8862] | 515 | |
---|
[12449] | 516 | class ThirdRefereeLetterUpload(StudentFileUpload): |
---|
[8862] | 517 | """Referee Letter upload viewlet. |
---|
| 518 | """ |
---|
[9236] | 519 | grok.order(16) |
---|
[8862] | 520 | label = _(u'Third Referee Letter') |
---|
| 521 | title = _(u'Third Referee Letter Scan') |
---|
| 522 | download_name = u'ref_let3' |
---|
| 523 | |
---|
| 524 | @property |
---|
| 525 | def show_viewlet(self): |
---|
[10022] | 526 | return show_viewlet(self) |
---|
[8862] | 527 | |
---|
[12449] | 528 | class ThirdRefereeLetterImage(StudentImage): |
---|
[8862] | 529 | """Renders Referee Letter scan. |
---|
| 530 | """ |
---|
| 531 | grok.name('ref_let3') |
---|
| 532 | download_name = u'ref_let3' |
---|
| 533 | |
---|
[9377] | 534 | # Affidavit (former Statutory Declaration) of Good Conduct |
---|
[8862] | 535 | |
---|
[12449] | 536 | class StatutoryDeclarationDisplay(StudentFileDisplay): |
---|
[8862] | 537 | """Statutory Declaration of Good Conduct display viewlet. |
---|
| 538 | """ |
---|
[9236] | 539 | grok.order(17) |
---|
[9377] | 540 | label = _(u'Affidavit of Good Conduct') |
---|
| 541 | title = _(u'Affidavit of Good Conduct') |
---|
[8862] | 542 | download_name = u'stat_dec' |
---|
| 543 | |
---|
| 544 | class StatutoryDeclarationSlip(StatutoryDeclarationDisplay): |
---|
[13058] | 545 | grok.view(ExportPDFClearanceSlip) |
---|
[8862] | 546 | |
---|
[12449] | 547 | class StatutoryDeclarationUpload(StudentFileUpload): |
---|
[8862] | 548 | """Statutory Declaration of Good Conduct upload viewlet. |
---|
| 549 | """ |
---|
[9236] | 550 | grok.order(17) |
---|
[9377] | 551 | label = _(u'Affidavit of Good Conduct') |
---|
| 552 | title = _(u'Affidavit of Good Conduct Scan') |
---|
[8862] | 553 | download_name = u'stat_dec' |
---|
| 554 | |
---|
[12449] | 555 | class StatutoryDeclarationImage(StudentImage): |
---|
[9377] | 556 | """Renders Affidavit of Good Conduct scan. |
---|
[8862] | 557 | """ |
---|
| 558 | grok.name('stat_dec') |
---|
| 559 | download_name = u'stat_dec' |
---|
| 560 | |
---|
| 561 | # Letter of Admission (PG Students only) |
---|
| 562 | |
---|
[12449] | 563 | class LetterAdmissionDisplay(StudentFileDisplay): |
---|
[8862] | 564 | """Letter of Admission display viewlet. |
---|
| 565 | """ |
---|
[9381] | 566 | grok.order(18) |
---|
[8862] | 567 | label = _(u'Letter of Admission') |
---|
| 568 | title = _(u'Letter of Admission') |
---|
| 569 | download_name = u'admission_let' |
---|
| 570 | |
---|
| 571 | class LetterAdmissionSlip(LetterAdmissionDisplay): |
---|
[13058] | 572 | grok.view(ExportPDFClearanceSlip) |
---|
[8862] | 573 | |
---|
[12449] | 574 | class LetterAdmissionUpload(StudentFileUpload): |
---|
[8862] | 575 | """Letter of Admission upload viewlet. |
---|
| 576 | """ |
---|
[9381] | 577 | grok.order(18) |
---|
[8862] | 578 | label = _(u'Letter of Admission') |
---|
| 579 | title = _(u'Letter of Admission Scan') |
---|
| 580 | download_name = u'admission_let' |
---|
| 581 | |
---|
| 582 | @property |
---|
| 583 | def show_viewlet(self): |
---|
[10022] | 584 | return show_viewlet(self) |
---|
[8862] | 585 | |
---|
[12449] | 586 | class LetterAdmissionImage(StudentImage): |
---|
[8862] | 587 | """Renders Letter of Admission scan. |
---|
| 588 | """ |
---|
| 589 | grok.name('admission_let') |
---|
| 590 | download_name = u'admission_let' |
---|