case-insensitive sorting for related resources and concepts
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@2173 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
a19858ec02
commit
368dd0c022
1 changed files with 3 additions and 3 deletions
|
@ -109,7 +109,7 @@ class ConceptView(BaseView):
|
|||
hasType = cm.getTypePredicate()
|
||||
standard = cm.getDefaultPredicate()
|
||||
rels = sorted(self.context.getChildRelations(),
|
||||
key=(lambda x: x.second.title))
|
||||
key=(lambda x: x.second.title.lower()))
|
||||
for r in rels:
|
||||
if r.predicate == hasType:
|
||||
# only show top-level entries for type instances:
|
||||
|
@ -123,13 +123,13 @@ class ConceptView(BaseView):
|
|||
|
||||
def parents(self):
|
||||
rels = sorted(self.context.getParentRelations(),
|
||||
key=(lambda x: x.first.title))
|
||||
key=(lambda x: x.first.title.lower()))
|
||||
for r in rels:
|
||||
yield ConceptRelationView(r, self.request)
|
||||
|
||||
def resources(self):
|
||||
rels = sorted(self.context.getResourceRelations(),
|
||||
key=(lambda x: x.second.title))
|
||||
key=(lambda x: x.second.title.lower()))
|
||||
for r in rels:
|
||||
yield ConceptRelationView(r, self.request, contextIsSecond=True)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue