Ignore:
Timestamp:
9 Oct 2006, 09:09:57 (18 years ago)
Author:
joachim
Message:

several overviews for AccoFolder?,

File:
1 edited

Legend:

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

    r622 r626  
    3535    items.append(row)
    3636info['items'] = items
     37pa = context.portal_accommodation
     38bed_types = pa.uniqueValuesFor('bed_type')
     39bt_list = []
     40for bt in bed_types:
     41    res = pa(bed_type=bt)
     42    bt_list.append({'name': bt, 'count': len(res)})
     43info['bed_types'] = bt_list
     44reserved = pa.uniqueValuesFor('student')
     45res_list = []
     46if reserved > 1:
     47    for st in reserved:
     48        if st:
     49            res = pa(student=st)
     50            bt_list.append({'student': st, 'bed': res[0].bed })
     51info['reserved'] = res_list
     52
    3753return info
Note: See TracChangeset for help on using the changeset viewer.