Updated adapters layer interface
authorThierry Florac <thierry.florac@onf.fr>
Thu, 12 Jul 2018 17:36:48 +0200
changeset 91 d11056520bf5
parent 90 fcca5c883a43
child 92 b3b7ec7530f5
Updated adapters layer interface
src/pyams_default_theme/shared/common/__init__.py
--- a/src/pyams_default_theme/shared/common/__init__.py	Thu Jul 12 17:08:14 2018 +0200
+++ b/src/pyams_default_theme/shared/common/__init__.py	Thu Jul 12 17:36:48 2018 +0200
@@ -22,7 +22,7 @@
 from pyams_default_theme.interfaces import IContentNavigationTitle, IContentTag, IContentDate, \
     IContentNavigationIllustration
 from pyams_i18n.interfaces import II18n
-from pyams_skin.layer import IPyAMSUserLayer
+from pyams_skin.layer import IPyAMSLayer
 from pyams_utils.interfaces.tales import ITALESExtension
 from pyams_workflow.interfaces import IWorkflowPublicationInfo
 
@@ -32,7 +32,7 @@
 from zope.interface import Interface
 
 
-@adapter_config(context=(IBaseContent, IPyAMSUserLayer), provides=IContentNavigationTitle)
+@adapter_config(context=(IBaseContent, IPyAMSLayer), provides=IContentNavigationTitle)
 def shared_content_navigation_title(context, request):
     """Default content navigation title adapter"""
     return II18n(context).query_attribute('title', request=request)
@@ -50,7 +50,7 @@
         return self.request.registry.queryMultiAdapter((context, self.request), IContentNavigationTitle)
 
 
-@adapter_config(context=(IWfSharedContent, IPyAMSUserLayer), provides=IContentTag)
+@adapter_config(context=(IWfSharedContent, IPyAMSLayer), provides=IContentTag)
 def shared_content_tag_adapter(context, request):
     """Default shared content tag adapter"""
     translate = request.localizer.translate
@@ -69,7 +69,7 @@
         return self.request.registry.queryMultiAdapter((context, self.request), IContentTag)
 
 
-@adapter_config(context=(IWfSharedContent, IPyAMSUserLayer), provides=IContentDate)
+@adapter_config(context=(IWfSharedContent, IPyAMSLayer), provides=IContentDate)
 def shared_content_date_adapter(context, request):
     """Default shared content date adapter"""
     publication_info = IWorkflowPublicationInfo(context, None)
@@ -90,7 +90,7 @@
         return self.request.registry.queryMultiAdapter((context, self.request), IContentDate)
 
 
-@adapter_config(context=(IBaseContent, IPyAMSUserLayer), provides=IContentNavigationIllustration)
+@adapter_config(context=(IBaseContent, IPyAMSLayer), provides=IContentNavigationIllustration)
 def base_content_navigation_illustration_adapter(context, request):
     """Default content navigation illustration adapter"""
     illustration = ILinkIllustration(context, None)