Changeset 17658 for main


Ignore:
Timestamp:
22 Dec 2023, 11:56:48 (12 months ago)
Author:
Henrik Bettermann
Message:

Ticket #1328 (first part)

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

Legend:

Unmodified
Added
Removed
  • main/waeup.uniben/trunk/src/waeup/uniben/browser/pages.py

    r17416 r17658  
    101101    """
    102102    grok.template('mytranscriptrequests')
     103
     104    def yesno(self, value):
     105        if value in (None, False, 0):
     106            return 'no'
     107        if value in (True, 1):
     108            return 'yes'
     109        if value == 'o':
     110            return 'OC'
     111        if value == 'c':
     112            return 'CTC'
     113        if value is not None:
     114            return 'yes'
     115        return
  • main/waeup.uniben/trunk/src/waeup/uniben/browser/templates/mytranscriptrequests.pt

    r17505 r17658  
    1010    <th i18n:translate="">Full Name</th>
    1111    <th i18n:translate="">Course Studied</th>
    12     <th i18n:translate="">CTC</th>
     12    <th i18n:translate="">ToO</th>
     13    <th i18n:translate="">Trans</th>
    1314    <th i18n:translate="">CB</th>
    1415    <th i18n:translate="">GS</th>
     
    2728    </td>
    2829    <td tal:content="python:item[0].display_fullname">Bob</td>
    29     <td tal:content="python:getattr(item[0].course_studied,'title',None)">Bob</td>
     30    <td tal:content="python:getattr(item[0].course_studied,'title',None)">M.Sc. Anatomy</td>
    3031    <td> <a tal:attributes="href python:view.url(item[0])">
    31       <span tal:content="python:getattr(item[0],'order',None)">XYZ08098799</span></a>
     32      <span tal:content="python:view.yesno(getattr(item[0],'order'))">o</span></a>
    3233    </td>
    3334    <td> <a tal:attributes="href python:view.url(item[0])">
    34       <span tal:content="python:getattr(item[0],'collected',None)">YES</span></a>
     35      <span tal:content="python:view.yesno(getattr(item[0],'course_changed',None))">yes</span></a>
     36    </td>
     37    <td> <a tal:attributes="href python:view.url(item[0])">
     38      <span tal:content="python:view.yesno(getattr(item[0],'collected',None))">yes</span></a>
    3539    </td>
    3640    <td tal:content="python:getattr(item[0],'end_session',None)">2012</td>
     
    4044  </tbody>
    4145</table>
     46
     47<p>
     48  ToO: Type of Order<br />
     49  Trans: Change of Study Course / Transfered<br />
     50  CB: Collected Before<br />
     51  GS: Graduation Session
     52  SM: Study Mode
     53</p>
    4254
    4355<h3 i18n:domain="waeup.kofa" i18n:translate="" tal:condition="python:view.getStudents[0]">
Note: See TracChangeset for help on using the changeset viewer.