# HG changeset patch # User Adrien Di Mascio # Date 1231165383 -3600 # Node ID 44b6345ccd3cd4e08fd437d3ec54253124cc2c3f # Parent 93051a3775418a12a5b27636e742f78686aa5cb5 add contextprop_selector to the DownloadBox so that it behaves like all other boxes diff -r 93051a377541 -r 44b6345ccd3c 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