# -*- coding: utf-8 # Copyright 2006 by Meelis Mets from Products.Archetypes.public import BaseSchema, Schema from Products.Archetypes.public import StringField, LinesField from Products.Archetypes.public import LinesWidget, TextAreaWidget, IdWidget, StringWidget, SelectionWidget from Products.Archetypes.public import OrderedBaseFolder, registerType from Globals import InitializeClass from Products.CMFCore.utils import getToolByName from AccessControl import ClassSecurityInfo, Unauthorized from config import PROJECT_NAME schema = BaseSchema class MyFolder(OrderedBaseFolder): """ MyFolder product """ meta_type = "MyFolder" archetype_name = "MyFolder" global_allow = 0 filter_content_types = True allowed_content_types = ('BaseTask','Paper','PaperAnswer','Crossword','CrosswordAnswer','Pairs','PairsAnswer','WordMap','ImageEditorRaster','Chatroom','FillIn','FillInAnswer','Math','MathAnswer','Image','Folder') security = ClassSecurityInfo() schema = schema actions = ( { 'id':'view', 'name':'View', 'action':'string:${object_url}/base_view', 'permissions': ('View',), }, ) registerType(MyFolder, PROJECT_NAME)