include object type, remove newlines, in related docs
This commit is contained in:
parent
be8351129d
commit
b46f68575a
|
@ -341,9 +341,14 @@ class RelatedDocObjPathSource(ObjPathSource):
|
|||
value = brain._unrestrictedGetObject()
|
||||
else:
|
||||
value = brain.getPath()[len(self.portal_path):]
|
||||
return SimpleTerm(value, token=brain.getPath(), title=u'%s [%s]' % (
|
||||
unicode(brain.Title, 'utf-8'),
|
||||
brain.getObject().Type()))
|
||||
if type(brain.Title) is unicode:
|
||||
title = brain.Title
|
||||
else:
|
||||
title = unicode(brain.Title, 'utf-8')
|
||||
return SimpleTerm(value, token=brain.getPath(), title=u'%s [%s]' % (
|
||||
title.replace('\n', ' - ').replace('\r', ''),
|
||||
brain.Type))
|
||||
|
||||
|
||||
class RelatedDocObjPathSourceBinder(ObjPathSourceBinder):
|
||||
path_source = RelatedDocObjPathSource
|
||||
|
|
Reference in New Issue