--- a/src/pyams_content/shared/common/types.py Tue Jul 10 15:47:30 2018 +0200
+++ b/src/pyams_content/shared/common/types.py Tue Jul 10 15:47:59 2018 +0200
@@ -19,6 +19,7 @@
from pyams_content.component.extfile.interfaces import IExtFileContainerTarget
from pyams_content.component.links.interfaces import ILinkContainerTarget
from pyams_content.component.paragraph.interfaces import IParagraphContainerTarget
+from pyams_content.component.theme.interfaces import IThemesTarget
from pyams_content.interfaces import MANAGE_TOOL_PERMISSION
from pyams_content.shared.common.interfaces.types import IDataType, ISubType, IBaseDataType, ITypedSharedTool, \
ITypedDataManager, DATA_MANAGER_ANNOTATION_KEY
@@ -60,7 +61,7 @@
"""Data sub-type persistent class"""
-@implementer(IDataType, IParagraphContainerTarget, IExtFileContainerTarget, ILinkContainerTarget)
+@implementer(IDataType, IParagraphContainerTarget, IExtFileContainerTarget, ILinkContainerTarget, IThemesTarget)
class DataType(BaseDataType, OrderedContainer):
"""Data type persistent class"""
--- a/src/pyams_content/shared/common/zmi/types.py Tue Jul 10 15:47:30 2018 +0200
+++ b/src/pyams_content/shared/common/zmi/types.py Tue Jul 10 15:47:59 2018 +0200
@@ -190,6 +190,22 @@
permission = MANAGE_TOOL_PERMISSION
+@adapter_config(name='themes', context=(ITypedSharedTool, IPyAMSLayer, TypedSharedToolTypesTable),
+ provides=IColumn)
+class TypedSharedToolTypesThemesColumn(ActionColumn):
+ """Typed shared tool types themes column"""
+
+ weight = 120
+
+ icon_class = 'fa fa-fw fa-tags'
+ icon_hint = _("Default themes")
+
+ url = 'themes-dialog.html'
+ modal_target = True
+
+ permission = MANAGE_TOOL_PERMISSION
+
+
@adapter_config(name='trash', context=(ITypedSharedTool, IPyAMSLayer, TypedSharedToolTypesTable),
provides=IColumn)
class TypedSharedToolTypesTrashColumn(TrashColumn):