equal
deleted
inserted
replaced
21 |
21 |
22 # import packages |
22 # import packages |
23 from pyams_content.workflow import PUBLISHED_STATES |
23 from pyams_content.workflow import PUBLISHED_STATES |
24 from pyams_portal.portlet import PortletSettings, portlet_config, Portlet |
24 from pyams_portal.portlet import PortletSettings, portlet_config, Portlet |
25 from pyams_sequence.utility import get_sequence_target |
25 from pyams_sequence.utility import get_sequence_target |
|
26 from pyams_utils.factory import factory_config |
26 from zope.interface import implementer |
27 from zope.interface import implementer |
27 from zope.schema.fieldproperty import FieldProperty |
28 from zope.schema.fieldproperty import FieldProperty |
28 |
29 |
29 from pyams_content import _ |
30 from pyams_content import _ |
30 |
31 |
31 |
32 |
32 VIEW_PORTLET_NAME = 'pyams_content.portlet.view' |
33 VIEW_PORTLET_NAME = 'pyams_content.portlet.view' |
33 |
34 |
34 |
35 |
35 @implementer(IViewItemsPortletSettings) |
36 @implementer(IViewItemsPortletSettings) |
|
37 @factory_config(provided=IViewItemsPortletSettings) |
36 class ViewItemsPortletSettings(PortletSettings): |
38 class ViewItemsPortletSettings(PortletSettings): |
37 """View items portlet settings""" |
39 """View items portlet settings""" |
38 |
40 |
39 view = FieldProperty(IViewItemsPortletSettings['view']) |
41 view = FieldProperty(IViewItemsPortletSettings['view']) |
40 |
42 |
56 label = _("View items") |
58 label = _("View items") |
57 |
59 |
58 toolbar_image = None |
60 toolbar_image = None |
59 toolbar_css_class = 'fa fa-fw fa-2x fa-th-list' |
61 toolbar_css_class = 'fa fa-fw fa-2x fa-th-list' |
60 |
62 |
61 settings_class = ViewItemsPortletSettings |
63 settings_factory = IViewItemsPortletSettings |