web/views/idownloadable.py
changeset 326 44b6345ccd3c
parent 249 5ab64969df20
child 431 18b4dd650ef8
--- 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