Commit c9a95ed9 authored by Evan Simpson's avatar Evan Simpson

Use DTMLFile

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