display entity type in metadata section instead of default title of primary view stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Fri, 13 Nov 2009 14:19:08 +0100
branchstable
changeset 3843 200719b9221f
parent 3842 66f3ed1703d0
child 3844 c2625c512085
display entity type in metadata section instead of default title of primary view
web/views/baseviews.py
web/views/primary.py
--- a/web/views/baseviews.py	Fri Nov 13 14:14:48 2009 +0100
+++ b/web/views/baseviews.py	Fri Nov 13 14:19:08 2009 +0100
@@ -174,7 +174,7 @@
         entity = self.entity(row, col)
         self.w(u'<div class="metadata">')
         if self.show_eid:
-            self.w(u'#%s - ' % entity.eid)
+            self.w(u'%s #%s - ' % (entity.dc_type(), entity.eid))
         if entity.modification_date != entity.creation_date:
             self.w(u'<span>%s</span> ' % _('latest update on'))
             self.w(u'<span class="value">%s</span>, '
--- a/web/views/primary.py	Fri Nov 13 14:14:48 2009 +0100
+++ b/web/views/primary.py	Fri Nov 13 14:19:08 2009 +0100
@@ -86,8 +86,7 @@
         """default implementation return dc_title"""
         title = xml_escape(entity.dc_title())
         if title:
-            self.w(u'<h1><span class="etype">%s</span> %s</h1>'
-                   % (entity.dc_type().capitalize(), title))
+            self.w(u'<h1>%s</h1>' % title)
 
     def render_entity_metadata(self, entity):
         entity.view('metadata', w=self.w)