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
This commit is contained in:
helmutm 2006-06-03 09:12:00 +00:00
parent 7cf086ef29
commit 13270aa473
3 changed files with 11 additions and 11 deletions

View file

@ -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):

View file

@ -138,7 +138,6 @@
<containerViews
for="loops.interfaces.IConceptManager"
contents="zope.ManageContent"
add="zope.ManageContent"
/>
@ -232,7 +231,6 @@
<containerViews
for="loops.interfaces.IResourceManager"
contents="zope.ManageContent"
add="zope.ManageContent"
/>

View file

@ -65,9 +65,6 @@
<content class=".concept.ConceptManager">
<implements
interface="zope.app.annotation.interfaces.IAttributeAnnotatable" />
<factory id="loops.ConceptManager"
description="Concept manager" />
@ -115,9 +112,6 @@
<content class=".resource.ResourceManager">
<implements
interface="zope.app.annotation.interfaces.IAttributeAnnotatable" />
<factory id="loops.ResourceManager"
description="Resource manager" />
@ -194,9 +188,6 @@
<content class=".view.ViewManager">
<implements
interface="zope.app.annotation.interfaces.IAttributeAnnotatable" />
<factory id="loops.ViewManager"
description="View manager" />