[itree] backport default combobox view for entities implementing ITree (from folder/zone cube)
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Tue, 06 Jul 2010 19:32:29 +0200
changeset 5912 ff916bf2eba0
parent 5911 47216d37bb3d
child 5913 85240b3f9ee4
[itree] backport default combobox view for entities implementing ITree (from folder/zone cube)
web/views/treeview.py
--- a/web/views/treeview.py	Tue Jul 06 19:31:50 2010 +0200
+++ b/web/views/treeview.py	Tue Jul 06 19:32:29 2010 +0200
@@ -97,6 +97,11 @@
             self.w(self.separator)
         entity.view(vid or self.item_vid, w=self.w)
 
+class TreeComboBoxView(TreePathView):
+    """display folder in edition's combobox"""
+    __regid__ = 'combobox'
+    item_vid = 'text'
+    separator = u' > '
 
 # XXX rename regid to ajaxtree/foldabletree or something like that (same for
 # treeitemview)