Changeset 642
- Timestamp:
- 10 Oct 2006, 16:31:30 (18 years ago)
- Location:
- WAeUP_SRP/trunk
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/profiles/default/types/StudentAccommodation.xml
r629 r642 8 8 <property name="product">WAeUP_SRP</property> 9 9 <property name="factory">addStudentAccommodation</property> 10 <property name="immediate_view"> student_index</property>10 <property name="immediate_view">hostal_reservation_slip</property> 11 11 <property name="global_allow">True</property> 12 12 <property name="filter_content_types">True</property> … … 26 26 <property name="storage_methods"/> 27 27 <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"/> 30 30 <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" 32 32 visible="True"> 33 33 <permission value="View"/> -
WAeUP_SRP/trunk/skins/waeup_accommodation/reserve_acco.py
r639 r642 19 19 student = info['student'] 20 20 if info['acco']: 21 return student.hostal_reservation_slip()21 return context.REQUEST.RESPONSE.redirect("%s" % info['acco'].absolute_url()) 22 22 res,psm,ds = lt.renderLayout(layout_id= 'student_acco_reserve', 23 23 schema_id= 'student_acco_reserve', … … 47 47 s_id = ds.get('s_id') 48 48 pin = str(ds.get('acco_res_ac_pin')) 49 49 50 pa = context.portal_accommodation 50 51 code,bed = pa.searchAndReserveBed(s_id,"%s_%s" % (info['sex'],ds.get('student_status'))) 51 if code < -10:52 if code < 0: 52 53 return context.reserve_acco_form(rendered = res, 53 54 psm = bed, … … 58 59 student.invokeFactory('StudentAccommodation',acco_id) 59 60 acco = getattr(student,acco_id) 60 ds ['acco_res_date'] = current61 ds ['bed'] = bed62 ds ['session'] = session61 ds.set('acco_res_date', current) 62 ds.set('bed', bed) 63 ds.set('session', session) 63 64 acco.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 )65 return 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 ## ) 71 72
Note: See TracChangeset for help on using the changeset viewer.