Changeset 828 for WAeUP_SRP/trunk/skins


Ignore:
Timestamp:
10 Nov 2006, 15:26:31 (18 years ago)
Author:
joachim
Message:

reenabled waeup_tool,
reserve accommodation fixed

Location:
WAeUP_SRP/trunk/skins
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_accommodation/formatBed.py

    r821 r828  
    1717    return ''
    1818hall,block,room,letter = bed.split('_')
    19 hall_title = context.restrictedTraverse("%s/campus/getHallTitle" %
    20                          (context.portal_url.getPortalPath()))(hall)
     19info = context.waeup_tool.getAccommodationInfo(bed)
     20if info:
     21    hall_title = info['hall_title']
     22else:
     23    hall_title = ""
    2124return " %s / Block %s / Room %s / Bed %s" % (hall_title,block,room,letter)
  • WAeUP_SRP/trunk/skins/waeup_custom/logged_in.py

    r805 r828  
    5151            info = context.getStudentInfo()
    5252            student = info['student']
    53             if info['review_state'] in ("student_created","admitted"):
     53            if info['review_state'] in ("student_created","admitted") and\
     54            wftool.getInfoFor(info['app'],'review_state',None) == 'created' :
    5455                #student.content_status_modify(workflow_action="enter_clearance_pin")
    5556                wftool.doActionFor(info['app'],'open')
  • WAeUP_SRP/trunk/skins/waeup_student/accommodation_pin_form.pt

    r821 r828  
    2424            <li>Print the Hostel Allocation Slip.</li>
    2525          </ul>
    26           <ul tal:condition="python: mode == 'edit'">
    27             <li>Buy a Hostel Maintainance Scratch Card.</li>
     26          <ul tal:condition="python: mode == 'edit'"
     27              tal:define="info python: context.getStudentInfo()">
     28            <li>Buy a Hostel Maintainance Scratch Card
     29            (Code: <span tal:replace="python: info['acco_doc'].acco_maint_code" />) for
     30            <span tal:replace="python: info['acco_doc'].acco_maint_fee" /></li>
    2831            <li>Enter the PIN above.</li>
    2932            <li>Print the Hostel Allocation Slip.</li>
  • WAeUP_SRP/trunk/skins/waeup_student/getMaintenancePrefix.py

    r805 r828  
    1212return the Prefix for hostel maintenance scratchcards
    1313"""
    14 info = context.getStudentInfo()
    15 prefix = ""
    16 if not info['acco']:
    17     return prefix
    18 bed = info['acco_doc'].bed
    19 hall,block,room,letter = bed.split('_')
    20 res = context.portal_catalog(portal_type="AccoHall",id=hall)
    21 if res and len(res) == 1:
    22     prefix = res[0].getObject().getContent().maintenance_code
    23 return prefix
     14s_info = context.getStudentInfo()
     15if s_info.has_key('acco_doc'):
     16    info = context.waeup_tool.getAccommodationInfo(s_info['acco_doc'].bed)
     17    if info:
     18        return info['maintenance_code']
     19return ""
  • WAeUP_SRP/trunk/skins/waeup_student/reserve_accommodation.py

    r821 r828  
    7373        student.invokeFactory('StudentAccommodation',acco_id)
    7474        acco = getattr(student,acco_id)
     75        acco_info = context.waeup_tool.getAccommodationInfo(bed)
     76        ds.set('acco_maint_code', acco_info.get('maintenance_code'))
     77        ds.set('acco_maint_fee', acco_info.get('maintenance_fee'))
    7578        ds.set('acco_res_date', current)
    7679        ds.set('bed', bed)
     
    8689wftool.doActionFor(acco,'pay_maintenance_fee',dest_container=acco)
    8790return context.REQUEST.RESPONSE.redirect("%s/accommodation_view" % student.absolute_url())
    88 
    89 
Note: See TracChangeset for help on using the changeset viewer.