source: main/waeup.kofa/trunk/src/waeup/kofa/hostels/vocabularies.py @ 10178

Last change on this file since 10178 was 9507, checked in by Henrik Bettermann, 12 years ago

Add webservices module.

Add more hostel block letters.

  • Property svn:keywords set to Id
File size: 2.3 KB
Line 
1## $Id: vocabularies.py 9507 2012-11-02 10:46:22Z henrik $
2##
3## Copyright (C) 2011 Uli Fouquet & Henrik Bettermann
4## This program is free software; you can redistribute it and/or modify
5## it under the terms of the GNU General Public License as published by
6## the Free Software Foundation; either version 2 of the License, or
7## (at your option) any later version.
8##
9## This program is distributed in the hope that it will be useful,
10## but WITHOUT ANY WARRANTY; without even the implied warranty of
11## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12## GNU General Public License for more details.
13##
14## You should have received a copy of the GNU General Public License
15## along with this program; if not, write to the Free Software
16## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17##
18"""Vocabularies and sources for the accommodation section.
19"""
20from  grok import getSite
21from zope.component import getUtility
22from zope.catalog.interfaces import ICatalog
23from zc.sourcefactory.contextual import BasicContextualSourceFactory
24from waeup.kofa.interfaces import SimpleKofaVocabulary
25from waeup.kofa.interfaces import MessageFactory as _
26from waeup.kofa.university.vocabularies import ContextualDictSourceFactoryBase
27
28NOT_OCCUPIED = u'not occupied'
29
30class SpecialHandlingSource(ContextualDictSourceFactoryBase):
31    """A application category source delivers all special handling categories
32    provided for accommodation booking.
33    """
34    #: name of dict to deliver from kofa utils.
35    DICT_NAME = 'SPECIAL_HANDLING_DICT'
36
37bed_letters = SimpleKofaVocabulary(
38    (_('Bed A'),'A'),
39    (_('Bed B'),'B'),
40    (_('Bed C'),'C'),
41    (_('Bed D'),'D'),
42    (_('Bed E'),'E'),
43    (_('Bed F'),'F'),
44    (_('Bed G'),'G'),
45    (_('Bed H'),'H'),
46    (_('Bed I'),'I'),
47    (_('Bed J'),'J'),
48    (_('Bed K'),'K'),
49    (_('Bed L'),'L'),
50    )
51
52blocks = SimpleKofaVocabulary(
53    (_('Block A'),'A'),
54    (_('Block B'),'B'),
55    (_('Block C'),'C'),
56    (_('Block D'),'D'),
57    (_('Block E'),'E'),
58    (_('Block F'),'F'),
59    (_('Block G'),'G'),
60    (_('Block H'),'H'),
61    (_('Block I'),'I'),
62    (_('Block K'),'K'),
63    (_('Block L'),'L'),
64    (_('Block M'),'M'),
65    (_('Block N'),'N'),
66    (_('Block O'),'O'),
67    (_('Block P'),'P'),
68    (_('Block Q'),'Q'),
69    (_('Block R'),'R'),
70    (_('Block S'),'S'),
71    (_('Block T'),'T'),
72    (_('Block U'),'U'),
73    (_('Block V'),'V'),
74    (_('Block W'),'W'),
75    )
Note: See TracBrowser for help on using the repository browser.