title index for concepts: do not include description
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@2727 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
c13b3d2262
commit
2ae267c6c1
1 changed files with 9 additions and 5 deletions
14
concept.py
14
concept.py
|
@ -400,22 +400,26 @@ class IndexAttributes(object):
|
||||||
def text(self):
|
def text(self):
|
||||||
ctx = self.context
|
ctx = self.context
|
||||||
#return ' '.join((getName(ctx), ctx.title,))
|
#return ' '.join((getName(ctx), ctx.title,))
|
||||||
|
description = ctx.description
|
||||||
|
if isinstance(description, I18NValue):
|
||||||
|
description = ' '.join(description.values())
|
||||||
actx = adapted(ctx)
|
actx = adapted(ctx)
|
||||||
indexAttrs = getattr(actx, '_textIndexAttributes', ())
|
indexAttrs = getattr(actx, '_textIndexAttributes', ())
|
||||||
#return ' '.join([getName(ctx), ctx.title, ctx.description] +
|
#return ' '.join([getName(ctx), ctx.title, ctx.description] +
|
||||||
return ' '.join([self.title()] +
|
return ' '.join([self.title() + description] +
|
||||||
self.creators() +
|
self.creators() +
|
||||||
[getattr(actx, attr, u'???') for attr in indexAttrs]).strip()
|
[getattr(actx, attr, u'???') for attr in indexAttrs]).strip()
|
||||||
|
|
||||||
def title(self):
|
def title(self):
|
||||||
context = self.context
|
context = self.context
|
||||||
title = context.title
|
title = context.title
|
||||||
description = context.description
|
#description = context.description
|
||||||
if isinstance(title, I18NValue):
|
if isinstance(title, I18NValue):
|
||||||
title = ' '.join(title.values())
|
title = ' '.join(title.values())
|
||||||
if isinstance(description, I18NValue):
|
#if isinstance(description, I18NValue):
|
||||||
description = ' '.join(description.values())
|
# description = ' '.join(description.values())
|
||||||
return ' '.join((getName(context), title, description)).strip()
|
#return ' '.join((getName(context), title, description)).strip()
|
||||||
|
return ' '.join((getName(context), title)).strip()
|
||||||
|
|
||||||
def creators(self):
|
def creators(self):
|
||||||
cr = IZopeDublinCore(self.context).creators or []
|
cr = IZopeDublinCore(self.context).creators or []
|
||||||
|
|
Loading…
Add table
Reference in a new issue