prepare for customizable macro lookup via controller
git-svn-id: svn://svn.cy55.de/Zope3/src/loops/trunk@3954 fd906abe-77d9-0310-91a1-e0d9ade77398
This commit is contained in:
parent
ede833e425
commit
59ea8b368c
2 changed files with 17 additions and 4 deletions
|
@ -51,6 +51,7 @@ from zope.traversing.browser import absoluteURL
|
||||||
from zope.traversing.api import getName, getParent
|
from zope.traversing.api import getName, getParent
|
||||||
|
|
||||||
from cybertools.ajax.dojo import dojoMacroTemplate
|
from cybertools.ajax.dojo import dojoMacroTemplate
|
||||||
|
#from cybertools.browser.macro import MacroTemplate
|
||||||
from cybertools.browser.view import GenericView
|
from cybertools.browser.view import GenericView
|
||||||
from cybertools.meta.interfaces import IOptions
|
from cybertools.meta.interfaces import IOptions
|
||||||
from cybertools.relation.interfaces import IRelationRegistry
|
from cybertools.relation.interfaces import IRelationRegistry
|
||||||
|
@ -71,8 +72,10 @@ from loops import version
|
||||||
from loops.versioning.interfaces import IVersionable
|
from loops.versioning.interfaces import IVersionable
|
||||||
|
|
||||||
|
|
||||||
|
#concept_macros = MacroTemplate(ViewPageTemplateFile('concept_macros.pt'))
|
||||||
concept_macros = ViewPageTemplateFile('concept_macros.pt')
|
concept_macros = ViewPageTemplateFile('concept_macros.pt')
|
||||||
conceptMacrosTemplate = concept_macros #
|
conceptMacrosTemplate = concept_macros #
|
||||||
|
#resource_macros = MacroTemplate(ViewPageTemplateFile('resource_macros.pt'))
|
||||||
resource_macros = ViewPageTemplateFile('resource_macros.pt')
|
resource_macros = ViewPageTemplateFile('resource_macros.pt')
|
||||||
|
|
||||||
|
|
||||||
|
@ -133,13 +136,15 @@ class BaseView(GenericView, I18NView):
|
||||||
|
|
||||||
@Lazy
|
@Lazy
|
||||||
def conceptMacros(self):
|
def conceptMacros(self):
|
||||||
return concept_macros.macros
|
return self.controller.getTemplateMacros('concept', concept_macros)
|
||||||
|
#return concept_macros.macros
|
||||||
|
|
||||||
concept_macros = conceptMacros
|
concept_macros = conceptMacros
|
||||||
|
|
||||||
@Lazy
|
@Lazy
|
||||||
def resource_macros(self):
|
def resource_macros(self):
|
||||||
return resource_macros.macros
|
return self.controller.getTemplateMacros('resource', resource_macros)
|
||||||
|
#return resource_macros.macros
|
||||||
|
|
||||||
@Lazy
|
@Lazy
|
||||||
def name(self):
|
def name(self):
|
||||||
|
@ -288,6 +293,10 @@ class BaseView(GenericView, I18NView):
|
||||||
def description(self):
|
def description(self):
|
||||||
return self.adapted.description
|
return self.adapted.description
|
||||||
|
|
||||||
|
@Lazy
|
||||||
|
def additionalInfos(self):
|
||||||
|
return []
|
||||||
|
|
||||||
@Lazy
|
@Lazy
|
||||||
def dublincore(self):
|
def dublincore(self):
|
||||||
zdc = IZopeDublinCore(self.context)
|
zdc = IZopeDublinCore(self.context)
|
||||||
|
|
|
@ -573,9 +573,13 @@ class ObjectInfo(NodeView):
|
||||||
|
|
||||||
__call__ = innerHtml
|
__call__ = innerHtml
|
||||||
|
|
||||||
@property
|
@Lazy
|
||||||
|
def macros(self):
|
||||||
|
return self.controller.getTemplateMacros('info', info_macros)
|
||||||
|
|
||||||
|
@Lazy
|
||||||
def macro(self):
|
def macro(self):
|
||||||
return info_macros.macros['object_info']
|
return self.macros['object_info']
|
||||||
|
|
||||||
@Lazy
|
@Lazy
|
||||||
def dialog_name(self):
|
def dialog_name(self):
|
||||||
|
|
Loading…
Add table
Reference in a new issue