dereference adapter if necessary
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3007 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
4bc542e4b7
commit
8855a38499
2 changed files with 7 additions and 1 deletions
|
@ -51,7 +51,7 @@ from cybertools.stateful.interfaces import IStateful
|
|||
from cybertools.typology.interfaces import IType, ITypeManager
|
||||
from cybertools.xedit.browser import ExternalEditorView
|
||||
from loops.browser.action import DialogAction
|
||||
from loops.common import adapted
|
||||
from loops.common import adapted, AdapterBase
|
||||
from loops.i18n.browser import i18n_macros
|
||||
from loops.interfaces import IConcept, IResource, IDocument, IMediaAsset, INode
|
||||
from loops.interfaces import IViewConfiguratorSchema
|
||||
|
@ -327,6 +327,8 @@ class NodeView(BaseView):
|
|||
print '***', name, params
|
||||
target = self.virtualTargetObject
|
||||
if target is not None:
|
||||
if isinstance(target, AdapterBase):
|
||||
target = target.context
|
||||
targetView = component.queryMultiAdapter(
|
||||
(adapted(target), self.request), name=name)
|
||||
if targetView is None:
|
||||
|
|
|
@ -45,6 +45,10 @@ class ConceptView(object):
|
|||
def title(self):
|
||||
return self.context.title
|
||||
|
||||
@Lazy
|
||||
def description(self):
|
||||
return self.context.description
|
||||
|
||||
@Lazy
|
||||
def url(self):
|
||||
return '%s/.%s-%s' % (absoluteURL(self.node, self.request), self.context.uid, normalize(self.context.title))
|
||||
|
|
Loading…
Add table
Reference in a new issue