equal
deleted
inserted
replaced
19 from pyams_content.shared.common.portlet.content.interfaces import ISharedContentPortletSettings |
19 from pyams_content.shared.common.portlet.content.interfaces import ISharedContentPortletSettings |
20 from pyams_utils.interfaces import VIEW_PERMISSION |
20 from pyams_utils.interfaces import VIEW_PERMISSION |
21 |
21 |
22 # import packages |
22 # import packages |
23 from pyams_portal.portlet import PortletSettings, portlet_config, Portlet |
23 from pyams_portal.portlet import PortletSettings, portlet_config, Portlet |
|
24 from pyams_utils.factory import factory_config |
24 from zope.interface import implementer |
25 from zope.interface import implementer |
25 |
26 |
26 from pyams_content import _ |
27 from pyams_content import _ |
27 |
28 |
28 |
29 |
29 SHARED_CONTENT_PORTLET_NAME = 'pyams_content.portlet.content' |
30 SHARED_CONTENT_PORTLET_NAME = 'pyams_content.portlet.content' |
30 |
31 |
31 |
32 |
32 @implementer(ISharedContentPortletSettings) |
33 @implementer(ISharedContentPortletSettings) |
|
34 @factory_config(provided=ISharedContentPortletSettings) |
33 class SharedContentPortletSettings(PortletSettings): |
35 class SharedContentPortletSettings(PortletSettings): |
34 """Shared content portlet persistent settings""" |
36 """Shared content portlet persistent settings""" |
35 |
37 |
36 |
38 |
37 @portlet_config(permission=VIEW_PERMISSION) |
39 @portlet_config(permission=VIEW_PERMISSION) |
39 """Shared content portlet""" |
41 """Shared content portlet""" |
40 |
42 |
41 name = SHARED_CONTENT_PORTLET_NAME |
43 name = SHARED_CONTENT_PORTLET_NAME |
42 label = _("Context content") |
44 label = _("Context content") |
43 |
45 |
44 settings_class = SharedContentPortletSettings |
46 settings_factory = ISharedContentPortletSettings |