Changeset 642 for WAeUP_SRP


Ignore:
Timestamp:
10 Oct 2006, 16:31:30 (18 years ago)
Author:
joachim
Message:

added hostal_reservation_slip

Location:
WAeUP_SRP/trunk
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/profiles/default/types/StudentAccommodation.xml

    r629 r642  
    88 <property name="product">WAeUP_SRP</property>
    99 <property name="factory">addStudentAccommodation</property>
    10  <property name="immediate_view">student_index</property>
     10 <property name="immediate_view">hostal_reservation_slip</property>
    1111 <property name="global_allow">True</property>
    1212 <property name="filter_content_types">True</property>
     
    2626 <property name="storage_methods"/>
    2727 <property name="cps_is_portlet">False</property>
    28  <alias from="(Default)" to="student_index"/>
    29  <alias from="view" to="student_index"/>
     28 <alias from="(Default)" to="hostal_reservation_slip"/>
     29 <alias from="view" to="hostal_reservation_slip"/>
    3030 <action title="Standard View" action_id="view" category="object"
    31     condition_expr="" url_expr="string:${object_url}/student_index"
     31    condition_expr="" url_expr="string:${object_url}/hostal_reservation_slip"
    3232    visible="True">
    3333  <permission value="View"/>
  • WAeUP_SRP/trunk/skins/waeup_accommodation/reserve_acco.py

    r639 r642  
    1919student = info['student']
    2020if info['acco']:
    21     return student.hostal_reservation_slip()
     21    return context.REQUEST.RESPONSE.redirect("%s" % info['acco'].absolute_url())
    2222res,psm,ds = lt.renderLayout(layout_id= 'student_acco_reserve',
    2323                      schema_id= 'student_acco_reserve',
     
    4747    s_id = ds.get('s_id')
    4848    pin = str(ds.get('acco_res_ac_pin'))
     49   
    4950    pa = context.portal_accommodation
    5051    code,bed = pa.searchAndReserveBed(s_id,"%s_%s" % (info['sex'],ds.get('student_status')))
    51     if code < -10:
     52    if code < 0:
    5253        return context.reserve_acco_form(rendered = res,
    5354                                 psm = bed,
     
    5859student.invokeFactory('StudentAccommodation',acco_id)
    5960acco = getattr(student,acco_id)
    60 ds['acco_res_date'] = current
    61 ds['bed'] = bed
    62 ds['session'] = session
     61ds.set('acco_res_date', current)
     62ds.set('bed', bed)
     63ds.set('session', session)
    6364acco.getContent().edit(mapping=ds)
    64 return student.hostal_reservation_slip()
    65 return context.reserve_acco_form(rendered = res,
    66                                  psm = "successfully reserved bed %s" % bed,
    67                                  firstlayout = True,
    68                                  lastlayout = True,
    69                                  ds = ds,
    70                                  )
     65return context.REQUEST.RESPONSE.redirect("%s/hostal_reservation_slip" % student.absolute_url())
     66##return context.reserve_acco_form(rendered = res,
     67##                                 psm = "successfully reserved bed %s" % bed,
     68##                                 firstlayout = True,
     69##                                 lastlayout = True,
     70##                                 ds = ds,
     71##                                 )
    7172
Note: See TracChangeset for help on using the changeset viewer.