Changeset 627 for WAeUP_SRP/trunk/skins
- Timestamp:
- 9 Oct 2006, 10:02:41 (18 years ago)
- Location:
- WAeUP_SRP/trunk/skins/waeup_accommodation
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_accommodation/acco_hall_view.pt
r622 r627 11 11 <h3 tal:content="here/title_or_id" /> 12 12 <div tal:condition="nothing" tal:content="info/container_path"/> 13 <table tal:condition="info/bed_types" 14 tal:define="bed_types info/bed_types"> 15 <tr> 16 <th>Bed Type</th> 17 <th>Beds</th> 18 </tr> 19 <tr tal:repeat="bt bed_types"> 20 <td tal:content="bt/name" /> 21 <td tal:content="bt/count" /> 22 </tr> 23 <tr><td> </td></tr> 24 </table> 13 25 </metal:block> 14 26 <metal:main fill-slot="main"> -
WAeUP_SRP/trunk/skins/waeup_accommodation/getAccoHallsInfo.py
r626 r627 38 38 bed_types = pa.uniqueValuesFor('bed_type') 39 39 bt_list = [] 40 bt_names = context.getBedTypeNames() 40 41 for bt in bed_types: 41 42 res = pa(bed_type=bt) 42 bt_list.append({'name': bt , 'count': len(res)})43 bt_list.append({'name': bt_names[bt], 'count': len(res)}) 43 44 info['bed_types'] = bt_list 44 45 reserved = pa.uniqueValuesFor('student') -
WAeUP_SRP/trunk/skins/waeup_accommodation/getHallInfo.py
r622 r627 17 17 path_info = request.get('PATH_INFO').split('/') 18 18 mtool = context.portal_membership 19 19 pa = context.portal_accommodation 20 20 info = {} 21 21 #dep_id = request.get('PATH_TRANSLATED').split('/')[-2] … … 26 26 info['choosen_ids'] = request.get('ids',[]) 27 27 info['doc'] = context.getContent() 28 bed_types = pa.uniqueValuesFor('bed_type') 29 bt_list = [] 30 bt_names = context.getBedTypeNames() 31 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)}) 34 info['bed_types'] = bt_list 35 28 36 return info
Note: See TracChangeset for help on using the changeset viewer.