--- /dev/null
+# -*- coding: utf-8 -*-
+# (c) 2003 Centre de Recherche en Informatique ENSMP Fontainebleau <http://cri.ensmp.fr>
+# (c) 2003 BenoƮt PIN <mailto:pin@cri.ensmp.fr>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as published
+# by the Free Software Foundation.
+#
+# 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.
+#
+
+
+from Globals import InitializeClass
+from Products.CMFCore.permissions import View, ModifyPortalContent
+from BaseSlot import BaseSlot
+from OFS.SimpleItem import SimpleItem
+
+factory_type_information = ( {'id' : 'Spacer Slot',
+ 'meta_type' : 'Spacer Slot',
+ 'description' : "Spacer Slot for Mosaic Document",
+ 'icon' : 'mosaic_tool/spacer_icon.gif',
+ 'product' : 'MosaicDocument',
+ 'factory' : 'addSpacerSlot',
+ 'immediate_view' : 'view',
+ 'actions' :
+ ({'id' : 'view',
+ 'name' : 'View',
+ 'action' : 'slot_spacer_view',
+ 'permissions' : (View, )
+ },
+
+ {'id' : 'edit',
+ 'name' : 'Edit',
+ 'action' : 'slot_spacer_form',
+ 'permissions' : (ModifyPortalContent, )
+ },
+ )
+ },
+ )
+
+
+class SpacerSlot(BaseSlot, SimpleItem) :
+ """Spacer Slot"""
+ meta_type = 'Spacer Slot'
+
+ _editableFields = ('nbOfSpaces',)
+ _indexableFields = ()
+
+ def __init__(self, id, nbOfSpaces = 3) :
+ self.id = id
+ self.nbOfSpaces = nbOfSpaces
+
+InitializeClass(SpacerSlot)
+
+def addSpacerSlot(dispatcher, id, nbOfSpaces = 3) :
+ """Add a new SpacerSlot object"""
+
+ o = SpacerSlot(id, nbOfSpaces)
+ dispatcher.Destination()._setObject(id, o)