ZCML File
configure.zcml
[top]
/
zope
/
app
/
undo
/ configure.zcml
<
configure
xmlns
="
http://namespaces.zope.org/zope
"
xmlns:browser
="
http://namespaces.zope.org/browser
"
i18n_domain
="
zope
"
>
<
permission
id
="
zope.UndoOwnTransactions
"
title
="
[undo-own-transaction-permission] Undo one's one transactions
"
description
="
With this permission a user may undo his/her own transactions.
"
/>
<
permission
id
="
zope.UndoAllTransactions
"
title
="
[undo-all-transactions-permission] Undo all transactions
"
description
="
With this permission a user may undo all transactions, regardless of who initiated them
"
/>
<
subscriber
handler
="
.undoSetup
"
for
="
zope.app.appsetup.IDatabaseOpenedEvent
"
/>
<
class
class
="
zope.app.undo.ZODBUndoManager
"
>
<
require
permission
="
zope.UndoOwnTransactions
"
interface
="
zope.app.undo.interfaces.IPrincipalUndo
"
/>
<
require
permission
="
zope.UndoAllTransactions
"
interface
="
zope.app.undo.interfaces.IUndo
"
/>
</
class
>
<
browser:pages
class
="
zope.app.undo.browser.UndoView
"
for
="
*
"
permission
="
zope.UndoOwnTransactions
"
>
<
browser:page
name
="
principalLastTransactionIsUndo
"
attribute
="
principalLastTransactionIsUndo
"
/>
<
browser:page
name
="
undo.html
"
attribute
="
undoPrincipalLastTransaction
"
/>
<
browser:page
name
="
undoPrincipalTransactions.html
"
attribute
="
undoPrincipalTransactions
"
/>
<
browser:page
name
="
undoMore.html
"
template
="
undo_more.pt
"
/>
</
browser:pages
>
<
browser:pages
class
="
zope.app.undo.browser.UndoView
"
for
="
*
"
permission
="
zope.UndoAllTransactions
"
>
<
browser:page
name
="
undoAllTransactions.html
"
attribute
="
undoAllTransactions
"
/>
<
browser:page
name
="
undoAll.html
"
template
="
undo_all.pt
"
/>
</
browser:pages
>
<
browser:page
for
="
*
"
permission
="
zope.UndoOwnTransactions
"
name
="
undo_macros
"
template
="
undo_macros.pt
"
/>
<
browser:menuItem
menu
="
zmi_actions
"
for
="
*
"
permission
="
zope.UndoOwnTransactions
"
title
="
Undo!
"
filter
="
not:context/@@principalLastTransactionIsUndo
"
action
="
@@undo.html
"
/>
<
browser:menuItem
menu
="
zmi_actions
"
for
="
*
"
permission
="
zope.UndoOwnTransactions
"
title
="
Redo!
"
filter
="
context/@@principalLastTransactionIsUndo
"
action
="
@@undo.html
"
/>
<
browser:menuItem
menu
="
zmi_actions
"
for
="
*
"
permission
="
zope.UndoOwnTransactions
"
title
="
Undo more
"
action
="
@@undoMore.html
"
/>
<
browser:menuItem
menu
="
zmi_actions
"
for
="
*
"
permission
="
zope.UndoAllTransactions
"
title
="
Undo all
"
action
="
@@undoAll.html
"
/>
</
configure
>