From 13270aa473821a15a59063774e03bccd9aeadb98 Mon Sep 17 00:00:00 2001 From: helmutm Date: Sat, 3 Jun 2006 09:12:00 +0000 Subject: [PATCH] suppress standard contents.html to activate batching; on concept child listing show only top-level type instances git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@1240 fd906abe-77d9-0310-91a1-e0d9ade77398 --- browser/concept.py | 11 +++++++++++ browser/configure.zcml | 2 -- configure.zcml | 9 --------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/browser/concept.py b/browser/concept.py index fca92f9..4d2aac5 100644 --- a/browser/concept.py +++ b/browser/concept.py @@ -86,7 +86,18 @@ class ConceptView(BaseView): yield dict(title=f.title, value=value, id=n, widget=widget) def children(self): + cm = self.loopsRoot.getConceptManager() + hasType = cm.getTypePredicate() + standard = cm.getDefaultPredicate() for r in self.context.getChildRelations(): + if r.predicate == hasType: + # only show top-level entries for type instances: + skip = False + for parent in r.second.getParents((standard,)): + if parent.conceptType == self.context: + skip = True + break + if skip: continue yield ConceptRelationView(r, self.request, contextIsSecond=True) def parents(self): diff --git a/browser/configure.zcml b/browser/configure.zcml index 1686ec7..3066541 100644 --- a/browser/configure.zcml +++ b/browser/configure.zcml @@ -138,7 +138,6 @@ @@ -232,7 +231,6 @@ diff --git a/configure.zcml b/configure.zcml index 65fbd42..b02986c 100644 --- a/configure.zcml +++ b/configure.zcml @@ -65,9 +65,6 @@ - - @@ -115,9 +112,6 @@ - - @@ -194,9 +188,6 @@ - -