src/pyams_content/component/association/paragraph.py
changeset 140 67bad9f880ee
child 192 8a16d2f507d7
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/pyams_content/component/association/paragraph.py	Mon Sep 11 14:54:30 2017 +0200
@@ -0,0 +1,45 @@
+#
+# Copyright (c) 2008-2015 Thierry Florac <tflorac AT ulthar.net>
+# All Rights Reserved.
+#
+# This software is subject to the provisions of the Zope Public License,
+# Version 2.1 (ZPL).  A copy of the ZPL should accompany this distribution.
+# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
+# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
+# FOR A PARTICULAR PURPOSE.
+#
+
+__docformat__ = 'restructuredtext'
+
+
+# import standard library
+
+# import interfaces
+from pyams_content.component.association.interfaces import IAssociationParagraph
+from pyams_content.component.extfile.interfaces import IExtFileContainerTarget
+from pyams_content.component.links.interfaces import ILinkContainerTarget
+from pyams_content.component.paragraph.interfaces import IParagraphFactory
+
+# import packages
+from pyams_content.component.paragraph import BaseParagraph
+from pyams_utils.registry import utility_config
+from zope.interface import implementer
+
+from pyams_content import _
+
+
+@implementer(IAssociationParagraph, IExtFileContainerTarget, ILinkContainerTarget)
+class AssociationParagraph(BaseParagraph):
+    """Associations paragraph"""
+
+    icon_class = 'fa-link'
+    icon_hint = _("Associations paragraph")
+
+
+@utility_config(name='Associations paragraph', provides=IParagraphFactory)
+class AssociationParagraphFactory(object):
+    """Associations paragraph factory"""
+
+    name = _("Associations paragraph")
+    content_type = AssociationParagraph