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

Last change on this file since 13302 was 11450, checked in by Henrik Bettermann, 11 years ago

Move ContextualDictSourceFactoryBase? to waeup.kofa.interfaces to avoid circular imports.

  • Property svn:keywords set to Id
File size: 2.3 KB
Line 
1## $Id: vocabularies.py 11450 2014-02-27 06:25:18Z 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 (
25    SimpleKofaVocabulary, ContextualDictSourceFactoryBase)
26from waeup.kofa.interfaces import MessageFactory as _
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 J'),'J'),
63    (_('Block K'),'K'),
64    (_('Block L'),'L'),
65    (_('Block M'),'M'),
66    (_('Block N'),'N'),
67    (_('Block O'),'O'),
68    (_('Block P'),'P'),
69    (_('Block Q'),'Q'),
70    (_('Block R'),'R'),
71    (_('Block S'),'S'),
72    (_('Block T'),'T'),
73    (_('Block U'),'U'),
74    (_('Block V'),'V'),
75    (_('Block W'),'W'),
76    )
Note: See TracBrowser for help on using the repository browser.