# -*- coding: utf-8 # Copyright 2006 by Pjotr Savitski from Products.Archetypes.public import BaseSchema, Schema from Products.Archetypes.public import StringField, LinesField, DateTimeField, TextField, FileField from Products.Archetypes.public import LinesWidget, TextAreaWidget, IdWidget, StringWidget, SelectionWidget, CalendarWidget, MultiSelectionWidget, RichWidget, FileWidget, LabelWidget from Products.Archetypes.public import BaseContent, registerType from Globals import InitializeClass from Products.CMFCore.utils import getToolByName from AccessControl import ClassSecurityInfo, Unauthorized from config import PROJECT_NAME schema = BaseSchema + Schema(( TextField('iDescription', required=True, accessor="getiDescription", searchable=0, isMetadata=0, default='', default_output_type='text/html', widget=TextAreaWidget( cols=40, rows=5, label="Description", label_msgid='label_description', i18n_domain="plone" ), ), )) class Affordance(BaseContent): """ Affordance object addable in the iCampFolio folder """ meta_type = "Affordance" archetype_name = "Affordance" global_allow = 0 exclude_from_nav = True allow_discussion = True allowed_content_types = [] security = ClassSecurityInfo() _at_rename_after_creation = True schema = schema content_icon='affordance_icon.gif' actions = ( { 'id':'view', 'name':'View', 'action':'string:${object_url}/base_view', 'permissions': ('View',), }, { 'id':'edit', 'name':'Edit', 'action':'string:${object_url}/base_edit', 'permissions': ('Manage Portal',) }, ) registerType(Affordance, PROJECT_NAME)