# HG changeset patch # User sylvain.thenault@logilab.fr # Date 1242032500 -7200 # Node ID 14c9a0a1aca1a9aa168d1e1577dad2129a2328d5 # Parent bf26f32c8a72995c8d2f2a5d19c10cd0aea0164a drop content_title diff -r bf26f32c8a72 -r 14c9a0a1aca1 web/views/cwuser.py --- a/web/views/cwuser.py Mon May 11 09:57:02 2009 +0200 +++ b/web/views/cwuser.py Mon May 11 11:01:40 2009 +0200 @@ -42,13 +42,6 @@ return self.build_url('cwuser/%s'%login, vid='epropertiesform') -class CWUserPrimaryView(primary.PrimaryView): - __select__ = implements('CWUser') - - def content_title(self, entity): - return entity.name() - - class FoafView(EntityView): id = 'foaf' __select__ = implements('CWUser') diff -r bf26f32c8a72 -r 14c9a0a1aca1 web/views/primary.py --- a/web/views/primary.py Mon May 11 09:57:02 2009 +0200 +++ b/web/views/primary.py Mon May 11 11:01:40 2009 +0200 @@ -133,16 +133,12 @@ self.w(u'') def render_entity_title(self, entity): - title = self.content_title(entity) # deprecate content_title? + """default implementation return dc_title""" + title = html_escape(entity.dc_title()) if title: self.w(u'

%s %s

' % (entity.dc_type().capitalize(), title)) - - def content_title(self, entity): - """default implementation return dc_title""" - return html_escape(entity.dc_title()) - def render_entity_metadata(self, entity): entity.view('metadata', w=self.w) summary = self.summary(entity) # deprecate summary? diff -r bf26f32c8a72 -r 14c9a0a1aca1 web/views/schema.py --- a/web/views/schema.py Mon May 11 09:57:02 2009 +0200 +++ b/web/views/schema.py Mon May 11 11:01:40 2009 +0200 @@ -57,8 +57,10 @@ __select__ = implements('CWAttribute', 'CWRelation') cache_max_age = 60*60*2 # stay in http cache for 2 hours by default - def content_title(self, entity): - return html_escape(entity.dc_long_title()) + def render_entity_title(self, entity): + self.w(u'

%s %s

' + % (entity.dc_type().capitalize(), + html_escape(entity.dc_long_title())) class CWETypeOneLineView(baseviews.OneLineView):