# -*- coding: utf-8 -*- # # File: TeleServices.py # # Copyright (c) 2007 by CommunesPlone # Generator: ArchGenXML Version 1.5.3 dev/svn # http://plone.org/products/archgenxml # # GNU General Public License (GPL) # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA # 02110-1301, USA. # __author__ = """Gauthier BASTIEN , Stephan GEULETTE """ __docformat__ = 'plaintext' # Product configuration. # # The contents of this module will be imported into __init__.py, the # workflow configuration and every content type module. # # If you wish to perform custom configuration, you may put a file # AppConfig.py in your product's root directory. This will be included # in this file if found. try: # New CMF from Products.CMFCore.permissions import setDefaultRoles except ImportError: # Old CMF from Products.CMFCore.CMFCorePermissions import setDefaultRoles ##code-section config-head #fill in your manual code here #name of the root folder to create ROOT_FOLDER_NAME = "myteleservices" #name of excluded types EXCLUDED_TYPES = ['GenericTeleService', 'TeleServicesTool', 'DemandTypeTerm', 'MotivationTerm', 'DestinationTerm', 'BelDonorTeleService'] #le nom du smart folder qui retourne toutes les demandes ATTOPIC_ALL_NAME = "searchallteleservices" ATTOPIC_CITIZEN_DEFAULT = "defaultcitizensearch" ATTOPIC_MANAGER_DEFAULT = "defaultmanagersearch" ATTOPIC_LAST_NAME = "searchforlast" ATTOPIC_LAST_ITEM_COUNT = 10 #permet l'ajout par les membres dans leur section ALLOW_ADD_IN_MEMBERS = 0 #Add an empty value in vocabulary display proposing to choose a value and returning an error if not changed ADD_EMPTY_VOCAB_VALUE = True EMPTY_VOCAB_VALUE = 'choose_a_value' #default value for motivation, destination, optional fields, ... DEFAULT_VOCAB_VALUE = DEFAULT_NO_VALUE = "_no_value_" #default value for date format optional field #must be a DateTime for comparaison in populationteleservice_view from DateTime import DateTime DEFAULT_DATE_NO_VALUE = DateTime('1930/01/01') #list of manager roles MANAGER_ROLES = ['Manager', 'PopulationTSManager', 'WorkTSManager'] CLASS_ROLES = {'PopulationTeleService' : 'PopulationTSManager', 'WorkTeleService' : 'WorkTSManager'} #max length of fixed begin on structuredComBegin field of demandtypeterm SCB_LENGTH = 7 #modes of payment available #key=bank_transfer, value=Bank Transfer PAYMENT_MODES = ('bank_transfer',) ##/code-section config-head PROJECTNAME = "TeleServices" # Check for Plone 2.1 try: from Products.CMFPlone.migrations import v2_1 except ImportError: HAS_PLONE21 = False else: HAS_PLONE21 = True # Permissions DEFAULT_ADD_CONTENT_PERMISSION = "Add portal content" setDefaultRoles(DEFAULT_ADD_CONTENT_PERMISSION, ('Manager', 'Owner')) ADD_CONTENT_PERMISSIONS = { 'GenericTeleService': 'TeleServices: Add GenericTeleService', 'WorkTeleService': 'TeleServices: Add WorkTeleService', 'PopulationTeleService': 'TeleServices: Add PopulationTeleService', 'MotivationTerm': 'TeleServices: Add MotivationTerm', 'DemandTypeTerm': 'TeleServices: Add DemandTypeTerm', 'DestinationTerm': 'TeleServices: Add DestinationTerm', 'BelDonorTeleService': 'TeleServices: Add BelDonorTeleService', } setDefaultRoles('TeleServices: Add GenericTeleService', ('Manager', )) setDefaultRoles('TeleServices: Add WorkTeleService', ('Manager', )) setDefaultRoles('TeleServices: Add PopulationTeleService', ('Manager', )) setDefaultRoles('TeleServices: Add MotivationTerm', ('Manager', )) setDefaultRoles('TeleServices: Add DemandTypeTerm', ('Manager', )) setDefaultRoles('TeleServices: Add DestinationTerm', ('Manager', )) setDefaultRoles('TeleServices: Add BelDonorTeleService', ('Manager', )) product_globals = globals() # Dependencies of Products to be installed by quick-installer # override in custom configuration DEPENDENCIES = [] # Dependend products - not quick-installed - used in testcase # override in custom configuration PRODUCT_DEPENDENCIES = [] # You can overwrite these two in an AppConfig.py: # STYLESHEETS = [{'id': 'my_global_stylesheet.css'}, # {'id': 'my_contenttype.css', # 'expression': 'python:object.getTypeInfo().getId() == "MyType"'}] # You can do the same with JAVASCRIPTS. STYLESHEETS = [] JAVASCRIPTS = [] ##code-section config-bottom #fill in your manual code here #class schemas in function of the folder name containing the demandtype_term from Products.TeleServices.PopulationTeleService import PopulationTeleService_schema as pts_schema from Products.TeleServices.WorkTeleService import WorkTeleService_schema as wts_schema SCHEMAS = { 'populationteleservice_config' : pts_schema, 'workteleservice_config' : wts_schema} DEPENDENCIES = ['CPDescriptive'] PRODUCT_DEPENDENCIES = [] STYLESHEETS = [{'id': 'teleservices.css', 'title': 'CSS for TeleServices'}] SET_EXCLUDE_FROM_NAV = True HAS_PLONEPAS = False try: from Products import PlonePAS HAS_PLONEPAS = True except ImportError: pass ##/code-section config-bottom # Load custom configuration not managed by ArchGenXML try: from Products.TeleServices.AppConfig import * except ImportError: pass