# HG changeset patch # User Sylvain Thénault # Date 1286812885 -7200 # Node ID 878fcf10cead6317ea2113e99d61b8bb3bdc6d31 # Parent 980f4415baab424283270fab95b848a1c7be370d [contextual components] missing layout for components in the toolbar diff -r 980f4415baab -r 878fcf10cead web/views/primary.py --- a/web/views/primary.py Mon Oct 11 18:00:51 2010 +0200 +++ b/web/views/primary.py Mon Oct 11 18:01:25 2010 +0200 @@ -26,10 +26,10 @@ from cubicweb import Unauthorized, NoSelectableObject from cubicweb.utils import support_args -from cubicweb.selectors import match_kwargs +from cubicweb.selectors import match_kwargs, match_context from cubicweb.view import EntityView from cubicweb.schema import META_RTYPES, VIRTUAL_RTYPES, display_name -from cubicweb.web import uicfg +from cubicweb.web import uicfg, component class PrimaryView(EntityView): @@ -383,6 +383,14 @@ self.wview('autolimited', rset, initargs={'dispctrl': dispctrl}) + +class ToolbarLayout(component.Layout): + __select__ = match_context('ctxtoolbar') + + def render(self, w): + if self.init_rendering(): + self.cw_extra_kwargs['view'].render_body(w) + ## default primary ui configuration ########################################### _pvs = uicfg.primaryview_section