# HG changeset patch # User Thierry Florac # Date 1546525815 -3600 # Node ID 4eaa52289a1a4bc9a6065fe017f1bfb14a068ad7 # Parent 4537690c026b37f91579f34e37e4cc6672477c92 Moved viewlet manager interface to PyAMS default theme diff -r 4537690c026b -r 4eaa52289a1a src/pyams_content/shared/common/portlet/interfaces.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/pyams_content/shared/common/portlet/interfaces.py Thu Jan 03 15:30:15 2019 +0100 @@ -0,0 +1,48 @@ +# +# Copyright (c) 2008-2017 Thierry Florac +# All Rights Reserved. +# +# This software is subject to the provisions of the Zope Public License, +# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. +# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED +# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS +# FOR A PARTICULAR PURPOSE. +# + +__docformat__ = 'restructuredtext' + +from zope.schema import Bool + +from pyams_portal.interfaces import IPortletSettings + +from pyams_content import _ + + +class ISharedContentHeaderPortletSettings(IPortletSettings): + """Shared content header portlet settings""" + + display_breadcrumbs = Bool(title=_("Display breadcrumbs?"), + required=True, + default=True) + + display_title = Bool(title=_("Display title?"), + required=True, + default=True) + + display_tags = Bool(title=_("Display tags?"), + required=True, + default=True) + + display_header = Bool(title=_("Display header?"), + required=True, + default=True) + + display_specificities = Bool(title=_("Display specificities?"), + description=_("If 'no', specific content's informations won't be displayed..."), + required=True, + default=True) + + +class ISharedContentTitlePortletSettings(IPortletSettings): + """Shared content title portlet settings""" diff -r 4537690c026b -r 4eaa52289a1a src/pyams_content/shared/common/portlet/interfaces/__init__.py --- a/src/pyams_content/shared/common/portlet/interfaces/__init__.py Wed Jan 02 20:20:37 2019 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +0,0 @@ -# -# Copyright (c) 2008-2017 Thierry Florac -# All Rights Reserved. -# -# This software is subject to the provisions of the Zope Public License, -# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. -# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED -# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS -# FOR A PARTICULAR PURPOSE. -# - -__docformat__ = 'restructuredtext' - -from zope.interface import Interface -from zope.schema import Bool - -from pyams_content import _ -from pyams_portal.interfaces import IPortletSettings - - -class ISharedContentHeaderPortletSettings(IPortletSettings): - """Shared content header portlet settings""" - - display_breadcrumbs = Bool(title=_("Display breadcrumbs?"), - required=True, - default=True) - - display_title = Bool(title=_("Display title?"), - required=True, - default=True) - - display_tags = Bool(title=_("Display tags?"), - required=True, - default=True) - - display_header = Bool(title=_("Display header?"), - required=True, - default=True) - - display_specificities = Bool(title=_("Display specificities?"), - description=_("If 'no', specific content's informations won't be displayed..."), - required=True, - default=True) - - -class ISharedContentHeadViewletManager(Interface): - """Shared content head viewlet manager marker interface""" - - -class ISharedContentTitlePortletSettings(IPortletSettings): - """Shared content title portlet settings""" diff -r 4537690c026b -r 4eaa52289a1a src/pyams_content/shared/common/portlet/skin/__init__.py --- a/src/pyams_content/shared/common/portlet/skin/__init__.py Wed Jan 02 20:20:37 2019 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,25 +0,0 @@ -# -# Copyright (c) 2008-2018 Thierry Florac -# All Rights Reserved. -# -# This software is subject to the provisions of the Zope Public License, -# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. -# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED -# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS -# FOR A PARTICULAR PURPOSE. -# - -__docformat__ = 'restructuredtext' - -from zope.interface import Interface, implementer - -from pyams_content.shared.common.portlet.interfaces import ISharedContentHeadViewletManager -from pyams_skin.layer import IPyAMSUserLayer -from pyams_viewlet.manager import viewletmanager_config, WeightOrderedViewletManager - - -@viewletmanager_config(name='pyams_content.head', layer=IPyAMSUserLayer, view=Interface) -@implementer(ISharedContentHeadViewletManager) -class SharedContentHeadViewletManager(WeightOrderedViewletManager): - """Shared content head viewlet manager"""