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

Last change on this file since 9830 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
RevLine 
[7195]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##
[6958]18"""Vocabularies and sources for the accommodation section.
19"""
[7068]20from  grok import getSite
21from zope.component import getUtility
22from zope.catalog.interfaces import ICatalog
23from zc.sourcefactory.contextual import BasicContextualSourceFactory
[7819]24from waeup.kofa.interfaces import SimpleKofaVocabulary
[7811]25from waeup.kofa.interfaces import MessageFactory as _
[9400]26from waeup.kofa.university.vocabularies import ContextualDictSourceFactoryBase
[6958]27
[7068]28NOT_OCCUPIED = u'not occupied'
[6958]29
[9400]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
[7819]37bed_letters = SimpleKofaVocabulary(
[7718]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'),
[9371]47    (_('Bed J'),'J'),
48    (_('Bed K'),'K'),
49    (_('Bed L'),'L'),
[6958]50    )
51
[7819]52blocks = SimpleKofaVocabulary(
[7718]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'),
[9373]68    (_('Block Q'),'Q'),
[9507]69    (_('Block R'),'R'),
70    (_('Block S'),'S'),
71    (_('Block T'),'T'),
72    (_('Block U'),'U'),
73    (_('Block V'),'V'),
74    (_('Block W'),'W'),
[6958]75    )
Note: See TracBrowser for help on using the repository browser.