bug fix: show parents portlet only for concepts/resources rendered for a (non-text) node
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3878 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
		
							parent
							
								
									10a5ee8910
								
							
						
					
					
						commit
						3145f06fe0
					
				
					 3 changed files with 14 additions and 5 deletions
				
			
		|  | @ -198,8 +198,10 @@ class ConceptView(BaseView): | |||
|     def macro(self): | ||||
|         return self.template.macros['conceptdata'] | ||||
| 
 | ||||
|     def __init__(self, context, request): | ||||
|         super(ConceptView, self).__init__(context, request) | ||||
|     #def __init__(self, context, request): | ||||
|     #    super(ConceptView, self).__init__(context, request) | ||||
| 
 | ||||
|     def setupController(self): | ||||
|         cont = self.controller | ||||
|         if cont is None: | ||||
|             return | ||||
|  |  | |||
|  | @ -1,5 +1,5 @@ | |||
| # | ||||
| #  Copyright (c) 2009 Helmut Merz helmutm@cy55.de | ||||
| #  Copyright (c) 2010 Helmut Merz helmutm@cy55.de | ||||
| # | ||||
| #  This program is free software; you can redistribute it and/or modify | ||||
| #  it under the terms of the GNU General Public License as published by | ||||
|  | @ -186,6 +186,7 @@ class NodeView(BaseView): | |||
|             basicView = component.getMultiAdapter((target, self.request), name=viewName) | ||||
|             # xxx: obsolete when self.targetObject is virtual target: | ||||
|             if hasattr(basicView, 'view'): | ||||
|                 #basicView.setupController() | ||||
|                 return basicView.view | ||||
|         return self.page | ||||
| 
 | ||||
|  | @ -239,6 +240,8 @@ class NodeView(BaseView): | |||
|         if obj is not None: | ||||
|             basicView = component.getMultiAdapter((obj, self.request)) | ||||
|             basicView._viewName = self.context.viewName | ||||
|             if self.context.nodeType != 'text': | ||||
|                 basicView.setupController() | ||||
|             return basicView.view | ||||
| 
 | ||||
|     @Lazy | ||||
|  | @ -400,6 +403,8 @@ class NodeView(BaseView): | |||
|             basicView = component.getMultiAdapter((obj, self.request)) | ||||
|             if obj == self.targetObject: | ||||
|                 basicView._viewName = self.context.viewName | ||||
|             #if self.context.nodeType != 'text': | ||||
|             basicView.setupController() | ||||
|             if hasattr(basicView, 'view'): | ||||
|                 return basicView.view | ||||
| 
 | ||||
|  |  | |||
|  | @ -135,8 +135,10 @@ class ResourceView(BaseView): | |||
|         else: | ||||
|             return self.template.macros['download'] | ||||
| 
 | ||||
|     def __init__(self, context, request): | ||||
|         super(ResourceView, self).__init__(context, request) | ||||
|     #def __init__(self, context, request): | ||||
|     #    super(ResourceView, self).__init__(context, request) | ||||
| 
 | ||||
|     def setupController(self): | ||||
|         cont = self.controller | ||||
|         if cont is None: | ||||
|             return | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 helmutm
						helmutm