Merge pull request #10 from plone/ebrehault-13465-list-all-contents
Ticket #13465 plone.formwidget.contenttree does not show all contents
This commit is contained in:
commit
abd086917c
|
@ -7,6 +7,8 @@ Changelog
|
|||
* Added check in tree generation if it allready exists (reopening the contenttree window).
|
||||
[phgross]
|
||||
|
||||
* Do not exclude content types which are not allowed in navigation [ebrehault]
|
||||
|
||||
1.0.6 (2012-09-28)
|
||||
------------------
|
||||
|
||||
|
|
|
@ -79,6 +79,10 @@ class Fetch(BrowserView):
|
|||
level = self.request.form.get('rel', 0)
|
||||
|
||||
navtree_query = source.navigation_tree_query.copy()
|
||||
|
||||
if widget.show_all_content_types and 'portal_type' in navtree_query:
|
||||
del navtree_query['portal_type']
|
||||
|
||||
if directory is not None:
|
||||
navtree_query['path'] = {'depth': 1, 'query': directory}
|
||||
|
||||
|
@ -134,6 +138,10 @@ class ContentTreeBase(Explicit):
|
|||
# are selectable or that are folders.
|
||||
show_all_nodes = False
|
||||
|
||||
# By default, show all content types, even those not allowed in
|
||||
# the navigation
|
||||
show_all_content_types = True
|
||||
|
||||
def getTermByBrain(self, brain):
|
||||
return self.bound_source.getTermByBrain(brain)
|
||||
|
||||
|
|
Reference in New Issue