# -*- coding: utf-8 # Copyright 2006 by Meelis Mets from Products.Archetypes.public import BaseSchema, Schema from Products.Archetypes.public import BooleanField, ImageField, StringField, TextField from Products.Archetypes.public import BooleanWidget, ImageWidget, StringWidget, SelectionWidget, RichWidget 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('bodytext', accessor='getBodyText', validators = ('isTidyHtmlWithCleanup',), default_output_type = 'text/x-html-safe', allowable_content_types = ('text/html',), widget = RichWidget( label="Body text", description="", label_msgid='label_body_text', description_msgid='description_body_text', visible={'view':'visible','edit':'visible'}, i18n_domain="psyhvel", rows = 10 ), ), )) class GameIntroduction(BaseContent): """ Game Introduction""" meta_type = "GameIntroduction" archetype_name = "Game Introduction" global_allow = 0 exclude_from_nav = True filter_content_types = True allowed_content_types = () security = ClassSecurityInfo() schema = schema actions = ( { 'id':'view', 'name':'View', 'action':'string:${object_url}/base_view', 'permissions': ('View',), }, { 'id':'edit', 'name':'Configuration', 'action':'string:${object_url}/base_edit', 'permissions': ('Modify portal content',), }, { 'id':'metadata', 'name':'Info', 'action':'string:${object_url}/base_metadata', 'permissions': ('View',), }, ) registerType(GameIntroduction, PROJECT_NAME)