# HG changeset patch # User Sylvain Thénault # Date 1258118529 -3600 # Node ID c2625c5120856adcea4ba66d670d19c664b5d7c4 # Parent 200719b9221f29581b7f045f9ae70be58c2a33fd stop calling render_entity_metadata in primary view, provides a contextual compontent instead, displayed by default in the navbottom section. diff -r 200719b9221f -r c2625c512085 web/views/basecomponents.py --- a/web/views/basecomponents.py Fri Nov 13 14:19:08 2009 +0100 +++ b/web/views/basecomponents.py Fri Nov 13 14:22:09 2009 +0100 @@ -219,6 +219,15 @@ +class MetaDataComponent(component.EntityVComponent): + id = 'metadata' + context = 'navbottom' + order = 1 + + def cell_call(self, row, col, view=None): + print 'yhooo', self.rset + self.wview('metadata', self.rset, row=row, col=col) + def registration_callback(vreg): vreg.register_all(globals().values(), __name__, (SeeAlsoVComponent,)) if 'see_also' in vreg.schema: diff -r 200719b9221f -r c2625c512085 web/views/primary.py --- a/web/views/primary.py Fri Nov 13 14:19:08 2009 +0100 +++ b/web/views/primary.py Fri Nov 13 14:22:09 2009 +0100 @@ -45,7 +45,6 @@ def render_entity(self, entity): self.render_entity_title(entity) - self.render_entity_metadata(entity) # entity's attributes and relations, excluding meta data # if the entity isn't meta itself boxes = self._prepare_side_boxes(entity) @@ -89,6 +88,7 @@ self.w(u'

%s

' % title) def render_entity_metadata(self, entity): + # XXX deprecated entity.view('metadata', w=self.w) def render_entity_summary(self, entity): diff -r 200719b9221f -r c2625c512085 web/views/tabs.py --- a/web/views/tabs.py Fri Nov 13 14:19:08 2009 +0100 +++ b/web/views/tabs.py Fri Nov 13 14:22:09 2009 +0100 @@ -188,7 +188,6 @@ def cell_call(self, row, col): entity = self.complete_entity(row, col) self.render_entity_title(entity) - self.render_entity_metadata(entity) self.render_tabs(self.tabs, self.default_tab, entity)