# HG changeset patch # User Sylvain Thénault # Date 1259769437 -3600 # Node ID 1d36d9904c41e9503116850f355796b951ae111b # Parent 1c09d2fd38c53eb0d04c4c33761fc1a2145d969e slightly adapt title and hide boxes when view is called as a non primary view diff -r 1c09d2fd38c5 -r 1d36d9904c41 web/views/primary.py --- a/web/views/primary.py Wed Dec 02 16:56:28 2009 +0100 +++ b/web/views/primary.py Wed Dec 02 16:57:17 2009 +0100 @@ -50,7 +50,10 @@ #self.render_entity_toolbox(entity) # entity's attributes and relations, excluding meta data # if the entity isn't meta itself - boxes = self._prepare_side_boxes(entity) + if self.is_primary(): + boxes = self._prepare_side_boxes(entity) + else: + boxes = None if boxes or hasattr(self, 'render_side_related'): self.w(u'
') self.render_entity_summary(entity) @@ -88,7 +91,12 @@ """default implementation return dc_title""" title = xml_escape(entity.dc_title()) if title: - self.w(u'

%s

' % title) + if self.is_primary(): + self.w(u'

%s

' % title) + else: + atitle = self.req._('follow this link for more information on this %s') % entity.dc_type() + self.w(u'

%s

' + % (entity.absolute_url(), atitle, title)) def render_entity_toolbox(self, entity): self.content_navigation_components('ctxtoolbar')