Changeset 654 for WAeUP_SRP/trunk
- Timestamp:
- 11 Oct 2006, 08:51:55 (18 years ago)
- Location:
- WAeUP_SRP/trunk/skins
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_accommodation/acco_folder_view.pt
r649 r654 28 28 <th width="200px">Bed Type</th> 29 29 <th>Total No of Beds</th> 30 <th>Reserved Beds</th> 30 31 </tr> 31 32 <tr tal:repeat="bt bed_types"> 32 33 <td tal:content="bt/name" /> 33 <td tal:content="bt/count" /> 34 </tr> 35 </table> 36 <table tal:condition="info/reserved" 37 tal:define="reserved info/reserved"> 38 <tr> 39 <th width="200px">Student</th> 40 <th>Bed</th> 41 </tr> 42 <tr tal:repeat="bt reserved"> 43 <td tal:content="bt/student" /> 44 <td tal:content="bt/bed" /> 34 <td tal:content="bt/total" /> 35 <td tal:content="bt/reserved" /> 45 36 </tr> 46 37 </table> -
WAeUP_SRP/trunk/skins/waeup_accommodation/acco_hall_view.pt
r649 r654 22 22 <th width="190px">Bed Type</th> 23 23 <th>Total No of Beds</th> 24 <th>Reserved Beds</th> 24 25 </tr> 25 26 <tr tal:repeat="bt bed_types"> 26 27 <td tal:content="bt/name" /> 27 <td tal:content="bt/count" /> 28 <td tal:content="bt/total" /> 29 <td tal:content="bt/reserved" /> 28 30 </tr> 29 31 <tr><td> </td></tr> 32 </table> 33 <table tal:condition="info/reserved" 34 tal:define="reserved info/reserved"> 35 <tr> 36 <th width="200px">Student</th> 37 <th>Bed</th> 38 </tr> 39 <tr tal:repeat="bt reserved"> 40 <td tal:content="bt/student" /> 41 <td tal:content="bt/bed" /> 42 </tr> 30 43 </table> 31 44 -
WAeUP_SRP/trunk/skins/waeup_accommodation/formatBed.py
r642 r654 6 6 7 7 hall,block,room,letter = bed.split('_') 8 return "Bed %s in Room %s in Block %s in Hall %s" % (letter,room,block,hall) 8 res = context.portal_catalog(portal_type="AccoHall",id=hall) 9 if res and len(res) == 1: 10 hall_title = res[0].Title 11 return "Bed %s in Room %s in Block %s in Hall %s" % (letter,room,block,hall_title) -
WAeUP_SRP/trunk/skins/waeup_accommodation/getAccoFolderInfo.py
r649 r654 39 39 bt_list = [] 40 40 bt_names = context.getBedTypeNames() 41 reserved = pa.uniqueValuesFor('student') 41 42 for bt in bed_types: 42 res = pa(bed_type=bt) 43 bt_list.append({'name': bt_names[bt], 'count': len(res)}) 43 total = len(pa(bed_type=bt)) 44 free = len(pa.searchResults({'bed_type': bt,'student':reserved})) 45 bt_list.append({'name': bt_names[bt], 46 'total': total, 47 'reserved': free, 48 }) 44 49 info['bed_types'] = bt_list 45 50 reserved = pa.uniqueValuesFor('student') -
WAeUP_SRP/trunk/skins/waeup_accommodation/getAccoHallInfo.py
r649 r654 29 29 bt_list = [] 30 30 bt_names = context.getBedTypeNames() 31 reserved = pa.uniqueValuesFor('student') 31 32 for bt in bed_types: 32 res = pa(bed_type=bt,hall=context.getId()) 33 bt_list.append({'name': bt_names[bt], 'count': len(res)}) 33 total = len(pa(bed_type=bt)) 34 free = len(pa.searchResults({'bed_type': bt,'student':reserved})) 35 bt_list.append({'name': bt_names[bt], 36 'total': total, 37 'reserved': free, 38 }) 34 39 info['bed_types'] = bt_list 40 res_list = [] 41 if reserved > 1: 42 for st in reserved: 43 if st: 44 res = pa(hall=context.getId(),student=st) 45 if res: 46 res_list.append({'student': st, 'bed': context.formatBed(res[0].bed) }) 47 info['reserved'] = res_list 35 48 36 49 return info -
WAeUP_SRP/trunk/skins/waeup_custom/logged_in.py
r648 r654 79 79 member.setProperties(last_login_time=current,login_time=current) 80 80 if info['review_state'] == "application_pin_entered": 81 wftool.doActionFor(info['app'],'open',dest_container=info['app'])81 #wftool.doActionFor(info['app'],'open',dest_container=info['app']) 82 82 return response.redirect("%s/passport_entry_view" % student.absolute_url()) 83 83 return response.redirect("%s" % student.absolute_url())
Note: See TracChangeset for help on using the changeset viewer.