Commit a4754fdf authored by 's avatar

merged virtual host branch

parent 1fdadc8f
...@@ -19,7 +19,7 @@ that user. ...@@ -19,7 +19,7 @@ that user.
</TD> </TD>
<TD ALIGN="LEFT" VALIGN="TOP"> <TD ALIGN="LEFT" VALIGN="TOP">
<A HREF="manage_users?name=<dtml-var sequence-item fmt=url-quote>&submit=Edit"> <A HREF="manage_users?name=<dtml-var sequence-item fmt=url-quote>&submit=Edit">
<IMG SRC="<dtml-var SCRIPT_NAME>/p_/User_icon" ALT="Click to edit user" <IMG SRC="&dtml-BASEPATH1;/p_/User_icon" ALT="Click to edit user"
BORDER="0"> BORDER="0">
</A> </A>
<A HREF="manage_users?name=<dtml-var sequence-item fmt=url-quote>&submit=Edit"> <A HREF="manage_users?name=<dtml-var sequence-item fmt=url-quote>&submit=Edit">
......
...@@ -85,9 +85,9 @@ ...@@ -85,9 +85,9 @@
"""Standard management interface support """Standard management interface support
$Id: Management.py,v 1.32 2000/06/27 14:25:35 brian Exp $""" $Id: Management.py,v 1.33 2000/09/07 19:33:01 brian Exp $"""
__version__='$Revision: 1.32 $'[11:-2] __version__='$Revision: 1.33 $'[11:-2]
import sys, Globals, ExtensionClass, urllib import sys, Globals, ExtensionClass, urllib
from Dialogs import MessageDialog from Dialogs import MessageDialog
...@@ -154,12 +154,28 @@ class Tabs(ExtensionClass.Base): ...@@ -154,12 +154,28 @@ class Tabs(ExtensionClass.Base):
return getattr(self, m)(self, REQUEST) return getattr(self, m)(self, REQUEST)
def tabs_path_default(self, REQUEST,
# Static var
unquote=urllib.unquote,
):
steps = REQUEST._steps[:-1]
script = REQUEST['BASEPATH1']
linkpat = '<a href="%s/manage_workspace">%s</a>'
out = []
url = linkpat % (script, '&nbsp;/')
if not steps:
return url
last = steps.pop()
for step in steps:
script = '%s/%s' % (script, step)
out.append(linkpat % (script, unquote(step)))
out.append(unquote(last))
return '%s&nbsp;%s' % (url, join(out,'&nbsp;/&nbsp;'))
def tabs_path_info(self, script, path, def tabs_path_info(self, script, path,
# Static vars # Static vars
quote=urllib.quote, quote=urllib.quote,
): ):
url=script
out=[] out=[]
while path[:1]=='/': path=path[1:] while path[:1]=='/': path=path[1:]
while path[-1:]=='/': path=path[:-1] while path[-1:]=='/': path=path[:-1]
......
...@@ -105,7 +105,7 @@ met: ...@@ -105,7 +105,7 @@ met:
<A NAME="PYTHON"> <A NAME="PYTHON">
<H3> <H3>
<img src="<dtml-var SCRIPT_NAME>/p_/PyPoweredSmall_Gif"> <img src="&dtml-BASEPATH1;/p_/PyPoweredSmall_Gif">
This software is powered by <a href="http://www.python.org/" TARGET="_top">Python</a>! This software is powered by <a href="http://www.python.org/" TARGET="_top">Python</a>!
</H3> </H3>
<p>Copyright &copy; 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, <p>Copyright &copy; 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
......
...@@ -64,20 +64,20 @@ such as database and product management. ...@@ -64,20 +64,20 @@ such as database and product management.
<TR> <TR>
<td> </td> <td> </td>
<TD ALIGN="LEFT" VALIGN="TOP"> <TD ALIGN="LEFT" VALIGN="TOP">
<A HREF="<dtml-var sequence-key>/manage_workspace"> <A HREF="<dtml-var sequence-key url_quote>/manage_workspace">
<IMG SRC="<dtml-var SCRIPT_NAME>/<dtml-var icon>" <IMG SRC="&dtml-BASEPATH1;/<dtml-var icon>"
ALT="Click to open this item" BORDER="0"></A> ALT="Click to open this item" BORDER="0"></A>
</TD> </TD>
<TD ALIGN="LEFT" VALIGN="TOP"> <TD ALIGN="LEFT" VALIGN="TOP">
<A HREF="<dtml-var sequence-key>/manage_workspace"> <A HREF="<dtml-var sequence-key url_quote>/manage_workspace">
<dtml-var title> <dtml-var title>
</A> </A>
<dtml-if locked_in_version> <dtml-if locked_in_version>
<dtml-if modified_in_version> <dtml-if modified_in_version>
<IMG SRC="<dtml-var SCRIPT_NAME>/p_/locked" <IMG SRC="&dtml-BASEPATH1;/p_/locked"
ALT="This item has been modified in this version"> ALT="This item has been modified in this version">
<dtml-else> <dtml-else>
<IMG SRC="<dtml-var SCRIPT_NAME>/p_/lockedo" <IMG SRC="&dtml-BASEPATH1;/p_/lockedo"
ALT="This item has been modified in another version"> ALT="This item has been modified in another version">
</dtml-if> </dtml-if>
</dtml-if> </dtml-if>
......
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML lang="en"> <HTML lang="en">
<HEAD> <HEAD>
<TITLE><dtml-var title_or_id> on <dtml-var URL1></TITLE> <TITLE>&dtml-title_or_id; on &dtml.-URL1;</TITLE>
<SCRIPT LANGUAGE="javascript"> <SCRIPT LANGUAGE="javascript">
<!-- <!--
function update_menu() function update_menu()
...@@ -11,9 +11,9 @@ function update_menu() ...@@ -11,9 +11,9 @@ function update_menu()
</SCRIPT> </SCRIPT>
</HEAD> </HEAD>
<FRAMESET COLS="175,*"> <FRAMESET COLS="175,*">
<FRAME SRC="<dtml-var URL1>/manage_menu" NAME="manage_menu" <FRAME SRC="&dtml.-URL1;/manage_menu" NAME="manage_menu"
MARGINWIDTH="2" MARGINHEIGHT="2" SCROLLING="auto"> MARGINWIDTH="2" MARGINHEIGHT="2" SCROLLING="auto">
<FRAME SRC="<dtml-var URL1>/manage_workspace" NAME="manage_main" <FRAME SRC="&dtml.-URL1;/manage_workspace" NAME="manage_main"
MARGINWIDTH="2" MARGINHEIGHT="0" SCROLLING="auto"> MARGINWIDTH="2" MARGINHEIGHT="0" SCROLLING="auto">
</FRAMESET> </FRAMESET>
<NOFRAMES> <NOFRAMES>
......
...@@ -17,36 +17,36 @@ ...@@ -17,36 +17,36 @@
<td bgcolor="#003366" rowspan="5" width="10%" valign="bottom" <td bgcolor="#003366" rowspan="5" width="10%" valign="bottom"
align="left"><font face="Verdana, Arial, Helvetica" color="#ffffff" align="left"><font face="Verdana, Arial, Helvetica" color="#ffffff"
size="1">&nbsp;&nbsp;<strong>Zope </strong></font><img size="1">&nbsp;&nbsp;<strong>Zope </strong></font><img
src="<dtml-var SCRIPT_NAME>/p_/sp" width="2" height="1"> src="&dtml-BASEPATH1;/p_/sp" width="2" height="1">
</td> </td>
<td bgcolor="#003366" colspan="<dtml-var "4 * (n_ + 1)">"><img <td bgcolor="#003366" colspan="<dtml-var "4 * (n_ + 1)">"><img
src="<dtml-var SCRIPT_NAME>/p_/sp" width="1" height="5"></td> src="&dtml-BASEPATH1;/p_/sp" width="1" height="5"></td>
</tr> </tr>
<tr> <tr>
<dtml-in manage_options> <dtml-in manage_options>
<dtml-if "_['sequence-index']==a_"> <dtml-if "_['sequence-index']==a_">
<td bgcolor="#ffffff" rowspan="2" valign="top" <td bgcolor="#ffffff" rowspan="2" valign="top"
align="left"><img src="<dtml-var SCRIPT_NAME>/p_/ltab" width="5" align="left"><img src="&dtml-BASEPATH1;/p_/ltab" width="5"
height="5"></td> height="5"></td>
<td bgcolor="#ffffff"><img src="<dtml-var <td bgcolor="#ffffff"><img src="&dtml-BASEPATH1;/p_/sp"
SCRIPT_NAME>/p_/sp" width="1" height="2"></td> width="1" height="2"></td>
<td bgcolor="#ffffff" rowspan="2" valign="top" <td bgcolor="#ffffff" rowspan="2" valign="top"
align="right"><img src="<dtml-var SCRIPT_NAME>/p_/rtab" width="5" align="right"><img src="&dtml-BASEPATH1;/p_/rtab" width="5"
height="5"></td> height="5"></td>
<td bgcolor="#003366" rowspan="4"><img src="<dtml-var <td bgcolor="#003366" rowspan="4"><img src="dtml-BASEPATH1;/p_/sp"
SCRIPT_NAME>/p_/sp" width="2" height="1"></td> width="2" height="1"></td>
<dtml-else> <dtml-else>
<td bgcolor="#efefef" rowspan="2" valign="top" <td bgcolor="#efefef" rowspan="2" valign="top"
align="left"><img src="<dtml-var SCRIPT_NAME>/p_/ltab" width="5" align="left"><img src="&dtml-BASEPATH1;/p_/ltab" width="5"
height="5"></td> height="5"></td>
<td bgcolor="#efefef"><img src="<dtml-var <td bgcolor="#efefef"><img src="&dtml-BASEPATH1;/p_/sp"
SCRIPT_NAME>/p_/sp" width="1" height="2"></td> width="1" height="2"></td>
<td bgcolor="#efefef" rowspan="2" valign="top" <td bgcolor="#efefef" rowspan="2" valign="top"
align="right"><img src="<dtml-var SCRIPT_NAME>/p_/rtab" width="5" align="right"><img src="&dtml-BASEPATH1;/p_/rtab" width="5"
height="5"></td> height="5"></td>
<td bgcolor="#003366" rowspan="4"><img src="<dtml-var <td bgcolor="#003366" rowspan="4"><img src="&dtml-BASEPATH1;/p_/sp"
SCRIPT_NAME>/p_/sp" width="2" height="1"></td> width="2" height="1"></td>
</dtml-if> </dtml-if>
</dtml-in> </dtml-in>
</tr> </tr>
...@@ -56,22 +56,20 @@ ...@@ -56,22 +56,20 @@
<td bgcolor="#ffffff" valign="bottom" <td bgcolor="#ffffff" valign="bottom"
align="center"><font face="Verdana, Arial, Helvetica" align="center"><font face="Verdana, Arial, Helvetica"
size="1">&nbsp;<a size="1">&nbsp;<a
<dtml-if action>href="<dtml-var action>" <dtml-if action>href="&dtml-action;"
<dtml-else>href="<dtml-var URL1>" <dtml-else>href="&dtml-URL1;"
</dtml-if> </dtml-if>
<dtml-if target> target="<dtml-var <dtml-if target> target="&dtml-target;"</dtml-if>><font
target>"</dtml-if>><font
color="#000000"><strong><dtml-var color="#000000"><strong><dtml-var
label></strong></font></a>&nbsp;</font></td> label></strong></font></a>&nbsp;</font></td>
<dtml-else> <dtml-else>
<td bgcolor="#efefef" valign="bottom" <td bgcolor="#efefef" valign="bottom"
align="center"><font face="Verdana, Arial, Helvetica" align="center"><font face="Verdana, Arial, Helvetica"
size="1">&nbsp;<a size="1">&nbsp;<a
<dtml-if action>href="<dtml-var action>" <dtml-if action>href="&dtml-action;"
<dtml-else>href="<dtml-var URL1>" <dtml-else>href="&dtml-URL1;"
</dtml-if> </dtml-if>
<dtml-if target> target="<dtml-var <dtml-if target> target="&dtml-target;"</dtml-if>><font
target>"</dtml-if>><font
color="#000000"><strong><dtml-var color="#000000"><strong><dtml-var
label></strong></font></a>&nbsp;</font></td> label></strong></font></a>&nbsp;</font></td>
</dtml-if> </dtml-if>
...@@ -80,22 +78,22 @@ ...@@ -80,22 +78,22 @@
<tr> <tr>
<dtml-in manage_options> <dtml-in manage_options>
<dtml-if "_['sequence-index']==a_"> <dtml-if "_['sequence-index']==a_">
<td colspan="3" bgcolor="#ffffff"><img src="<dtml-var <td colspan="3" bgcolor="#ffffff"><img src="dtml-BASEPATH1;/p_/sp"
SCRIPT_NAME>/p_/sp" width="2" height="1"></td> width="2" height="1"></td>
<dtml-else> <dtml-else>
<td colspan="3" bgcolor="#efefef"><img src="<dtml-var <td colspan="3" bgcolor="#efefef"><img src="&dtml-BASEPATH1;/p_/sp"
SCRIPT_NAME>/p_/sp" width="2" height="1"></td> width="2" height="1"></td>
</dtml-if> </dtml-if>
</dtml-in> </dtml-in>
</tr> </tr>
<tr> <tr>
<dtml-in manage_options> <dtml-in manage_options>
<dtml-if "_['sequence-index']==a_"> <dtml-if "_['sequence-index']==a_">
<td colspan="3" bgcolor="#ffffff"><img src="<dtml-var <td colspan="3" bgcolor="#ffffff"><img src="&dtml-BASEPATH1;/p_/sp"
SCRIPT_NAME>/p_/sp" width="2" height="1"></td> width="2" height="1"></td>
<dtml-else> <dtml-else>
<td colspan="3" bgcolor="#c0c0c0"><img src="<dtml-var <td colspan="3" bgcolor="#c0c0c0"><img src="&dtml-BASEPATH1;/p_/sp"
SCRIPT_NAME>/p_/sp" width="2" height="1"></td> width="2" height="1"></td>
</dtml-if> </dtml-if>
</dtml-in> </dtml-in>
</tr> </tr>
...@@ -114,24 +112,23 @@ ...@@ -114,24 +112,23 @@
<tr> <tr>
<td align="left" valign="top"> <td align="left" valign="top">
<dtml-if icon> <dtml-if icon>
<img src="<dtml-var SCRIPT_NAME>/<dtml-var icon>" <img src="&dtml-BASEPATH1;/&dtml-icon;"
alt="<dtml-var meta_type>" border="0"> alt="&dtml-meta_type;" border="0">
<strong> <strong>
</dtml-if> </dtml-if>
<dtml-if meta_type> <dtml-if meta_type>
<dtml-var meta_type> &dtml-meta_type;
<dtml-else> <dtml-else>
Object Object
</dtml-if> </dtml-if>
at /<dtml-var at <dtml-var expr="tabs_path_default(REQUEST)">
expr="tabs_path_info(SCRIPT_NAME, PATH_INFO)">
</strong> </strong>
<dtml-if locked_in_version> <dtml-if locked_in_version>
<dtml-if modified_in_version> <dtml-if modified_in_version>
<IMG SRC="<dtml-var SCRIPT_NAME>/p_/locked" <IMG SRC="&dtml-BASEPATH1;/p_/locked"
ALT="This item has been modified in this version"> ALT="This item has been modified in this version">
<dtml-else> <dtml-else>
<IMG SRC="<dtml-var SCRIPT_NAME>/p_/lockedo" <IMG SRC="&dtml-BASEPATH1;/p_/lockedo"
ALT="This item has been modified in another version"> ALT="This item has been modified in another version">
(<em><dtml-var locked_in_version></em>) (<em><dtml-var locked_in_version></em>)
</dtml-if> </dtml-if>
...@@ -160,7 +157,7 @@ ...@@ -160,7 +157,7 @@
</table> </table>
<dtml-if Zope-Version> <dtml-if Zope-Version>
<p> <p>
<em>You are currently working in version <dtml-var Zope-Version></em> <em>You are currently working in version &dtml-Zope-Version;</em>
</p> </p>
</dtml-if> </dtml-if>
</dtml-unless> </dtml-unless>
......
...@@ -24,13 +24,13 @@ ...@@ -24,13 +24,13 @@
<TD VALIGN="TOP" NOWRAP> <TD VALIGN="TOP" NOWRAP>
<dtml-if icon> <dtml-if icon>
<A HREF="manage_workspace" TARGET="manage_main"> <A HREF="manage_workspace" TARGET="manage_main">
<IMG SRC="<dtml-var SCRIPT_NAME>/<dtml-var icon>" BORDER="0" <IMG SRC="&dtml-BASEPATH1;/&dtml-icon;" BORDER="0"
ALT="&dtml-meta_type;" TITLE="Click to open this item"></A> ALT="&dtml-meta_type;" TITLE="Click to open this item"></A>
</dtml-if> </dtml-if>
<STRONG> <STRONG>
<A HREF="manage_workspace" TARGET="manage_main"> <A HREF="manage_workspace" TARGET="manage_main">
<dtml-if expr="URL1[-(_.len(SCRIPT_NAME)):]==SCRIPT_NAME"> <dtml-if expr="URLPATH1==BASEPATH1">
<dtml-var expr="SCRIPT_NAME[1:]"> <dtml-var expr="BASEPATH1[1:]">
<dtml-else> <dtml-else>
<dtml-var id> <dtml-var id>
</dtml-if> </dtml-if>
...@@ -42,11 +42,11 @@ ...@@ -42,11 +42,11 @@
<dtml-tree sort=id nowrap=1> <dtml-tree sort=id nowrap=1>
<dtml-if icon> <dtml-if icon>
<A HREF="<dtml-var tree-item-url fmt=url-quote>/manage_workspace" TARGET="manage_main"> <A HREF="<dtml-var tree-item-url fmt=url-quote>/manage_workspace" TARGET="manage_main">
<IMG SRC="<dtml-var SCRIPT_NAME>/<dtml-var icon>" BORDER="0" <IMG SRC="&dtml-BASEPATH1;/&dtml-icon;" BORDER="0"
TITLE="Click to open this item" ALT="&dtml-meta_type;"></A> TITLE="Click to open this item" ALT="&dtml-meta_type;"></A>
</dtml-if> </dtml-if>
<A HREF="<dtml-var tree-item-url fmt=url-quote>/manage_workspace" TARGET="manage_main"> <A HREF="<dtml-var tree-item-url fmt=url-quote>/manage_workspace" TARGET="manage_main">
<dtml-var id> &dtml-id;
</A> </A>
</dtml-tree> </dtml-tree>
<TABLE CELLSPACING="0"> <TABLE CELLSPACING="0">
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<dtml-if version_info> <dtml-if version_info>
<FORM ACTION="<dtml-var URL1>" METHOD="POST"> <FORM ACTION="&dtml-URL1;" METHOD="POST">
Select one or more versions below and then click on the &quot;Save&quot; Select one or more versions below and then click on the &quot;Save&quot;
button to save the versions or click on the &quot;Discard&quot; button to button to save the versions or click on the &quot;Discard&quot; button to
discard changes made in the versions. discard changes made in the versions.
...@@ -18,9 +18,9 @@ ...@@ -18,9 +18,9 @@
<dtml-in version_info mapping> <dtml-in version_info mapping>
<tr> <tr>
<td valign=top><input type=checkbox name="versions:list" <td valign=top><input type=checkbox name="versions:list"
value="<dtml-var id html_quote>"></td> value="&dtml-id;"></td>
<td valign=top> <td valign=top>
<a href="<dtml-var SCRIPT_NAME>/<dtml-var id>/manage_workspace"><dtml-var id></a> <a href="&dtml-BASEPATH1;/&dtml-id;/manage_workspace">&dtml-id;</a>
</td> </td>
</tr> </tr>
</dtml-in> </dtml-in>
......
<dtml-var SCRIPT_NAME>/Control_Panel/Products/<dtml-var product>/Help/<dtml-var topic> &dtml-BASEPATH1;/Control_Panel/Products/&dtml-product;/Help/&dtml-topic;
\ No newline at end of file \ No newline at end of file
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
<title>Z Object Publishing Environment Help</title> <title>Z Object Publishing Environment Help</title>
</head> </head>
<frameset cols="180,*"> <frameset cols="180,*">
<frame src="<dtml-var SCRIPT_NAME>/HelpSys/hs_menu" name="hs_tframe" <frame src="&dtml-BASEPATH1;/HelpSys/hs_menu" name="hs_tframe"
marginwidth="2" marginheight="2" scrolling="auto"> marginwidth="2" marginheight="2" scrolling="auto">
<frame src="<dtml-var SCRIPT_NAME>/HelpSys/hs_main" NAME="hs_cframe" <frame src="&dtml-BASEPATH1;/HelpSys/hs_main" NAME="hs_cframe"
marginwidth="2" marginheight="2" scrolling="auto"> marginwidth="2" marginheight="2" scrolling="auto">
</frameset> </frameset>
<noframes> <noframes>
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<tr> <tr>
<td valign="top" nowrap> <td valign="top" nowrap>
<a href="hs_main" target="hs_cframe"> <a href="hs_main" target="hs_cframe">
<img src="<dtml-var SCRIPT_NAME>/<dtml-var hs_eicon>" border="0" <img src="&dtml-BASEPATH1;/&dtml-hs_eicon;" border="0"
alt="Z Online Help"></a> alt="Z Online Help"></a>
<strong> <strong>
<a href="hs_main" target="hs_cframe"> <a href="hs_main" target="hs_cframe">
...@@ -19,14 +19,14 @@ ...@@ -19,14 +19,14 @@
</tr> </tr>
</table> </table>
<dtml-tree id=hs_id url=hs_url branches=hs_objectvalues nowrap=1> <dtml-tree id=hs_id url=hs_url branches=hs_objectvalues nowrap=1>
<a href="<dtml-var tree-item-url>/hs_main" target="hs_cframe"> <a href="&dtml.-tree-item-url;/hs_main" target="hs_cframe">
<dtml-if tree-item-expanded> <dtml-if tree-item-expanded>
<img src="<dtml-var SCRIPT_NAME>/<dtml-var hs_eicon>" border="0" alt="click to view this item"></a> <img src="&dtml-BASEPATH1;/&dtml-hs_eicon;" border="0" alt="click to view this item"></a>
<dtml-else> <dtml-else>
<img src="<dtml-var SCRIPT_NAME>/<dtml-var hs_cicon>" border="0" alt="click to view this item"></a> <img src="&dtml-BASEPATH1;/&dtml-hs_cicon;" border="0" alt="click to view this item"></a>
</dtml-if> </dtml-if>
<a href="<dtml-var tree-item-url>/hs_main" target="hs_cframe"> <a href="&dtml.-tree-item-url;/hs_main" target="hs_cframe">
<dtml-var hs_title> &dtml-hs_title;
</a> </a>
</dtml-tree> </dtml-tree>
......
...@@ -13,7 +13,7 @@ Object Reference ...@@ -13,7 +13,7 @@ Object Reference
<h3><dtml-if icon><img src="<dtml-var SCRIPT_NAME>/<dtml-var icon>" height="16" width="16" alt=""></dtml-if> <dtml-var meta_type></h3> <h3><dtml-if icon><img src="&dtml-BASEPATH1;/<dtml-var icon>" height="16" width="16" alt=""></dtml-if> <dtml-var meta_type></h3>
<code> <code>
<dtml-var get_docstring_html> <dtml-var get_docstring_html>
...@@ -65,7 +65,7 @@ Object Reference ...@@ -65,7 +65,7 @@ Object Reference
<dtml-else> <dtml-else>
<p>No documentation for this method</p> <p>No documentation for this method</p>
</dtml-if> </dtml-if>
<a href="#top"><img src="<dtml-var SCRIPT_NAME>/HelpSys/hs_uarrow" height="9" width="9" border="0" valign="bottom" alt=""> top</a><br><br> <a href="#top"><img src="&dtml-BASEPATH1;/HelpSys/hs_uarrow" height="9" width="9" border="0" valign="bottom" alt=""> top</a><br><br>
</code> </code>
</dd> </dd>
</dtml-in> </dtml-in>
...@@ -73,7 +73,7 @@ Object Reference ...@@ -73,7 +73,7 @@ Object Reference
<p> <p>
<a href="../hs_main"> <a href="../hs_main">
<img src="<dtml-var SCRIPT_NAME>/HelpSys/hs_larrow" height="9" width="9" border="0" valign="bottom" alt=""> Back to Object Reference</a> <img src="&dtml-BASEPATH1;/HelpSys/hs_larrow" height="9" width="9" border="0" valign="bottom" alt=""> Back to Object Reference</a>
</p> </p>
</body> </body>
</html> </html>
...@@ -20,8 +20,7 @@ focuses on those object services useful in ...@@ -20,8 +20,7 @@ focuses on those object services useful in
<ul> <ul>
<dtml-in hs_objectvalues> <dtml-in hs_objectvalues>
<dtml-with sequence-item> <dtml-with sequence-item>
<li> <a href="<dtml-var BASE1>/HelpSys/ObjectRef/<dtml-var <li> <a href="&dtml-BASEPATH1/HelpSys/ObjectRef/&dtml.url_quote-meta_type;/hs_main">&dtml-meta_type;</a>
meta_type fmt=url-quote>/hs_main"><dtml-var meta_type></a>
</dtml-with> </dtml-with>
</li> </li>
</dtml-in> </dtml-in>
...@@ -29,7 +28,7 @@ focuses on those object services useful in ...@@ -29,7 +28,7 @@ focuses on those object services useful in
<p> <p>
<a href="../hs_main"> <a href="../hs_main">
<img src="<dtml-var SCRIPT_NAME>/HelpSys/hs_larrow" height="9" width="9" border="0" valign="bottom" alt=""> Back to Help</a> <img src="&dtml-BASEPATH1;/HelpSys/hs_larrow" height="9" width="9" border="0" valign="bottom" alt=""> Back to Help</a>
</p> </p>
</body> </body>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<p>Help topics matching <b><dtml-var SearchableText></b>:</p> <p>Help topics matching <b><dtml-var SearchableText></b>:</p>
<p> <p>
<dtml-in "searchResults(REQUEST)"> <dtml-in "searchResults(REQUEST)">
<a href="<dtml-var SCRIPT_NAME><dtml-var url>" target="help_main"><dtml-var title_or_id></a><br> <a href="&dtml-BASEPATH1;&dtml-url;" target="help_main">&dtml-title_or_id;</a><br>
<dtml-else> <dtml-else>
<em>No matches.</em> <em>No matches.</em>
</dtml-in> </dtml-in>
......
...@@ -44,15 +44,15 @@ Found <dtml-var results fmt=collection-length> item<dtml-if expr="_.len(results) ...@@ -44,15 +44,15 @@ Found <dtml-var results fmt=collection-length> item<dtml-if expr="_.len(results)
<dtml-in results> <dtml-in results>
<TR> <TR>
<TD ALIGN="LEFT" VALIGN="TOP"> <TD ALIGN="LEFT" VALIGN="TOP">
<A HREF="<dtml-var sequence-key>/manage_workspace"> <A HREF="&dtml-sequence-key;/manage_workspace">
<IMG SRC="<dtml-var SCRIPT_NAME>/<dtml-var icon>" <IMG SRC="&dtml-BASEPATH1;/&dtml-icon;"
ALT="Click to open this item" BORDER="0"></A> ALT="Click to open this item" BORDER="0"></A>
</TD> </TD>
<TD ALIGN="LEFT" VALIGN="TOP"> <TD ALIGN="LEFT" VALIGN="TOP">
<A HREF="<dtml-var sequence-key>/manage_workspace"> <A HREF="&dtml-sequence-key;/manage_workspace">
<dtml-var sequence-key> &dtml-sequence-key;
<dtml-if title> <dtml-if title>
(<dtml-var title>) (&dtml-title;)
</dtml-if> </dtml-if>
</A> </A>
</TD> </TD>
......
...@@ -7,34 +7,33 @@ ...@@ -7,34 +7,33 @@
<dtml-var manage_tabs> <dtml-var manage_tabs>
<P> <P>
<FORM ACTION="<dtml-var URL1>" METHOD="POST"> <FORM ACTION="&dtml-URL1;" METHOD="POST">
<dtml-if objectItems> <dtml-if objectItems>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="2"> <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="2">
<dtml-in objectItems sort> <dtml-in objectItems sort>
<TR> <TR>
<TD ALIGN="LEFT" VALIGN="TOP" WIDTH="16"> <TD ALIGN="LEFT" VALIGN="TOP" WIDTH="16">
<INPUT TYPE="CHECKBOX" NAME="ids:list" VALUE="<dtml-var sequence-key html_quote>"> <INPUT TYPE="CHECKBOX" NAME="ids:list" VALUE="&dtml-sequence-key;">
</TD> </TD>
<TD ALIGN="LEFT" VALIGN="TOP"> <TD ALIGN="LEFT" VALIGN="TOP">
<dtml-if icon> <dtml-if icon>
<A HREF="<dtml-var sequence-key url_quote>/manage_workspace"> <A HREF="&dtml.url_quote-sequence-key;/manage_workspace">
<IMG SRC="<dtml-var SCRIPT_NAME>/<dtml-var icon>" <IMG SRC="&dtml-BASEPATH1;/&dtml-icon;" ALT="[&dtml-meta_type;]" BORDER="0">
ALT="[<dtml-var meta_type>]" BORDER="0"></A> </A>
</dtml-if icon> </dtml-if icon>
</TD> </TD>
<TD ALIGN="LEFT" VALIGN="TOP"> <TD ALIGN="LEFT" VALIGN="TOP">
<A HREF="<dtml-var sequence-key url_quote>/manage_workspace"> <A HREF="&dtml.url_quote-sequence-key;/manage_workspace">
<dtml-var sequence-key fmt="html-quote"> <dtml-if title>(<dtml-var &dtml-sequence-key; <dtml-if title>(&dtml-title;)</dtml-if>
title fmt="html-quote">)</dtml-if>
</A> </A>
<dtml-if locked_in_version> <dtml-if locked_in_version>
<dtml-if modified_in_version> <dtml-if modified_in_version>
<IMG SRC="<dtml-var SCRIPT_NAME>/p_/locked" <IMG SRC="&dtml-BASEPATH1;/p_/locked"
ALT="This item has been modified in this version"> ALT="This item has been modified in this version">
<dtml-else> <dtml-else>
<IMG SRC="<dtml-var SCRIPT_NAME>/p_/lockedo" <IMG SRC="&dtml-BASEPATH1;/p_/lockedo"
ALT="This item has been modified in another version"> ALT="This item has been modified in another version">
(<em><dtml-var locked_in_version></em>) (<em>&dtml-locked_in_version;</em>)
</dtml-if> </dtml-if>
</dtml-if> </dtml-if>
</TD> </TD>
...@@ -67,7 +66,7 @@ ...@@ -67,7 +66,7 @@
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="2"> <TABLE BORDER="0" CELLSPACING="0" CELLPADDING="2">
<TR> <TR>
<TD> <TD>
There are currently no items in <EM><dtml-var title_or_id></EM> There are currently no items in <EM>&dtml-title_or_id;</EM>
<P> <P>
<dtml-unless dontAllowCopyAndPaste> <dtml-unless dontAllowCopyAndPaste>
<dtml-if cb_dataValid> <dtml-if cb_dataValid>
...@@ -91,12 +90,11 @@ There are currently no items in <EM><dtml-var title_or_id></EM> ...@@ -91,12 +90,11 @@ There are currently no items in <EM><dtml-var title_or_id></EM>
</TR> </TR>
<TR> <TR>
<TD VALIGN="MIDDLE"> <TD VALIGN="MIDDLE">
<FORM ACTION="<dtml-var URL1>/" METHOD="GET"> <FORM ACTION="&dtml-URL1;/" METHOD="GET">
<SELECT NAME=":method" ONCHANGE="location.href='<dtml-var URL1 <SELECT NAME=":method" ONCHANGE="location.href='&dtml-URL1;/'+this.options[this.selectedIndex].value">
>/'+this.options[this.selectedIndex].value">
<OPTION value="manage_workspace" DISABLED>Available Objects <OPTION value="manage_workspace" DISABLED>Available Objects
<dtml-in filtered_meta_types mapping sort=name> <dtml-in filtered_meta_types mapping sort=name>
<OPTION value="<dtml-var action fmt="url-quote">"><dtml-var name> <OPTION value="&dtml.url_quote-action;">&dtml-name;
</dtml-in> </dtml-in>
</SELECT> </SELECT>
<INPUT TYPE="SUBMIT" VALUE=" Add "> <INPUT TYPE="SUBMIT" VALUE=" Add ">
...@@ -105,10 +103,10 @@ There are currently no items in <EM><dtml-var title_or_id></EM> ...@@ -105,10 +103,10 @@ There are currently no items in <EM><dtml-var title_or_id></EM>
</TR> </TR>
</TABLE> </TABLE>
<dtml-else> <dtml-else>
<FORM ACTION="<dtml-var URL1>/" METHOD="GET"> <FORM ACTION="&dtml-URL1;/" METHOD="GET">
To add a new item click &quot;Add&quot;. To add a new item click &quot;Add&quot;.
<dtml-in filtered_meta_types mapping sort=name> <dtml-in filtered_meta_types mapping sort=name>
<input type=hidden name=":method" value="<dtml-var action fmt="url-quote">"> <input type=hidden name=":method" value="&dtml.url_quote-action;">
<INPUT TYPE="SUBMIT" VALUE=" Add "> <INPUT TYPE="SUBMIT" VALUE=" Add ">
</dtml-in> </dtml-in>
</FORM> </FORM>
......
...@@ -17,15 +17,15 @@ ...@@ -17,15 +17,15 @@
<TR> <TR>
<TD ALIGN="LEFT" VALIGN="TOP"> <TD ALIGN="LEFT" VALIGN="TOP">
<A HREF="<dtml-var id>"> <A HREF="&dtml-id;">
<dtml-var id> (<dtml-var xml_namespace>) &dtml-id; (<dtml-var xml_namespace>)
</A> </A>
<dtml-if locked_in_session> <dtml-if locked_in_session>
<dtml-if modified_in_session> <dtml-if modified_in_session>
<IMG SRC="<dtml-var "REQUEST['SCRIPT_NAME']">/p_/locked" <IMG SRC="&dtml-BASEPATH1;/p_/locked"
ALT="This item has been modified in this session"> ALT="This item has been modified in this session">
<dtml-else> <dtml-else>
<IMG SRC="<dtml-var "REQUEST['SCRIPT_NAME']">/p_/lockedo" <IMG SRC="&dtml-BASEPATH1;/p_/lockedo"
ALT="This item has been modified in another session"> ALT="This item has been modified in another session">
</dtml-if> </dtml-if>
</dtml-if> </dtml-if>
......
...@@ -15,27 +15,27 @@ ...@@ -15,27 +15,27 @@
<dtml-var "HelpSys.HelpButton('ObjectManager_Rename.stx','OFSP')"> <dtml-var "HelpSys.HelpButton('ObjectManager_Rename.stx','OFSP')">
<P> <P>
<FORM ACTION="<dtml-var URL1>" METHOD="POST"> <FORM ACTION="&dtml-URL1;" METHOD="POST">
<TABLE CELLSPACING="0"> <TABLE CELLSPACING="0">
<dtml-in expr="manage_CopyContainerAllItems(REQUEST)"> <dtml-in expr="manage_CopyContainerAllItems(REQUEST)">
<TR> <TR>
<TD ALIGN="LEFT" VALIGN="TOP"> <TD ALIGN="LEFT" VALIGN="TOP">
<IMG SRC="<dtml-var SCRIPT_NAME>/<dtml-var icon>" ALT="" BORDER="0"> <IMG SRC="&dtml-BASEPATH1;/&dtml-icon;" ALT="" BORDER="0">
</TD> </TD>
<dtml-if cb_isMoveable> <dtml-if cb_isMoveable>
<TD ALIGN="LEFT" VALIGN="TOP"> <TD ALIGN="LEFT" VALIGN="TOP">
<dtml-var id> &dtml-id;
</TD> </TD>
<TD ALIGN="LEFT" VALIGN="TOP"> <TD ALIGN="LEFT" VALIGN="TOP">
<STRONG>to:</STRONG> <STRONG>to:</STRONG>
</TD> </TD>
<TD ALIGN="LEFT" VALIGN="TOP"> <TD ALIGN="LEFT" VALIGN="TOP">
<INPUT TYPE="HIDDEN" NAME="ids:list" VALUE="<dtml-var id html_quote>"> <INPUT TYPE="HIDDEN" NAME="ids:list" VALUE="&dtml-id;">
<INPUT TYPE="TEXT" NAME="new_ids:list" SIZE="20" value="&dtml-id;"> <INPUT TYPE="TEXT" NAME="new_ids:list" SIZE="20" value="&dtml-id;">
</TD> </TD>
<dtml-else> <dtml-else>
<TD ALIGN="LEFT" VALIGN="TOP" COLSPAN="3"> <TD ALIGN="LEFT" VALIGN="TOP" COLSPAN="3">
<dtml-var id> may not be renamed. &dtml-id; may not be renamed.
</TD> </TD>
</dtml-if> </dtml-if>
</TR> </TR>
......
...@@ -144,6 +144,12 @@ class Request: ...@@ -144,6 +144,12 @@ class Request:
For example if URL='http://localhost/foo/bar', then For example if URL='http://localhost/foo/bar', then
URL1='http://localhost/foo' and URL2='http://localhost'. URL1='http://localhost/foo' and URL2='http://localhost'.
*URLPATHn* -- 'URLPATH0' is the path portion of 'URL',
'URLPATH1' is the path portion of 'URL1', and so on.
For example if URL='http://localhost/foo/bar', then
URLPATH1='/foo' and URLPATH2='/'.
*BASEn* -- 'BASE0' is the URL up to but not including the Zope *BASEn* -- 'BASE0' is the URL up to but not including the Zope
application object. 'BASE1' is the URL of the Zope application application object. 'BASE1' is the URL of the Zope application
object. 'BASE2' is the URL of the Zope application object with object. 'BASE2' is the URL of the Zope application object with
...@@ -154,6 +160,13 @@ class Request: ...@@ -154,6 +160,13 @@ class Request:
BASE0='http://localhost', BASE1='http://localhost/Zope.cgi', BASE0='http://localhost', BASE1='http://localhost/Zope.cgi',
and BASE2='http://localhost/Zope.cgi/foo'. and BASE2='http://localhost/Zope.cgi/foo'.
*BASEPATHn* -- 'BASEPATH0' is the path portion of 'BASE0',
'BASEPATH1' is the path portion of 'BASE1', and so on.
'BASEPATH1' is the externally visible path to the root Zope
folder, equivalent to CGI's 'SCRIPT_NAME', but virtual-host aware.
For example if URL='http://localhost/Zope.cgi/foo/bar', then
BASEPATH0='/', BASEPATH1='/Zope.cgi', and BASEPATH2='/Zope.cgi/foo'.
""" """
...@@ -223,9 +236,31 @@ class Request: ...@@ -223,9 +236,31 @@ class Request:
""" """
def setServerURL(self, protocol=None, hostname=None, port=None):
"""
Sets the specified elements of 'SERVER_URL', also affecting
'URL', 'URLn', 'BASEn', and 'absolute_url()'.
Provides virtual hosting support.
Permission - Always available
"""
def setVirtualRoot(self, path, hard=0):
"""
Alters 'URL', 'URLn', 'URLPATHn', 'BASEn', 'BASEPATHn', and
'absolute_url()' so that the current object has path 'path'.
If 'hard' is true, 'PARENTS' is emptied.
Provides virtual hosting support. Intended to be called from
publishing traversal hooks.
Permission - Always available
"""
......
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd"> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en"> <html lang="en">
<head><title><dtml-var title_or_id> tables</title></head> <head><title>&dtml-title_or_id; tables</title></head>
<body bgcolor="#FFFFFF" link="#000099" vlink="#555555" alink="#77003B"> <body bgcolor="#FFFFFF" link="#000099" vlink="#555555" alink="#77003B">
<dtml-var manage_tabs> <dtml-var manage_tabs>
<dtml-tree header=info> <dtml-tree header=info>
<IMG SRC="<dtml-var SCRIPT_NAME>/misc_/ZGadflyDA/<dtml-var icon>" <IMG SRC="&dtml-BASEPATH1;/misc_/ZGadflyDA/&dtml-icon;"
ALT="<dtml-var Type>" BORDER="0"> ALT="&dtml-Type;" BORDER="0">
<dtml-var Name><dtml-var Description> &dtml-Name;&dtml-Description;
</dtml-tree> </dtml-tree>
</body> </body>
......
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
# attributions are listed in the accompanying credits file. # attributions are listed in the accompanying credits file.
# #
############################################################################## ##############################################################################
__version__='$Revision: 1.30 $'[11:-2] __version__='$Revision: 1.31 $'[11:-2]
from string import join, split, find, rfind, lower, upper from string import join, split, find, rfind, lower, upper
from urllib import quote from urllib import quote
...@@ -239,15 +239,15 @@ class BaseRequest: ...@@ -239,15 +239,15 @@ class BaseRequest:
if response is None: response=self.response if response is None: response=self.response
debug_mode=response.debug_mode debug_mode=response.debug_mode
# Make sure that REQUEST cannot be traversed.
if find(path, 'REQUEST') >= 0:
return response.notFoundError(path)
# Cleanup the path list # Cleanup the path list
if path[:1]=='/': path=path[1:] if path[:1]=='/': path=path[1:]
if path[-1:]=='/': path=path[:-1] if path[-1:]=='/': path=path[:-1]
clean=[] clean=[]
for item in split(path, '/'): for item in split(path, '/'):
# Make sure that REQUEST cannot be traversed.
if item == 'REQUEST':
return response.notFoundError(path)
if not item or item=='.': if not item or item=='.':
continue continue
elif item == '..': elif item == '..':
......
...@@ -83,9 +83,9 @@ ...@@ -83,9 +83,9 @@
# #
############################################################################## ##############################################################################
__version__='$Revision: 1.37 $'[11:-2] __version__='$Revision: 1.38 $'[11:-2]
import regex, sys, os, string, urllib import regex, re, sys, os, string, urllib
from string import lower, atoi, rfind, split, strip, join, upper, find from string import lower, atoi, rfind, split, strip, join, upper, find
from BaseRequest import BaseRequest from BaseRequest import BaseRequest
from HTTPResponse import HTTPResponse from HTTPResponse import HTTPResponse
...@@ -741,8 +741,8 @@ class HTTPRequest(BaseRequest): ...@@ -741,8 +741,8 @@ class HTTPRequest(BaseRequest):
def __getitem__(self,key, def __getitem__(self,key,
default=_marker, # Any special internal marker will do default=_marker, # Any special internal marker will do
URLmatch=regex.compile('URL[0-9]+$').match, URLmatch=re.compile('URL(PATH)?([0-9]+)$').match,
BASEmatch=regex.compile('BASE[0-9]+$').match, BASEmatch=re.compile('BASE(PATH)?([0-9]+)$').match,
): ):
"""Get a variable value """Get a variable value
...@@ -757,13 +757,19 @@ class HTTPRequest(BaseRequest): ...@@ -757,13 +757,19 @@ class HTTPRequest(BaseRequest):
if key=='REQUEST': return self if key=='REQUEST': return self
return other[key] return other[key]
if key[:1]=='U' and URLmatch(key) >= 0: if key[:1]=='U':
path = self._script + self._steps match = URLmatch(key)
n = len(path) - atoi(key[3:]) if match is not None:
if n < 0: pathonly, n = match.groups()
raise KeyError, key path = self._script + self._steps
URL=join([other['SERVER_URL']] + path[:n], '/') n = len(path) - int(n)
other[key]=URL if n < 0:
raise KeyError, key
if pathonly:
path = [''] + path[:n]
else:
path = [other['SERVER_URL']] + path[:n]
other[key] = URL = join(path, '/')
self._urls = self._urls + (key,) self._urls = self._urls + (key,)
return URL return URL
...@@ -776,9 +782,11 @@ class HTTPRequest(BaseRequest): ...@@ -776,9 +782,11 @@ class HTTPRequest(BaseRequest):
if key=='REQUEST': return self if key=='REQUEST': return self
if key[:1]=='B': if key[:1]=='B':
if BASEmatch(key) >= 0: match = BASEmatch(key)
if match is not None:
pathonly, n = match.groups()
path = self._steps path = self._steps
n = atoi(key[4:]) n = int(n)
if n: if n:
n = n - 1 n = n - 1
if len(path) < n: if len(path) < n:
...@@ -787,9 +795,13 @@ class HTTPRequest(BaseRequest): ...@@ -787,9 +795,13 @@ class HTTPRequest(BaseRequest):
v = self._script + path[:n] v = self._script + path[:n]
else: else:
v = self._script[:-1] v = self._script[:-1]
other[key] = v = join([other['SERVER_URL']] + v, '/') if pathonly:
v.insert(0, '')
else:
v.insert(0, other['SERVER_URL'])
other[key] = URL = join(v, '/')
self._urls = self._urls + (key,) self._urls = self._urls + (key,)
return v return URL
if key=='BODY' and self._file is not None: if key=='BODY' and self._file is not None:
p=self._file.tell() p=self._file.tell()
......
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