Commit 56770725 authored by Sylvain Thénault's avatar Sylvain Thénault
Browse files

don't inherit from RQLCtxComponent since everything is redefined here

parent b193b6a4c596
......@@ -66,10 +66,10 @@ def insert_eids(actions, eids):
class BasketBox(component.RQLCtxComponent):
class BasketBox(component.CtxComponent):
"""display a box containing all user's basketitems"""
__regid__ = 'basket_box'
__select__ = component.RQLCtxComponent.__select__ & (
__select__ = component.CtxComponent.__select__ & (
none_rset() | non_final_entity())
# XXX disabled by default. One should remove the basket cube if he doesn't
# want the basket box, or deactivate it explicitly
......@@ -80,14 +80,11 @@ class BasketBox(component.RQLCtxComponent):
etype = 'Basket'
rtype = 'in_basket'
def to_display_rql(self):
return (self.rql, {'x': self._cw.user.eid})
def init_rendering(self):
super(BasketBox, self).init_rendering()
req = self._cw
baskets = req.execute(*self.to_display_rql())
baskets = req.execute(self.rql, {'x': self._cw.user.eid})
except Unauthorized:
# can't access to something in the query, forget this box
raise component.EmptyComponent()
Markdown is supported
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