Commit a4754fdf authored by 's avatar

merged virtual host branch

parent 1fdadc8f
......@@ -19,7 +19,7 @@ that user.
</TD>
<TD ALIGN="LEFT" VALIGN="TOP">
<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">
</A>
<A HREF="manage_users?name=<dtml-var sequence-item fmt=url-quote>&submit=Edit">
......
......@@ -85,9 +85,9 @@
"""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
from Dialogs import MessageDialog
......@@ -154,12 +154,28 @@ class Tabs(ExtensionClass.Base):
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,
# Static vars
quote=urllib.quote,
):
url=script
out=[]
while path[:1]=='/': path=path[1:]
while path[-1:]=='/': path=path[:-1]
......
......@@ -105,7 +105,7 @@ met:
<A NAME="PYTHON">
<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>!
</H3>
<p>Copyright &copy; 1991-1995 by Stichting Mathematisch Centrum, Amsterdam,
......
......@@ -64,20 +64,20 @@ such as database and product management.
<TR>
<td> </td>
<TD ALIGN="LEFT" VALIGN="TOP">
<A HREF="<dtml-var sequence-key>/manage_workspace">
<IMG SRC="<dtml-var SCRIPT_NAME>/<dtml-var icon>"
<A HREF="<dtml-var sequence-key url_quote>/manage_workspace">
<IMG SRC="&dtml-BASEPATH1;/<dtml-var icon>"
ALT="Click to open this item" BORDER="0"></A>
</TD>
<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>
</A>
<dtml-if locked_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">
<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">
</dtml-if>
</dtml-if>
......
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML lang="en">
<HEAD>
<TITLE><dtml-var title_or_id> on <dtml-var URL1></TITLE>
<TITLE>&dtml-title_or_id; on &dtml.-URL1;</TITLE>
<SCRIPT LANGUAGE="javascript">
<!--
function update_menu()
......@@ -11,9 +11,9 @@ function update_menu()
</SCRIPT>
</HEAD>
<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">
<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">
</FRAMESET>
<NOFRAMES>
......
......@@ -17,36 +17,36 @@
<td bgcolor="#003366" rowspan="5" width="10%" valign="bottom"
align="left"><font face="Verdana, Arial, Helvetica" color="#ffffff"
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 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>
<dtml-in manage_options>
<dtml-if "_['sequence-index']==a_">
<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>
<td bgcolor="#ffffff"><img src="<dtml-var
SCRIPT_NAME>/p_/sp" width="1" height="2"></td>
<td bgcolor="#ffffff"><img src="&dtml-BASEPATH1;/p_/sp"
width="1" height="2"></td>
<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>
<td bgcolor="#003366" rowspan="4"><img src="<dtml-var
SCRIPT_NAME>/p_/sp" width="2" height="1"></td>
<td bgcolor="#003366" rowspan="4"><img src="dtml-BASEPATH1;/p_/sp"
width="2" height="1"></td>
<dtml-else>
<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>
<td bgcolor="#efefef"><img src="<dtml-var
SCRIPT_NAME>/p_/sp" width="1" height="2"></td>
<td bgcolor="#efefef"><img src="&dtml-BASEPATH1;/p_/sp"
width="1" height="2"></td>
<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>
<td bgcolor="#003366" rowspan="4"><img src="<dtml-var
SCRIPT_NAME>/p_/sp" width="2" height="1"></td>
<td bgcolor="#003366" rowspan="4"><img src="&dtml-BASEPATH1;/p_/sp"
width="2" height="1"></td>
</dtml-if>
</dtml-in>
</tr>
......@@ -56,22 +56,20 @@
<td bgcolor="#ffffff" valign="bottom"
align="center"><font face="Verdana, Arial, Helvetica"
size="1">&nbsp;<a
<dtml-if action>href="<dtml-var action>"
<dtml-else>href="<dtml-var URL1>"
<dtml-if action>href="&dtml-action;"
<dtml-else>href="&dtml-URL1;"
</dtml-if>
<dtml-if target> target="<dtml-var
target>"</dtml-if>><font
<dtml-if target> target="&dtml-target;"</dtml-if>><font
color="#000000"><strong><dtml-var
label></strong></font></a>&nbsp;</font></td>
<dtml-else>
<td bgcolor="#efefef" valign="bottom"
align="center"><font face="Verdana, Arial, Helvetica"
size="1">&nbsp;<a
<dtml-if action>href="<dtml-var action>"
<dtml-else>href="<dtml-var URL1>"
<dtml-if action>href="&dtml-action;"
<dtml-else>href="&dtml-URL1;"
</dtml-if>
<dtml-if target> target="<dtml-var
target>"</dtml-if>><font
<dtml-if target> target="&dtml-target;"</dtml-if>><font
color="#000000"><strong><dtml-var
label></strong></font></a>&nbsp;</font></td>
</dtml-if>
......@@ -80,22 +78,22 @@
<tr>
<dtml-in manage_options>
<dtml-if "_['sequence-index']==a_">
<td colspan="3" bgcolor="#ffffff"><img src="<dtml-var
SCRIPT_NAME>/p_/sp" width="2" height="1"></td>
<td colspan="3" bgcolor="#ffffff"><img src="dtml-BASEPATH1;/p_/sp"
width="2" height="1"></td>
<dtml-else>
<td colspan="3" bgcolor="#efefef"><img src="<dtml-var
SCRIPT_NAME>/p_/sp" width="2" height="1"></td>
<td colspan="3" bgcolor="#efefef"><img src="&dtml-BASEPATH1;/p_/sp"
width="2" height="1"></td>
</dtml-if>
</dtml-in>
</tr>
<tr>
<dtml-in manage_options>
<dtml-if "_['sequence-index']==a_">
<td colspan="3" bgcolor="#ffffff"><img src="<dtml-var
SCRIPT_NAME>/p_/sp" width="2" height="1"></td>
<td colspan="3" bgcolor="#ffffff"><img src="&dtml-BASEPATH1;/p_/sp"
width="2" height="1"></td>
<dtml-else>
<td colspan="3" bgcolor="#c0c0c0"><img src="<dtml-var
SCRIPT_NAME>/p_/sp" width="2" height="1"></td>
<td colspan="3" bgcolor="#c0c0c0"><img src="&dtml-BASEPATH1;/p_/sp"
width="2" height="1"></td>
</dtml-if>
</dtml-in>
</tr>
......@@ -114,24 +112,23 @@
<tr>
<td align="left" valign="top">
<dtml-if icon>
<img src="<dtml-var SCRIPT_NAME>/<dtml-var icon>"
alt="<dtml-var meta_type>" border="0">
<img src="&dtml-BASEPATH1;/&dtml-icon;"
alt="&dtml-meta_type;" border="0">
<strong>
</dtml-if>
<dtml-if meta_type>
<dtml-var meta_type>
&dtml-meta_type;
<dtml-else>
Object
</dtml-if>
at /<dtml-var
expr="tabs_path_info(SCRIPT_NAME, PATH_INFO)">
at <dtml-var expr="tabs_path_default(REQUEST)">
</strong>
<dtml-if locked_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">
<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">
(<em><dtml-var locked_in_version></em>)
</dtml-if>
......@@ -160,7 +157,7 @@
</table>
<dtml-if Zope-Version>
<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>
</dtml-if>
</dtml-unless>
......
......@@ -24,13 +24,13 @@
<TD VALIGN="TOP" NOWRAP>
<dtml-if icon>
<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>
</dtml-if>
<STRONG>
<A HREF="manage_workspace" TARGET="manage_main">
<dtml-if expr="URL1[-(_.len(SCRIPT_NAME)):]==SCRIPT_NAME">
<dtml-var expr="SCRIPT_NAME[1:]">
<dtml-if expr="URLPATH1==BASEPATH1">
<dtml-var expr="BASEPATH1[1:]">
<dtml-else>
<dtml-var id>
</dtml-if>
......@@ -42,11 +42,11 @@
<dtml-tree sort=id nowrap=1>
<dtml-if icon>
<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>
</dtml-if>
<A HREF="<dtml-var tree-item-url fmt=url-quote>/manage_workspace" TARGET="manage_main">
<dtml-var id>
&dtml-id;
</A>
</dtml-tree>
<TABLE CELLSPACING="0">
......
......@@ -9,7 +9,7 @@
<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;
button to save the versions or click on the &quot;Discard&quot; button to
discard changes made in the versions.
......@@ -18,9 +18,9 @@
<dtml-in version_info mapping>
<tr>
<td valign=top><input type=checkbox name="versions:list"
value="<dtml-var id html_quote>"></td>
value="&dtml-id;"></td>
<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>
</tr>
</dtml-in>
......
<dtml-var SCRIPT_NAME>/Control_Panel/Products/<dtml-var product>/Help/<dtml-var topic>
\ No newline at end of file
&dtml-BASEPATH1;/Control_Panel/Products/&dtml-product;/Help/&dtml-topic;
\ No newline at end of file
......@@ -4,9 +4,9 @@
<title>Z Object Publishing Environment Help</title>
</head>
<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">
<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">
</frameset>
<noframes>
......
......@@ -8,7 +8,7 @@
<tr>
<td valign="top" nowrap>
<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>
<strong>
<a href="hs_main" target="hs_cframe">
......@@ -19,14 +19,14 @@
</tr>
</table>
<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>
<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>
<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>
<a href="<dtml-var tree-item-url>/hs_main" target="hs_cframe">
<dtml-var hs_title>
<a href="&dtml.-tree-item-url;/hs_main" target="hs_cframe">
&dtml-hs_title;
</a>
</dtml-tree>
......
......@@ -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>
<dtml-var get_docstring_html>
......@@ -65,7 +65,7 @@ Object Reference
<dtml-else>
<p>No documentation for this method</p>
</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>
</dd>
</dtml-in>
......@@ -73,7 +73,7 @@ Object Reference
<p>
<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>
</body>
</html>
......@@ -20,8 +20,7 @@ focuses on those object services useful in
<ul>
<dtml-in hs_objectvalues>
<dtml-with sequence-item>
<li> <a href="<dtml-var BASE1>/HelpSys/ObjectRef/<dtml-var
meta_type fmt=url-quote>/hs_main"><dtml-var meta_type></a>
<li> <a href="&dtml-BASEPATH1/HelpSys/ObjectRef/&dtml.url_quote-meta_type;/hs_main">&dtml-meta_type;</a>
</dtml-with>
</li>
</dtml-in>
......@@ -29,7 +28,7 @@ focuses on those object services useful in
<p>
<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>
</body>
......
......@@ -6,7 +6,7 @@
<p>Help topics matching <b><dtml-var SearchableText></b>:</p>
<p>
<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>
<em>No matches.</em>
</dtml-in>
......
......@@ -44,15 +44,15 @@ Found <dtml-var results fmt=collection-length> item<dtml-if expr="_.len(results)
<dtml-in results>
<TR>
<TD ALIGN="LEFT" VALIGN="TOP">
<A HREF="<dtml-var sequence-key>/manage_workspace">
<IMG SRC="<dtml-var SCRIPT_NAME>/<dtml-var icon>"
<A HREF="&dtml-sequence-key;/manage_workspace">
<IMG SRC="&dtml-BASEPATH1;/&dtml-icon;"
ALT="Click to open this item" BORDER="0"></A>
</TD>
<TD ALIGN="LEFT" VALIGN="TOP">
<A HREF="<dtml-var sequence-key>/manage_workspace">
<dtml-var sequence-key>
<A HREF="&dtml-sequence-key;/manage_workspace">
&dtml-sequence-key;
<dtml-if title>
(<dtml-var title>)
(&dtml-title;)
</dtml-if>
</A>
</TD>
......
......@@ -7,34 +7,33 @@
<dtml-var manage_tabs>
<P>
<FORM ACTION="<dtml-var URL1>" METHOD="POST">
<FORM ACTION="&dtml-URL1;" METHOD="POST">
<dtml-if objectItems>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="2">
<dtml-in objectItems sort>
<TR>
<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 ALIGN="LEFT" VALIGN="TOP">
<dtml-if icon>
<A HREF="<dtml-var sequence-key url_quote>/manage_workspace">
<IMG SRC="<dtml-var SCRIPT_NAME>/<dtml-var icon>"
ALT="[<dtml-var meta_type>]" BORDER="0"></A>
<A HREF="&dtml.url_quote-sequence-key;/manage_workspace">
<IMG SRC="&dtml-BASEPATH1;/&dtml-icon;" ALT="[&dtml-meta_type;]" BORDER="0">
</A>
</dtml-if icon>
</TD>
<TD ALIGN="LEFT" VALIGN="TOP">
<A HREF="<dtml-var sequence-key url_quote>/manage_workspace">
<dtml-var sequence-key fmt="html-quote"> <dtml-if title>(<dtml-var
title fmt="html-quote">)</dtml-if>
<A HREF="&dtml.url_quote-sequence-key;/manage_workspace">
&dtml-sequence-key; <dtml-if title>(&dtml-title;)</dtml-if>
</A>
<dtml-if locked_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">
<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">
(<em><dtml-var locked_in_version></em>)
(<em>&dtml-locked_in_version;</em>)
</dtml-if>
</dtml-if>
</TD>
......@@ -67,7 +66,7 @@
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="2">
<TR>
<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>
<dtml-unless dontAllowCopyAndPaste>
<dtml-if cb_dataValid>
......@@ -91,12 +90,11 @@ There are currently no items in <EM><dtml-var title_or_id></EM>
</TR>
<TR>
<TD VALIGN="MIDDLE">
<FORM ACTION="<dtml-var URL1>/" METHOD="GET">
<SELECT NAME=":method" ONCHANGE="location.href='<dtml-var URL1
>/'+this.options[this.selectedIndex].value">
<FORM ACTION="&dtml-URL1;/" METHOD="GET">
<SELECT NAME=":method" ONCHANGE="location.href='&dtml-URL1;/'+this.options[this.selectedIndex].value">
<OPTION value="manage_workspace" DISABLED>Available Objects
<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>
</SELECT>
<INPUT TYPE="SUBMIT" VALUE=" Add ">
......@@ -105,10 +103,10 @@ There are currently no items in <EM><dtml-var title_or_id></EM>
</TR>
</TABLE>
<dtml-else>
<FORM ACTION="<dtml-var URL1>/" METHOD="GET">
<FORM ACTION="&dtml-URL1;/" METHOD="GET">
To add a new item click &quot;Add&quot;.
<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 ">
</dtml-in>
</FORM>
......
......@@ -17,15 +17,15 @@
<TR>
<TD ALIGN="LEFT" VALIGN="TOP">
<A HREF="<dtml-var id>">
<dtml-var id> (<dtml-var xml_namespace>)
<A HREF="&dtml-id;">
&dtml-id; (<dtml-var xml_namespace>)
</A>
<dtml-if locked_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">
<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">
</dtml-if>
</dtml-if>
......
......@@ -15,27 +15,27 @@
<dtml-var "HelpSys.HelpButton('ObjectManager_Rename.stx','OFSP')">
<P>
<FORM ACTION="<dtml-var URL1>" METHOD="POST">
<FORM ACTION="&dtml-URL1;" METHOD="POST">
<TABLE CELLSPACING="0">
<dtml-in expr="manage_CopyContainerAllItems(REQUEST)">
<TR>
<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>
<dtml-if cb_isMoveable>
<TD ALIGN="LEFT" VALIGN="TOP">
<dtml-var id>
&dtml-id;
</TD>
<TD ALIGN="LEFT" VALIGN="TOP">
<STRONG>to:</STRONG>
</TD>
<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;">
</TD>
<dtml-else>
<TD ALIGN="LEFT" VALIGN="TOP" COLSPAN="3">
<dtml-var id> may not be renamed.
&dtml-id; may not be renamed.
</TD>
</dtml-if>
</TR>
......
......@@ -144,6 +144,12 @@ class Request:
For example if URL='http://localhost/foo/bar', then
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
application object. 'BASE1' is the URL of the Zope application
object. 'BASE2' is the URL of the Zope application object with
......@@ -154,6 +160,13 @@ class Request:
BASE0='http://localhost', BASE1='http://localhost/Zope.cgi',
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:
"""
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">
<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">
<dtml-var manage_tabs>
<dtml-tree header=info>
<IMG SRC="<dtml-var SCRIPT_NAME>/misc_/ZGadflyDA/<dtml-var icon>"
ALT="<dtml-var Type>" BORDER="0">
<dtml-var Name><dtml-var Description>
<IMG SRC="&dtml-BASEPATH1;/misc_/ZGadflyDA/&dtml-icon;"
ALT="&dtml-Type;" BORDER="0">
&dtml-Name;&dtml-Description;
</dtml-tree>
</body>
......
......@@ -82,7 +82,7 @@
# 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 urllib import quote
......@@ -239,15 +239,15 @@ class BaseRequest:
if response is None: response=self.response
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
if path[:1]=='/': path=path[1:]
if path[-1:]=='/': path=path[:-1]
clean=[]
for item in split(path, '/'):
# Make sure that REQUEST cannot be traversed.
if item == 'REQUEST':
return response.notFoundError(path)
if not item or item=='.':
continue
elif item == '..':
......
......@@ -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 BaseRequest import BaseRequest
from HTTPResponse import HTTPResponse
......@@ -741,8 +741,8 @@ class HTTPRequest(BaseRequest):
def __getitem__(self,key,
default=_marker, # Any special internal marker will do
URLmatch=regex.compile('URL[0-9]+$').match,
BASEmatch=regex.compile('BASE[0-9]+$').match,
URLmatch=re.compile('URL(PATH)?([0-9]+)$').match,
BASEmatch=re.compile('BASE(PATH)?([0-9]+)$').match,
):
"""Get a variable value
......@@ -757,13 +757,19 @@ class HTTPRequest(BaseRequest):
if key=='REQUEST': return self
return other[key]
if key[:1]=='U' and URLmatch(key) >= 0:
path = self._script + self._steps
n = len(path) - atoi(key[3:])
if n < 0:
raise KeyError, key
URL=join([other['SERVER_URL']] + path[:n], '/')
other[key]=URL
if key[:1]=='U':
match = URLmatch(key)
if match is not None:
pathonly, n = match.groups()
path = self._script + self._steps
n = len(path) - int(n)
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,)
return URL
......@@ -776,9 +782,11 @@ class HTTPRequest(BaseRequest):
if key=='REQUEST': return self
if key[:1]=='B':
if BASEmatch(key) >= 0:
match = BASEmatch(key)
if match is not None:
pathonly, n = match.groups()
path = self._steps
n = atoi(key[4:])
n = int(n)
if n:
n = n - 1
if len(path) < n:
......@@ -787,9 +795,13 @@ class HTTPRequest(BaseRequest):
v = self._script + path[:n]
else:
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,)
return v
return URL
if key=='BODY' and self._file is not None:
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