I18NValue: index all language values for title and description
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@2725 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
082e4c9d17
commit
0e83ba3ed6
1 changed files with 8 additions and 2 deletions
10
concept.py
10
concept.py
|
@ -47,6 +47,7 @@ from cybertools.util.jeep import Jeep
|
|||
|
||||
from loops.base import ParentInfo
|
||||
from loops.common import adapted, AdapterBase
|
||||
from loops.i18n.common import I18NValue
|
||||
from loops.interfaces import IConcept, IConceptRelation, IConceptView
|
||||
from loops.interfaces import IConceptManager, IConceptManagerContained
|
||||
from loops.interfaces import ILoopsContained
|
||||
|
@ -407,8 +408,13 @@ class IndexAttributes(object):
|
|||
|
||||
def title(self):
|
||||
context = self.context
|
||||
return ' '.join((getName(context),
|
||||
context.title, context.description)).strip()
|
||||
title = context.title
|
||||
description = context.description
|
||||
if isinstance(title, I18NValue):
|
||||
title = ' '.join(title.values())
|
||||
if isinstance(description, I18NValue):
|
||||
description = ' '.join(description.values())
|
||||
return ' '.join((getName(context), title, description)).strip()
|
||||
|
||||
def creators(self):
|
||||
cr = IZopeDublinCore(self.context).creators or []
|
||||
|
|
Loading…
Add table
Reference in a new issue