src/pyams_content/shared/site/interfaces/__init__.py
changeset 380 4d6e2ed222a3
parent 300 49e8f3cef75a
child 492 04503227569d
equal deleted inserted replaced
379:8f90682f0fce 380:4d6e2ed222a3
    15 
    15 
    16 # import standard library
    16 # import standard library
    17 
    17 
    18 # import interfaces
    18 # import interfaces
    19 from pyams_content.interfaces import IBaseContent
    19 from pyams_content.interfaces import IBaseContent
    20 from pyams_sequence.interfaces import ISequentialIdTarget
    20 from pyams_sequence.interfaces import ISequentialIdTarget, IInternalReference
    21 from pyams_workflow.interfaces import IWorkflowPublicationSupport
    21 from pyams_workflow.interfaces import IWorkflowPublicationSupport
    22 from zope.container.interfaces import IContainer, IContained
    22 from zope.container.interfaces import IContainer, IContained
    23 
    23 
    24 # import packages
    24 # import packages
    25 from pyams_content.shared.common.interfaces import ISharedSite, IWfSharedContent, ISharedContent, \
    25 from pyams_content.shared.common.interfaces import ISharedSite, IWfSharedContent, ISharedContent, \
    26     IBaseContentManagerRoles, IBaseSharedTool, IDeletableElement
    26     IBaseContentManagerRoles, IBaseSharedTool, IDeletableElement
    27 from pyams_i18n.schema import I18nTextLineField
    27 from pyams_i18n.schema import I18nTextLineField
    28 from pyams_sequence.schema import InternalReference
       
    29 from zope.container.constraints import containers, contains
    28 from zope.container.constraints import containers, contains
    30 from zope.interface import Attribute
    29 from zope.interface import Attribute
    31 from zope.schema import Text, Bool
    30 from zope.schema import Text, Bool
    32 
    31 
    33 from pyams_content import _
    32 from pyams_content import _
    84 
    83 
    85 class ITopic(ISharedContent, ISiteElement):
    84 class ITopic(ISharedContent, ISiteElement):
    86     """Workflow managed topic interface"""
    85     """Workflow managed topic interface"""
    87 
    86 
    88 
    87 
    89 class IContentLink(ISiteElement):
    88 class IContentLink(ISiteElement, IInternalReference):
    90     """Rented content interface"""
    89     """Rented content interface"""
    91 
       
    92     reference = InternalReference(title=_("Internal reference"),
       
    93                                   description=_("Internal link target reference. You can search a reference using "
       
    94                                                 "'+' followed by internal number, of by entering text matching "
       
    95                                                 "content title."),
       
    96                                   required=True)
       
    97 
    90 
    98     alt_title = I18nTextLineField(title=_("Alternate title"),
    91     alt_title = I18nTextLineField(title=_("Alternate title"),
    99                                   description=_("Content title, as shown in front-office"),
    92                                   description=_("Content title, as shown in front-office"),
   100                                   required=False)
    93                                   required=False)
   101 
    94