# File: PDDBPersons.py
"""\
unknown

RCS-ID $Id: codesnippets.py 3571 2005-02-10 17:48:47Z optilude $
"""
# Copyright (c) 2005 by Institut fuer Elektronische Musik, KU Graz, Austria
#
# Generated: Fri Feb 11 16:20:49 2005
# Generator: ArchGenXML Version 1.4 devel http://sf.net/projects/archetypes/
#
# GNU General Public Licence (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., 59 Temple
# Place, Suite 330, Boston, MA  02111-1307  USA
#
__author__  = '''Winfried Ritsch <ritsch@iem.at>'''
__docformat__ = 'plaintext'

from AccessControl import ClassSecurityInfo
from Products.Archetypes.public import *

from Products.ATContentTypes.types.ATFolder import ATBTreeFolder

# additional imports from tagged value 'import'
from Products.ATReferenceBrowserWidget.ATReferenceBrowserWidget import *

from Products.PDDatabase.config import *

##code-section module-header #fill in your manual code here
##/code-section module-header

schema= Schema((
    StringField('id',
        widget=StringWidget(
            label_msgid="label_short_name",
            i18n_domain="plone",
            description_msgid="help_short_name",
            label='Id',
            description='Enter a value for id.',
        ),
    ),
    
    StringField('title',
        widget=StringWidget(
            label_msgid="label_title",
            i18n_domain="plone",
            description_msgid="help_title",
            label='Title',
            description='Enter a value for title.',
        ),
        accessor="Title",
        searchable=1,
    ),
    
),
)

##code-section after-schema #fill in your manual code here
##/code-section after-schema

class PDDBPersons(ATBTreeFolder):
    security = ClassSecurityInfo()
    __implements__ = (getattr(ATBTreeFolder,'__implements__',()),)

    portal_type = meta_type    = 'PDDBPersons' 
    archetype_name             = 'PDDBPersons' #this name appears in the 'add' box 
    allowed_content_types      = ['PDDBPerson', 'PDDBPersons'] + getattr(ATBTreeFolder,'allowed_content_types',[])
    filter_content_types       = 0
    global_allow               = 0
    allow_discussion           = 0
    content_icon               = 'pddbpersons.gif'
    immediate_view             = 'base_view'
    typeDescription            = """PDDBPersons"""
    typeDescMsgId              = 'description_edit_pddbpersons'

    actions =  (


       {'action':      "string:$object_url/pddb_persons_listing",
        'category':    "object",
        'id':          'view',
        'name':        'View',
        'permissions': ("View",),
        'condition'  : 'python:1'
       },
        

    )

    schema = getattr(ATBTreeFolder,'schema',Schema(())) + \
             schema

    ##code-section class-header #fill in your manual code here
    ##/code-section class-header


    #Methods

registerType(PDDBPersons)
# end of class PDDBPersons

##code-section module-footer #fill in your manual code here
##/code-section module-footer


