- Timestamp:
- 24 Oct 2012, 05:16:32 (12 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/hostels/interfaces.py
r9199 r9400 23 23 from waeup.kofa.interfaces import MessageFactory as _ 24 24 from waeup.kofa.hostels.vocabularies import ( 25 bed_letters, blocks, special_handling, StudentSource)25 bed_letters, blocks, SpecialHandlingSource, StudentSource) 26 26 27 27 class IHostelsContainer(IKofaObject): … … 172 172 special_handling = schema.Choice( 173 173 title = _(u'Special Handling'), 174 vocabulary = special_handling,174 source = SpecialHandlingSource(), 175 175 required = True, 176 176 default = u'regular', -
main/waeup.kofa/trunk/src/waeup/kofa/hostels/vocabularies.py
r9373 r9400 24 24 from waeup.kofa.interfaces import SimpleKofaVocabulary 25 25 from waeup.kofa.interfaces import MessageFactory as _ 26 from waeup.kofa.university.vocabularies import ContextualDictSourceFactoryBase 26 27 27 28 NOT_OCCUPIED = u'not occupied' … … 53 54 def getTitle(self, context, value): 54 55 return "%s - %s" % (value, self.acco_students(context)[value]) 56 57 class SpecialHandlingSource(ContextualDictSourceFactoryBase): 58 """A application category source delivers all special handling categories 59 provided for accommodation booking. 60 """ 61 #: name of dict to deliver from kofa utils. 62 DICT_NAME = 'SPECIAL_HANDLING_DICT' 55 63 56 64 bed_letters = SimpleKofaVocabulary( … … 87 95 (_('Block Q'),'Q'), 88 96 ) 89 90 special_handling = SimpleKofaVocabulary(91 (_('Regular Hostel'),'regular'),92 (_('Blocked Hostel'),'blocked'),93 (_('Postgraduate Hostel'),'pg'),94 ) -
main/waeup.kofa/trunk/src/waeup/kofa/utils/utils.py
r9131 r9400 143 143 3: 'Combined', 144 144 9: 'N/A' 145 } 146 147 SPECIAL_HANDLING_DICT = { 148 'regular': 'Regular Hostel', 149 'blocked': 'Blocked Hostel', 150 'pd': 'Postgraduate Hostel' 145 151 } 146 152
Note: See TracChangeset for help on using the changeset viewer.