# HG changeset patch # User Thierry Florac # Date 1527079956 -7200 # Node ID 0856dfc5bab348cb609f97b8d9f1c6f1a3344eb5 # Parent 9658debb49a3377df31219ca563d0b55ac860c48 Added columns adapters diff -r 9658debb49a3 -r 0856dfc5bab3 src/pyams_content/component/association/zmi/__init__.py --- a/src/pyams_content/component/association/zmi/__init__.py Fri May 18 15:54:14 2018 +0200 +++ b/src/pyams_content/component/association/zmi/__init__.py Wed May 23 14:52:36 2018 +0200 @@ -145,6 +145,7 @@ @adapter_config(name='sorter', context=(IAssociationTarget, IPyAMSLayer, AssociationsTable), provides=IColumn) +@adapter_config(name='sorter', context=(IAssociationContainer, IPyAMSLayer, AssociationsTable), provides=IColumn) class AssociationsTableSorterColumn(ProtectedFormObjectMixin, SorterColumn): """Associations table sorter column""" @@ -160,6 +161,8 @@ @adapter_config(name='show-hide', context=(IAssociationTarget, IPyAMSLayer, AssociationsTable), provides=IColumn) +@adapter_config(name='show-hide', context=(IAssociationContainer, IPyAMSLayer, AssociationsTable), + provides=IColumn) class AssociationsTableShowHideColumn(ProtectedFormObjectMixin, VisibilitySwitcherColumn): """Associations container visibility switcher column""" @@ -172,6 +175,7 @@ @adapter_config(name='pictogram', context=(IAssociationTarget, IPyAMSLayer, AssociationsTable), provides=IColumn) +@adapter_config(name='pictogram', context=(IAssociationContainer, IPyAMSLayer, AssociationsTable), provides=IColumn) class AssociationsTablePictogramColumn(ImageColumn): """Associations table pictogram column""" @@ -187,6 +191,7 @@ @adapter_config(name='name', context=(IAssociationTarget, IPyAMSLayer, AssociationsTable), provides=IColumn) +@adapter_config(name='name', context=(IAssociationContainer, IPyAMSLayer, AssociationsTable), provides=IColumn) class AssociationsTablePublicNameColumn(NameColumn): """Associations table name column""" @@ -204,6 +209,7 @@ @adapter_config(name='inner_name', context=(IAssociationTarget, IPyAMSLayer, AssociationsTable), provides=IColumn) +@adapter_config(name='inner_name', context=(IAssociationContainer, IPyAMSLayer, AssociationsTable), provides=IColumn) class AssociationsTableInnerNameColumn(I18nColumn, GetAttrColumn): """Associations table inner name column""" @@ -219,6 +225,7 @@ @adapter_config(name='size', context=(IAssociationTarget, IPyAMSLayer, AssociationsTable), provides=IColumn) +@adapter_config(name='size', context=(IAssociationContainer, IPyAMSLayer, AssociationsTable), provides=IColumn) class AssociationsTableSizeColumn(I18nColumn, GetAttrColumn): """Associations table size column""" @@ -234,6 +241,7 @@ @adapter_config(name='trash', context=(IAssociationTarget, IPyAMSLayer, AssociationsTable), provides=IColumn) +@adapter_config(name='trash', context=(IAssociationContainer, IPyAMSLayer, AssociationsTable), provides=IColumn) class AssociationsTableTrashColumn(ProtectedFormObjectMixin, TrashColumn): """Associations table trash column"""