src/pyams_content/shared/common/interfaces/types.py
changeset 1354 1816388f2887
parent 1213 22b0a3be985d
child 1384 cdf63a1c7dc9
--- a/src/pyams_content/shared/common/interfaces/types.py	Wed Sep 25 15:11:13 2019 +0200
+++ b/src/pyams_content/shared/common/interfaces/types.py	Wed Sep 25 17:21:20 2019 +0200
@@ -10,20 +10,22 @@
 # FOR A PARTICULAR PURPOSE.
 #
 
-__docformat__ = 'restructuredtext'
-
 from zope.container.constraints import contains
 from zope.container.interfaces import IContainer
 from zope.interface import Attribute
 from zope.location.interfaces import ILocation
-from zope.schema import TextLine, List, Choice
+from zope.schema import Bool, Choice, List, TextLine
 
 from pyams_content.reference.pictograms.interfaces import PICTOGRAM_VOCABULARY
-from pyams_content.shared.common.interfaces import ISharedTool, IWfSharedContent, IBaseContentPortalContext
+from pyams_content.shared.common.interfaces import IBaseContentPortalContext, ISharedTool, \
+    IWfSharedContent
 from pyams_i18n.schema import I18nTextLineField
 from pyams_portal.interfaces import IPortalContext
 from pyams_sequence.schema import InternalReferenceField
 
+
+__docformat__ = 'restructuredtext'
+
 from pyams_content import _
 
 
@@ -44,9 +46,10 @@
                               required=True)
 
     source_folder = InternalReferenceField(title=_("Source folder"),
-                                           description=_("Source folder (or search engine) to which content is attached; "
-                                                         "if this reference is set, canonical URL will be based on this "
-                                                         "object's URL"),
+                                           description=_("Source folder (or search engine) to "
+                                                         "which content is attached; if this "
+                                                         "reference is set, canonical URL will be "
+                                                         "based on this object's URL"),
                                            required=False)
 
     def get_source_folder(self):
@@ -71,6 +74,14 @@
 
     contains(ISubType)
 
+    display_as_tag = Bool(title=_("Display as tag?"),
+                          description=_("Some portlets renderers can display a small tag above "
+                                        "each content to show their content type; if this option "
+                                        "is checked, data type label will be displayed instead "
+                                        "of content type"),
+                          required=True,
+                          default=False)
+
     field_names = List(title=_("Field names"),
                        description=_("List of fields associated with this data type"),
                        value_type=Choice(vocabulary=DATA_TYPE_FIELDS_VOCABULARY))