Updated internal link interface
authorThierry Florac <tflorac@ulthar.net>
Thu, 08 Feb 2018 15:13:07 +0100
changeset 381 1972af31d945
parent 380 4d6e2ed222a3
child 382 f6b688877716
Updated internal link interface
src/pyams_content/component/links/interfaces/__init__.py
--- a/src/pyams_content/component/links/interfaces/__init__.py	Thu Feb 08 15:02:55 2018 +0100
+++ b/src/pyams_content/component/links/interfaces/__init__.py	Thu Feb 08 15:13:07 2018 +0100
@@ -17,12 +17,11 @@
 
 # import interfaces
 from pyams_content.component.association.interfaces import IAssociationTarget, IAssociationItem
+from pyams_sequence.interfaces import IInternalReference
 
 # import packages
 from pyams_i18n.schema import I18nTextLineField, I18nTextField
-from pyams_sequence.schema import InternalReference, InternalReferencesList
 from pyams_utils.schema import MailAddressField
-from zope.interface import Interface
 from zope.schema import Choice, TextLine, URI
 
 from pyams_content import _
@@ -43,15 +42,9 @@
         """Get URL for use in HTML editor"""
 
 
-class IInternalLink(IBaseLink):
+class IInternalLink(IBaseLink, IInternalReference):
     """Internal link interface"""
 
-    reference = InternalReference(title=_("Internal reference"),
-                                  description=_("Internal link target reference. You can search a reference using "
-                                                "'+' followed by internal number, of by entering text matching "
-                                                "content title."),
-                                  required=True)
-
     def get_target(self, state=None):
         """Get reference target"""
 
@@ -83,11 +76,3 @@
 
 class ILinkContainerTarget(IAssociationTarget):
     """Links container marker interface"""
-
-
-class IInternalReferencesList(Interface):
-    """Internal references list"""
-
-    references = InternalReferencesList(title=_("Internal references"),
-                                        description=_("List of internal references"),
-                                        required=False)