Ignore:
Timestamp:
12 Apr 2012, 19:38:45 (13 years ago)
Author:
Henrik Bettermann
Message:

More fields and document viewlets.

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

Legend:

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

    r8101 r8136  
    7878        )
    7979
     80    def_adm = schema.Bool(
     81        title = _(u'Deferent of Admission'),
     82        required = False,
     83        readonly = False,
     84        )
     85
    8086    fst_sit_fname = schema.TextLine(
    8187        title = _(u'Full Name'),
     
    320326        )
    321327
     328    uniben_matric = schema.TextLine(
     329        title = _(u'If yes, matric number'),
     330        required = False,
     331        readonly = False,
     332        )
     333
    322334
    323335class IStudent(IStudentBase,IUGStudentClearance,IPGStudentClearance,IStudentPersonal):
  • main/waeup.uniben/trunk/src/waeup/uniben/students/utils.py

    r8101 r8136  
    130130        'form.nysc_year': _(u'NYSC Information'),
    131131        'form.employer': _(u'Employment History'),
     132        'form.uniben_matric': _(u'Former Uniben Student'),
    132133        }
  • main/waeup.uniben/trunk/src/waeup/uniben/students/viewlets.py

    r8129 r8136  
    136136    download_name = u'hq_scan'
    137137
    138 # 2nd Higher Qualification Result
     138# 2nd Higher Qualification Result (PG Students only)
    139139
    140140class SecondHigherQualificationResultDisplay(FileDisplay):
     
    158158    download_name = u'hq_scan2'
    159159
     160    @property
     161    def show_viewlet(self):
     162        cm = getattr(self.context,'current_mode', None)
     163        if cm is not None and cm.startswith('pg'):
     164            return True
     165        return False
     166
    160167class SecondHigherQualificationResultImage(Image):
    161168    """Renders Second Higher Qualification Result scan.
     
    220227    download_name = u'certificate'
    221228
    222 # Second Certificate
     229# Second Certificate (PG Students only)
    223230
    224231class SecondCertificateDisplay(FileDisplay):
     
    242249    download_name = u'certificate2'
    243250
     251    @property
     252    def show_viewlet(self):
     253        cm = getattr(self.context,'current_mode', None)
     254        if cm is not None and cm.startswith('pg'):
     255            return True
     256        return False
     257
    244258class CertificateImage(Image):
    245259    """Renders Second Certificate scan.
     
    248262    download_name = u'certificate2'
    249263
    250 # Third Certificate
     264# Third Certificate (PG Students only)
    251265
    252266class ThirdCertificateDisplay(FileDisplay):
     
    270284    download_name = u'certificate3'
    271285
     286    @property
     287    def show_viewlet(self):
     288        cm = getattr(self.context,'current_mode', None)
     289        if cm is not None and cm.startswith('pg'):
     290            return True
     291        return False
     292
    272293class CertificateImage(Image):
    273294    """Renders Third Certificate scan.
     
    278299# Evidence of Name
    279300
    280 class EvidenceOfNameDisplay(FileDisplay):
     301class EvidenceNameDisplay(FileDisplay):
    281302    """Evidence of Name display viewlet.
    282303    """
     
    286307    download_name = u'evid'
    287308
    288 class EvidenceOfNameSlip(EvidenceOfNameDisplay):
    289     grok.view(ExportPDFClearanceSlipPage)
    290 
    291 class EvidenceOfNameUpload(FileUpload):
     309class EvidenceNameSlip(EvidenceNameDisplay):
     310    grok.view(ExportPDFClearanceSlipPage)
     311
     312class EvidenceNameUpload(FileUpload):
    292313    """Evidence of Name upload viewlet.
    293314    """
     
    298319    download_name = u'evid'
    299320
    300 class EvidenceOfNameImage(Image):
     321class EvidenceNameImage(Image):
    301322    """Renders Evidence of Name scan.
    302323    """
    303324    grok.name('evid')
    304325    download_name = u'evid'
     326
     327# Result Statement
     328
     329class ResultStatementDisplay(FileDisplay):
     330    """Result Statement display viewlet.
     331    """
     332    grok.order(1)
     333    label = _(u'Result Statement')
     334    title = _(u'Result Statement')
     335    download_name = u'res_stat'
     336
     337class ResultStatementSlip(ResultStatementDisplay):
     338    grok.view(ExportPDFClearanceSlipPage)
     339
     340class ResultStatementUpload(FileUpload):
     341    """Result Statement upload viewlet.
     342    """
     343    grok.order(2)
     344    label = _(u'Result Statement')
     345    title = _(u'Result Statement Scan')
     346    mus = 1024 * 150
     347    download_name = u'res_stat'
     348
     349class ResultStatementImage(Image):
     350    """Renders Result Statement scan.
     351    """
     352    grok.name('res_stat')
     353    download_name = u'res_stat'
     354
     355# Referee Letter
     356
     357class RefereeLetterDisplay(FileDisplay):
     358    """Referee Letter display viewlet.
     359    """
     360    grok.order(1)
     361    label = _(u'Referee Letter')
     362    title = _(u'Referee Letter')
     363    download_name = u'ref_let'
     364
     365class RefereeLetterSlip(RefereeLetterDisplay):
     366    grok.view(ExportPDFClearanceSlipPage)
     367
     368class RefereeLetterUpload(FileUpload):
     369    """Referee Letter upload viewlet.
     370    """
     371    grok.order(2)
     372    label = _(u'Referee Letter')
     373    title = _(u'Referee Letter Scan')
     374    mus = 1024 * 150
     375    download_name = u'ref_let'
     376
     377class RefereeLetterImage(Image):
     378    """Renders Referee Letter scan.
     379    """
     380    grok.name('ref_let')
     381    download_name = u'ref_let'
     382
     383# Second Referee Letter (PG Students only)
     384
     385class SecondRefereeLetterDisplay(FileDisplay):
     386    """Second Referee Letter display viewlet.
     387    """
     388    grok.order(1)
     389    label = _(u'Second Referee Letter')
     390    title = _(u'Second Referee Letter')
     391    download_name = u'ref_let2'
     392
     393class SecondRefereeLetterSlip(SecondRefereeLetterDisplay):
     394    grok.view(ExportPDFClearanceSlipPage)
     395
     396class SecondRefereeLetterUpload(FileUpload):
     397    """Referee Letter upload viewlet.
     398    """
     399    grok.order(2)
     400    label = _(u'Second Referee Letter')
     401    title = _(u'Second Referee Letter Scan')
     402    mus = 1024 * 150
     403    download_name = u'ref_let2'
     404
     405    @property
     406    def show_viewlet(self):
     407        cm = getattr(self.context,'current_mode', None)
     408        if cm is not None and cm.startswith('pg'):
     409            return True
     410        return False
     411
     412class SecondRefereeLetterImage(Image):
     413    """Renders Referee Letter scan.
     414    """
     415    grok.name('ref_let2')
     416    download_name = u'ref_let2'
     417
     418# Third Referee Letter (PG Students only)
     419
     420class ThirdRefereeLetterDisplay(FileDisplay):
     421    """Third Referee Letter display viewlet.
     422    """
     423    grok.order(1)
     424    label = _(u'Third Referee Letter')
     425    title = _(u'Third Referee Letter')
     426    download_name = u'ref_let3'
     427
     428class ThirdRefereeLetterSlip(ThirdRefereeLetterDisplay):
     429    grok.view(ExportPDFClearanceSlipPage)
     430
     431class ThirdRefereeLetterUpload(FileUpload):
     432    """Referee Letter upload viewlet.
     433    """
     434    grok.order(2)
     435    label = _(u'Third Referee Letter')
     436    title = _(u'Third Referee Letter Scan')
     437    mus = 1024 * 150
     438    download_name = u'ref_let3'
     439
     440    @property
     441    def show_viewlet(self):
     442        cm = getattr(self.context,'current_mode', None)
     443        if cm is not None and cm.startswith('pg'):
     444            return True
     445        return False
     446
     447class ThirdRefereeLetterImage(Image):
     448    """Renders Referee Letter scan.
     449    """
     450    grok.name('ref_let3')
     451    download_name = u'ref_let3'
     452
     453# Statutory Declaration of Good Conduct
     454
     455class StatutoryDeclarationDisplay(FileDisplay):
     456    """Statutory Declaration of Good Conduct display viewlet.
     457    """
     458    grok.order(1)
     459    label = _(u'Statutory Declaration of Good Conduct')
     460    title = _(u'Statutory Declaration of Good Conduct')
     461    download_name = u'stat_dec'
     462
     463class StatutoryDeclarationSlip(StatutoryDeclarationDisplay):
     464    grok.view(ExportPDFClearanceSlipPage)
     465
     466class StatutoryDeclarationUpload(FileUpload):
     467    """Statutory Declaration of Good Conduct upload viewlet.
     468    """
     469    grok.order(2)
     470    label = _(u'Statutory Declaration of Good Conduct')
     471    title = _(u'Statutory Declaration of Good Conduct Scan')
     472    mus = 1024 * 150
     473    download_name = u'stat_dec'
     474
     475class StatutoryDeclarationImage(Image):
     476    """Renders Statutory Declaration of Good Conduct scan.
     477    """
     478    grok.name('stat_dec')
     479    download_name = u'stat_dec'
     480
     481# Letter of Admission (PG Students only)
     482
     483class LetterAdmissionDisplay(FileDisplay):
     484    """Letter of Admission display viewlet.
     485    """
     486    grok.order(1)
     487    label = _(u'Letter of Admission')
     488    title = _(u'Letter of Admission')
     489    download_name = u'admission_let'
     490
     491class LetterAdmissionSlip(LetterAdmissionDisplay):
     492    grok.view(ExportPDFClearanceSlipPage)
     493
     494class LetterAdmissionUpload(FileUpload):
     495    """Letter of Admission upload viewlet.
     496    """
     497    grok.order(2)
     498    label = _(u'Letter of Admission')
     499    title = _(u'Letter of Admission Scan')
     500    mus = 1024 * 150
     501    download_name = u'admission_let'
     502
     503    @property
     504    def show_viewlet(self):
     505        cm = getattr(self.context,'current_mode', None)
     506        if cm is not None and cm.startswith('pg'):
     507            return True
     508        return False
     509
     510class LetterAdmissionImage(Image):
     511    """Renders Letter of Admission scan.
     512    """
     513    grok.name('admission_let')
     514    download_name = u'admission_let'
Note: See TracChangeset for help on using the changeset viewer.