Commit c9a95ed9 authored by Evan Simpson's avatar Evan Simpson

Use DTMLFile

parent 563ad818
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
Provide a simple method to set up Access Rules Provide a simple method to set up Access Rules
""" """
from Globals import HTMLFile, MessageDialog from Globals import DTMLFile, MessageDialog
from ZPublisher.BeforeTraverse import \ from ZPublisher.BeforeTraverse import \
registerBeforeTraverse, unregisterBeforeTraverse, queryBeforeTraverse, \ registerBeforeTraverse, unregisterBeforeTraverse, queryBeforeTraverse, \
NameCaller NameCaller
...@@ -77,7 +77,7 @@ def getAccessRule(self, REQUEST=None): ...@@ -77,7 +77,7 @@ def getAccessRule(self, REQUEST=None):
return '' return ''
constructors = ( constructors = (
('manage_addAccessRuleForm', HTMLFile('www/AccessRuleAdd', globals())), ('manage_addAccessRuleForm', DTMLFile('www/AccessRuleAdd', globals())),
('manage_addAccessRule', manage_addAccessRule), ('manage_addAccessRule', manage_addAccessRule),
('manage_getAccessRule', getAccessRule), ('manage_getAccessRule', getAccessRule),
) )
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
Defines the Traverser base class and SiteRoot class Defines the Traverser base class and SiteRoot class
""" """
from Globals import HTMLFile, MessageDialog, Persistent from Globals import DTMLFile, MessageDialog, Persistent
from OFS.SimpleItem import Item from OFS.SimpleItem import Item
from Acquisition import Implicit, ImplicitAcquisitionWrapper from Acquisition import Implicit, ImplicitAcquisitionWrapper
from ExtensionClass import Base from ExtensionClass import Base
...@@ -76,7 +76,7 @@ class SiteRoot(Traverser, Implicit): ...@@ -76,7 +76,7 @@ class SiteRoot(Traverser, Implicit):
manage_options=({'label':'Edit', 'action':'manage_main', 'help': ('SiteAccess', 'SiteRoot_Edit.stx')},) manage_options=({'label':'Edit', 'action':'manage_main', 'help': ('SiteAccess', 'SiteRoot_Edit.stx')},)
manage = manage_main = HTMLFile('www/SiteRootEdit', globals()) manage = manage_main = DTMLFile('www/SiteRootEdit', globals())
def __init__(self, title, base, path): def __init__(self, title, base, path):
'''Title''' '''Title'''
...@@ -138,6 +138,6 @@ def manage_addSiteRoot(self, title='', base='', path='', REQUEST=None, ...@@ -138,6 +138,6 @@ def manage_addSiteRoot(self, title='', base='', path='', REQUEST=None,
sr.manage_addToContainer(self.this()) sr.manage_addToContainer(self.this())
constructors = ( constructors = (
('manage_addSiteRootForm', HTMLFile('www/SiteRootAdd', globals())), ('manage_addSiteRootForm', DTMLFile('www/SiteRootAdd', globals())),
('manage_addSiteRoot', manage_addSiteRoot), ('manage_addSiteRoot', manage_addSiteRoot),
) )
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
Defines the VirtualHostMonster class Defines the VirtualHostMonster class
""" """
from Globals import HTMLFile, MessageDialog, Persistent from Globals import DTMLFile, MessageDialog, Persistent
from OFS.SimpleItem import Item from OFS.SimpleItem import Item
from Acquisition import Implicit, ImplicitAcquisitionWrapper from Acquisition import Implicit, ImplicitAcquisitionWrapper
from ExtensionClass import Base from ExtensionClass import Base
...@@ -24,7 +24,7 @@ class VirtualHostMonster(Persistent, Item, Implicit): ...@@ -24,7 +24,7 @@ class VirtualHostMonster(Persistent, Item, Implicit):
manage_options=({'label':'View', 'action':'manage_main'},) manage_options=({'label':'View', 'action':'manage_main'},)
manage_main = HTMLFile('www/VirtualHostMonster', globals()) manage_main = DTMLFile('www/VirtualHostMonster', globals())
def addToContainer(self, container): def addToContainer(self, container):
container._setObject(self.id, self) container._setObject(self.id, self)
...@@ -102,6 +102,6 @@ def manage_addVirtualHostMonster(self, id, REQUEST=None, **ignored): ...@@ -102,6 +102,6 @@ def manage_addVirtualHostMonster(self, id, REQUEST=None, **ignored):
vhm.addToContainer(self.this()) vhm.addToContainer(self.this())
constructors = ( constructors = (
('manage_addVirtualHostMonsterForm', HTMLFile('www/VirtualHostMonsterAdd', globals())), ('manage_addVirtualHostMonsterForm', DTMLFile('www/VirtualHostMonsterAdd', globals())),
('manage_addVirtualHostMonster', manage_addVirtualHostMonster), ('manage_addVirtualHostMonster', manage_addVirtualHostMonster),
) )
<dtml-var manage_page_header> <dtml-var manage_page_header>
<dtml-var "manage_form_title(this(), _, <dtml-let form_title="'Set Access Rule'">
form_title='Set Access Rule', <dtml-var manage_form_title>
)"> </dtml-let>
<p class="form-help"> <p class="form-help">
<strong> <strong>
...@@ -18,11 +18,11 @@ Zope Folder which will be called whenever the Folder is published. ...@@ -18,11 +18,11 @@ Zope Folder which will be called whenever the Folder is published.
It can implement rewrite rules, preload request variables, etc. It can implement rewrite rules, preload request variables, etc.
</p> </p>
<dtml-if "manage_getAccessRule(this())"> <dtml-if manage_getAccessRule>
<p class="form-text"> <p class="form-text">
The current Access Rule is The current Access Rule is
<a href="<dtml-var "'%s/%s/manage_workspace' % (this().absolute_url(), manage_getAccessRule(this()))">"> <a href="&dtml-absolute_url;/&dtml-manage_getAccessRule;/manage_workspace">
"<dtml-var "manage_getAccessRule(this())">"</a>. "&dtml-manage_getAccessRule;"</a>.
</p> </p>
<dtml-else> <dtml-else>
<p class="form-text"> <p class="form-text">
......
<dtml-var manage_page_header> <dtml-var manage_page_header>
<dtml-var "manage_form_title(this(), _, <dtml-let form_title="'Add SiteRoot'"><dtml-var manage_form_title></dtml-let>
form_title='Add SiteRoot',
)">
<p class="form-help"> <p class="form-help">
This will change URLs generated by all objects within the same container This will change URLs generated by all objects within the same container
......
<dtml-var manage_page_header> <dtml-var manage_page_header>
<dtml-var "manage_form_title(this(), _, <dtml-let form_title="'Add Virtual Host Monster'">
form_title='Add Virtual Host Monster', <dtml-var manage_form_title>
)"> </dtml-let>
<p class="form-help"> <p class="form-help">
A Virtual Host Monster changes the URLs generated by all objects A Virtual Host Monster changes the URLs generated by all objects
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment