add contextprop_selector to the DownloadBox so that it behaves like all other boxes
authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
Mon, 05 Jan 2009 15:23:03 +0100
changeset 326 44b6345ccd3c
parent 325 93051a377541
child 327 239cc0c3a5e4
add contextprop_selector to the DownloadBox so that it behaves like all other boxes
web/views/idownloadable.py
--- a/web/views/idownloadable.py	Mon Jan 05 15:08:44 2009 +0100
+++ b/web/views/idownloadable.py	Mon Jan 05 15:23:03 2009 +0100
@@ -11,7 +11,7 @@
 from cubicweb.interfaces import IDownloadable
 from cubicweb.common.mttransforms import ENGINE
 from cubicweb.common.selectors import (one_line_rset, score_entity_selector,
-                                       interface_selector)
+                                       interface_selector, contextprop_selector)
 from cubicweb.web.box import EntityBoxTemplate
 from cubicweb.web.views import baseviews
 
@@ -35,7 +35,7 @@
     
 class DownloadBox(EntityBoxTemplate):
     id = 'download_box'
-    __selectors__ = (one_line_rset, interface_selector)
+    __selectors__ = (one_line_rset, interface_selector, contextprop_selector)
     accepts_interfaces = (IDownloadable,)
     order = 10
     def cell_call(self, row, col, title=None, label=None, **kwargs):
@@ -121,10 +121,6 @@
         return True
 
 
-    def render_side_related(self, entity, siderelations):
-        download_box(self.w, entity)
-        super(IDownloadablePrimaryView, self).render_side_related(entity, siderelations)
-
 class IDownloadableLineView(baseviews.OneLineView):
     __selectors__ = (interface_selector,)
     # don't kick default oneline view