Commit df599a2a authored by Frank Bessou's avatar Frank Bessou 🍁
Browse files

Make ProfileTreeComponent abstract

We make ProfileTreeComponent abstract to avoid selecting it for any
entity that can be adapted to ITreeBase. Indeed, we don't want Concepts
to be rendered as contextual components in cube saem.

We then create a TransferTreeComponent extending ProfileTreeComponent
the same way we made the UnitTreeComponent.
parent 4f0b259e419e
......@@ -29,9 +29,9 @@ class ProfileTreeComponent(component.EntityCtxComponent):
__regid__ = 'seda.tree'
__select__ = (component.EntityCtxComponent.__select__
& adaptable('ITreeBase'))
__abstract__ = True
context = 'left'
order = -1
title = _('SEDA profile tree')
def render_body(self, w):
self._cw.add_css('cubes.jqtree.css')
......@@ -39,6 +39,11 @@ class ProfileTreeComponent(component.EntityCtxComponent):
self.entity.view('jqtree.treeview', w=w)
class TransferTreeComponent(ProfileTreeComponent):
__select__ = ProfileTreeComponent.__select__ & is_instance('SEDAArchiveTransfer')
title = _('SEDA profile tree')
class UnitTreeComponent(ProfileTreeComponent):
__select__ = ProfileTreeComponent.__select__ & component_unit()
title = _('Archive unit component tree')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment