add rtype compat tls-sprint
authorsylvain.thenault@logilab.fr
Wed, 18 Feb 2009 11:46:23 +0100
branchtls-sprint
changeset 773 eb846103be71
parent 772 97b2b582e7f7
child 774 48cb1f42e79c
add rtype compat
web/box.py
--- a/web/box.py	Wed Feb 18 11:46:03 2009 +0100
+++ b/web/box.py	Wed Feb 18 11:46:23 2009 +0100
@@ -13,10 +13,8 @@
 from cubicweb.vregistry import objectify_selector
 from cubicweb.selectors import (one_line_rset,  primary_view,
                                 match_context_prop, has_related_entities,
-                                accepts_compat, condition_compat)
-from cubicweb.common.registerers import accepts_registerer, priority_registerer
-#etype_rtype_selector, has_relation,
-from cubicweb.common.view import Template, ReloadableMixIn
+                                accepts_compat, has_relation_compat, condition_compat)
+from cubicweb.view import Template, ReloadableMixIn
 
 from cubicweb.web.htmlwidgets import (BoxLink, BoxWidget, SideBoxWidget,
                                       RawBoxItem, BoxSeparator)
@@ -103,7 +101,6 @@
     according to application schema and display according to connected
     user's rights) and rql attributes
     """
-    __registerer__ = priority_registerer
 #XXX    __selectors__ = BoxTemplate.__selectors__ + (etype_rtype_selector,)
 
     rql  = None
@@ -139,9 +136,8 @@
 
 class EntityBoxTemplate(BoxTemplate):
     """base class for boxes related to a single entity"""
-    __registerer__ = accepts_registerer
     __select__ = one_line_rset() & primary_view() & match_context_prop()
-    registered = accepts_compat(condition_compat(BoxTemplate.registered))
+    registered = accepts_compat(has_relation_compat(condition_compat(BoxTemplate.registered)))
     context = 'incontext'
     
     def call(self, row=0, col=0, **kwargs):