Moved some adapters to given components packages
authorThierry Florac <thierry.florac@onf.fr>
Fri, 23 Nov 2018 15:24:51 +0100
changeset 246 fe829f9d5c0d
parent 245 04226c7959a4
child 247 72e28694c4cb
Moved some adapters to given components packages
src/pyams_default_theme/component/illustration/__init__.py
--- a/src/pyams_default_theme/component/illustration/__init__.py	Fri Nov 23 13:24:05 2018 +0100
+++ b/src/pyams_default_theme/component/illustration/__init__.py	Fri Nov 23 15:24:51 2018 +0100
@@ -24,7 +24,7 @@
 from pyams_content.interfaces import IBaseContent
 from pyams_content.root import ISiteRoot
 from pyams_content.shared.common import ISharedContent
-from pyams_content.shared.site.interfaces import IContentLink
+from pyams_default_theme import lightbox
 from pyams_default_theme.component.illustration.interfaces import IIllustrationRenderer, IIllustrationWithZoomSettings, \
     ILLUSTRATION_AFTER_BODY, ILLUSTRATION_BEFORE_BODY
 from pyams_default_theme.features.renderer import BaseContentRenderer
@@ -35,7 +35,7 @@
 from pyams_utils.adapter import ContextRequestViewAdapter, adapter_config, get_annotation_adapter
 from pyams_utils.interfaces.tales import ITALESExtension
 
-from pyams_default_theme import _, lightbox
+from pyams_default_theme import _
 
 
 #
@@ -84,14 +84,6 @@
         return request.registry.queryMultiAdapter((version, request), IContentNavigationIllustration)
 
 
-@adapter_config(context=(IContentLink, IPyAMSLayer), provides=IContentNavigationIllustration)
-def content_link_illustration_factory(context, request):
-    """Content link illustration factory"""
-    target = context.target
-    if target is not None:
-        return request.registry.queryMultiAdapter((target, request), IContentNavigationIllustration)
-
-
 @adapter_config(name='pyams_illustration',
                 context=(Interface, Interface, Interface),
                 provides=ITALESExtension)