Ignore:
Timestamp:
23 Nov 2006, 11:54:49 (18 years ago)
Author:
joachim
Message:

add special handling code to hostels
use letters for blocks

File:
1 edited

Legend:

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

    r805 r926  
    1010# $Id$
    1111
    12 return {'female_fr': 'Female New Student',
    13              'female_fi': 'Female Final Student',
    14              'female_re': 'Female Returning Student',
    15              'female_reserved': 'Female Reserved',
    16              'female_xx': 'Female Other',
    17              'male_fr': 'Male New Student',
    18              'male_fi': 'Male Final Student',
    19              'male_re': 'Male Returning Student',
    20              'male_reserved': 'Male Reserved',
    21              'male_xx': 'Male Other'
    22              }
     12type_suffixes = [('fr','New Student'),
     13                 ('fi','Final Student'),
     14                 ('re','Returning Student'),
     15                 ('reserved','Reserved'),
     16                 ]
     17special = [item for item in context.portal_vocabularies.acco_special_handling.items()
     18                            if item[0] != 'no']
     19type_suffixes.extend(special)
     20dict = {}
     21for gender in ('female','male'):
     22    for suffix,desc in type_suffixes:
     23        dict['%s_%s' % (gender,suffix)] = '%s %s' % (gender.capitalize(),desc)
     24return dict
     25##return {'female_fr': 'Female New Student',
     26##             'female_fi': 'Female Final Student',
     27##             'female_re': 'Female Returning Student',
     28##             'female_reserved': 'Female Reserved',
     29##             'female_xx': 'Female Other',
     30##             'male_fr': 'Male New Student',
     31##             'male_fi': 'Male Final Student',
     32##             'male_re': 'Male Returning Student',
     33##             'male_reserved': 'Male Reserved',
     34##             'male_xx': 'Male Other'
     35##             }
Note: See TracChangeset for help on using the changeset viewer.