cubicweb/entities/adapters.py
branch3.25
changeset 12160 608481168432
parent 11946 8de62610cea2
child 12355 c703dc95c82e
equal deleted inserted replaced
12159:8a1306c43656 12160:608481168432
    47                     rschema.type, value, attrschema.type, format='text/plain')
    47                     rschema.type, value, attrschema.type, format='text/plain')
    48         return u'%s #%s' % (self.type(), entity.eid)
    48         return u'%s #%s' % (self.type(), entity.eid)
    49 
    49 
    50     def long_title(self):
    50     def long_title(self):
    51         """Return a more detailled title for entity"""
    51         """Return a more detailled title for entity"""
    52         return self.title()
    52         # go through entity.dc_title for bw compat purpose: if entity define dc_title but not
       
    53         # dc_long_title, we still want it to be considered.
       
    54         return self.entity.dc_title()
    53 
    55 
    54     def description(self, format='text/plain'):
    56     def description(self, format='text/plain'):
    55         """Return a suitable description for entity"""
    57         """Return a suitable description for entity"""
    56         if 'description' in self.entity.e_schema.subjrels:
    58         if 'description' in self.entity.e_schema.subjrels:
    57             return self.entity.printable_value('description', format=format)
    59             return self.entity.printable_value('description', format=format)