New "buttons on top" behaviour

This commit is contained in:
Frédéric Péters 2011-07-27 08:04:50 +02:00
parent 15752fc37c
commit 40093a7b1c
3 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,15 @@
from zope.interface import Interface
from zope.interface import implements, alsoProvides
from zope.component import adapts
class ITopButtons(Interface):
pass
class ITopButtonsMarker(Interface):
pass
class TopButtons(object):
implements(ITopButtons)
adapts(ITopButtonsMarker)

View File

@ -0,0 +1,17 @@
<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:grok="http://namespaces.zope.org/grok"
xmlns:plone="http://namespaces.plone.org/plone"
i18n_domain="themis.fields">
<grok:grok package="." />
<plone:behavior
title="Top buttons"
description="Adds action buttons at the top of the form"
provides=".behaviors.ITopButtons"
marker=".behaviors.ITopButtonsMarker"
factory=".behaviors.TopButtons"
/>
</configure>

View File

@ -18,4 +18,6 @@
file="editors.zcml"
/>
<include file="behaviors.zcml"/>
</configure>