equal
deleted
inserted
replaced
15 |
15 |
16 # import standard library |
16 # import standard library |
17 |
17 |
18 # import interfaces |
18 # import interfaces |
19 from pyams_content.component.association.interfaces import IAssociationTarget, IAssociationItem |
19 from pyams_content.component.association.interfaces import IAssociationTarget, IAssociationItem |
|
20 from pyams_sequence.interfaces import IInternalReference |
20 |
21 |
21 # import packages |
22 # import packages |
22 from pyams_i18n.schema import I18nTextLineField, I18nTextField |
23 from pyams_i18n.schema import I18nTextLineField, I18nTextField |
23 from pyams_sequence.schema import InternalReference, InternalReferencesList |
|
24 from pyams_utils.schema import MailAddressField |
24 from pyams_utils.schema import MailAddressField |
25 from zope.interface import Interface |
|
26 from zope.schema import Choice, TextLine, URI |
25 from zope.schema import Choice, TextLine, URI |
27 |
26 |
28 from pyams_content import _ |
27 from pyams_content import _ |
29 |
28 |
30 |
29 |
41 |
40 |
42 def get_editor_url(self): |
41 def get_editor_url(self): |
43 """Get URL for use in HTML editor""" |
42 """Get URL for use in HTML editor""" |
44 |
43 |
45 |
44 |
46 class IInternalLink(IBaseLink): |
45 class IInternalLink(IBaseLink, IInternalReference): |
47 """Internal link interface""" |
46 """Internal link interface""" |
48 |
|
49 reference = InternalReference(title=_("Internal reference"), |
|
50 description=_("Internal link target reference. You can search a reference using " |
|
51 "'+' followed by internal number, of by entering text matching " |
|
52 "content title."), |
|
53 required=True) |
|
54 |
47 |
55 def get_target(self, state=None): |
48 def get_target(self, state=None): |
56 """Get reference target""" |
49 """Get reference target""" |
57 |
50 |
58 |
51 |
81 required=True) |
74 required=True) |
82 |
75 |
83 |
76 |
84 class ILinkContainerTarget(IAssociationTarget): |
77 class ILinkContainerTarget(IAssociationTarget): |
85 """Links container marker interface""" |
78 """Links container marker interface""" |
86 |
|
87 |
|
88 class IInternalReferencesList(Interface): |
|
89 """Internal references list""" |
|
90 |
|
91 references = InternalReferencesList(title=_("Internal references"), |
|
92 description=_("List of internal references"), |
|
93 required=False) |
|