-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a control panel and role based notification setting
- Loading branch information
Showing
6 changed files
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,17 @@ | ||
from zope.schema import Bool | ||
from zope.interface import Interface | ||
from slc.stickystatusmessages import StickyStatusMessageFactory as _ | ||
|
||
class IStickyStatusMessagesLayer(Interface): | ||
"""Marker Interface used by as BrowserLayer | ||
""" | ||
|
||
class IStickyStatusMessagesSettings(Interface): | ||
""" Interface class that describes settings for plone.app.registry. """ | ||
rolebased = Bool( | ||
title=_(u"Role Based Status Messages"), | ||
description=_(u"Use this option to enable or disable role based " | ||
u"status messages."), | ||
required=True, | ||
default=True, | ||
) |
21 changes: 21 additions & 0 deletions
21
src/slc/stickystatusmessages/profiles/default/controlpanel.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0"?> | ||
<object | ||
name="portal_controlpanel" | ||
xmlns:i18n="http://xml.zope.org/namespaces/i18n" | ||
i18n:domain="slc.stickystatusmessages" | ||
purge="False"> | ||
|
||
<configlet | ||
title="Sticky Status Messages" | ||
action_id="stickystatusmessages" | ||
appId="slc.stickystatusmessages" | ||
category="Products" | ||
condition_expr="" | ||
url_expr="string:${portal_url}/@@stickystatusmessages-settings" | ||
icon_expr="string:${portal_url}/maintenance_icon.png" | ||
visible="True" | ||
i18n:attributes="title"> | ||
<permission>Manage portal</permission> | ||
</configlet> | ||
|
||
</object> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0"?> | ||
<registry> | ||
<records interface="slc.stickystatusmessages.interfaces.IStickyStatusMessagesSettings" /> | ||
</registry> |