New "buttons on top" behaviour
This commit is contained in:
parent
15752fc37c
commit
40093a7b1c
|
@ -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)
|
||||
|
|
@ -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>
|
|
@ -18,4 +18,6 @@
|
|||
file="editors.zcml"
|
||||
/>
|
||||
|
||||
<include file="behaviors.zcml"/>
|
||||
|
||||
</configure>
|
||||
|
|
Reference in New Issue