Commit 2e79f6bb authored by Shane Hathaway's avatar Shane Hathaway

Added ZMI preferences, including text area sizing, style sheet usage, and

display of the top frame.
parent 69b079c9
......@@ -11,22 +11,31 @@ function update_menu() {
//-->
</script>
</head>
<dtml-let ag="REQUEST.get('HTTP_USER_AGENT', '')">
<dtml-if "ag[:9] == 'Mozilla/4' and _.string.find(ag, 'MSIE') < 0">
<frameset rows="40, *">
<dtml-else>
<frameset rows="34, *">
</dtml-if>
</dtml-let>
<dtml-let tf="REQUEST.get('zmi_top_frame', '1')"
ag="REQUEST.get('HTTP_USER_AGENT', '')">
<dtml-if tf>
<dtml-if "ag[:9] == 'Mozilla/4' and _.string.find(ag, 'MSIE') < 0">
<frameset rows="40, *">
<dtml-else>
<frameset rows="34, *">
</dtml-if>
<frame src="<dtml-var URL1>/manage_top_frame" name="manage_top_frame"
marginwidth="0" marginheight="0" scrolling="no"/>
</dtml-if>
<frameset cols="175,*">
<frame src="<dtml-var URL1>/manage_menu" name="manage_menu"
marginwidth="2" marginheight="2" scrolling="auto"/>
<frame src="<dtml-var URL1>/manage_workspace" name="manage_main"
marginwidth="2" marginheight="2" scrolling="auto"/>
</frameset>
</frameset>
<dtml-if tf>
</frameset>
</dtml-if>
</dtml-let>
<noframes>
Management interfaces require the use of a <B>frames-capable</B> web browser.
</noframes>
......
......@@ -3,19 +3,23 @@
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<title><dtml-if title><dtml-var title></dtml-if></title>
<dtml-let ag="REQUEST.get('HTTP_USER_AGENT', '')">
<dtml-if "ag[:9] == 'Mozilla/4' and _.string.find(ag, 'MSIE') < 0">
<style type="text/css">
<!--
<dtml-var manage_page_style.css>
<dtml-let ag="REQUEST.get('HTTP_USER_AGENT', '')"
is_nav4="ag[:9] == 'Mozilla/4' and _.string.find(ag, 'MSIE') < 0"
use_css="REQUEST.get('zmi_use_css', is_nav4 and 'inline' or '1')">
<dtml-if use_css>
<dtml-if expr="use_css=='inline'">
<style type="text/css"><!--
-->
</style>
<dtml-else>
<link rel="stylesheet" type="text/css" href="<dtml-var
BASEPATH1>/manage_page_style.css">
<dtml-var manage_page_style.css>
--></style>
<dtml-else>
<link rel="stylesheet" type="text/css"
href="<dtml-var BASEPATH1>/manage_page_style.css">
</dtml-if>
</dtml-if>
</dtml-let>
</head>
<body bgcolor="#ffffff" link="#000099" alink="#000099" vlink="#000099">
......@@ -22,6 +22,8 @@ alt="" />
Logged in as <strong><dtml-var
AUTHENTICATED_USER></strong>
<dtml-if "AUTHENTICATED_USER.getUserName() != 'Anonymous User'">
| <a href="<dtml-var BASEPATH1>/manage_zmi_prefs"
target="manage_main">Preferences</a>
| <a href="<dtml-var BASEPATH1>/manage_logout" target="_top">Logout</a>
</dtml-if>
&nbsp;&nbsp;
......
<dtml-var manage_page_header>
<dtml-var "manage_form_title(this(), _,
form_title='Preferences',
help_product='OFSP',
help_topic='Preferences.stx'
)">
<dtml-if set_zmi_cookies>
<dtml-let expires="(_.DateTime('GMT') + 365).rfc822()">
<dtml-call expr="RESPONSE.setCookie('dtpref_cols', REQUEST['dtpref_cols'],
path='/', expires=expires)">
<dtml-call expr="RESPONSE.setCookie('dtpref_rows', REQUEST['dtpref_rows'],
path='/', expires=expires)">
<dtml-call expr="RESPONSE.setCookie('zmi_use_css', REQUEST['zmi_use_css'],
path='/', expires=expires)">
<dtml-call expr="RESPONSE.setCookie('zmi_top_frame',
REQUEST['zmi_top_frame'],
path='/', expires=expires)">
</dtml-let>
</dtml-if>
<p class="form-help">
This form lets you tweak the Zope management interface to fit
your browser. Note that you need to press the browser reload
button in order for some changes to take effect.
</p>
<form action="&dtml-URL;" method="POST">
<input type="hidden" name="set_zmi_cookies" value="1" />
<table cellspacing="0" cellpadding="2" border="0">
<tr>
<td align="left" valign="top">
<div class="form-label">
Top frame
</div>
</td>
<td align="left" valign="top">
<dtml-let tf="REQUEST.get('zmi_top_frame', '1')">
<input type="radio" name="zmi_top_frame" value="1"
<dtml-if tf>checked="checked"</dtml-if>
/> On
<input type="radio" name="zmi_top_frame" value=""
<dtml-unless tf>checked="checked"</dtml-unless>
/> Off
</dtml-let>
</td>
</tr>
<tr>
<td align="left" valign="top">
<div class="form-label">
Use style sheets
</div>
</td>
<td align="left" valign="top">
<dtml-let ag="REQUEST.get('HTTP_USER_AGENT', '')"
is_nav4="ag[:9] == 'Mozilla/4' and _.string.find(ag, 'MSIE') < 0"
use_css="REQUEST.get('zmi_use_css', is_nav4 and 'inline' or '1')">
<input type="radio" name="zmi_use_css" value="1"
<dtml-if expr="use_css and use_css != 'inline'">checked="checked"</dtml-if>
/> Linked
<input type="radio" name="zmi_use_css" value="inline"
<dtml-if expr="use_css == 'inline'">checked="checked"</dtml-if>
/> Inline
<input type="radio" name="zmi_use_css" value=""
<dtml-if expr="not use_css">checked="checked"</dtml-if>
/> None
</dtml-let>
</td>
</tr>
<tr>
<td align="left" valign="top">
<div class="form-label">
Text area columns
</div>
</td>
<td align="left" valign="top">
<input type="text" name="dtpref_cols" value="<dtml-var
expr="REQUEST.get('dtpref_cols', '50')" html_quote>" size="6" />
</td>
</tr>
<tr>
<td align="left" valign="top">
<div class="form-label">
Text area rows
</div>
</td>
<td align="left" valign="top">
<input type="text" name="dtpref_rows" value="<dtml-var
expr="REQUEST.get('dtpref_rows', '20')" html_quote>" size="6" />
</td>
</tr>
</table>
<span class="form-element">
<input type="submit" name="submit" value="Change">
</span>
<p class="form-help">
<textarea name="ignore" rows="<dtml-var
expr="REQUEST.get('dtpref_rows', '20')" html_quote>" cols="<dtml-var
expr="REQUEST.get('dtpref_cols', '50')" html_quote>"
>This is an example text area.</textarea>
</p>
</form>
<dtml-var manage_page_footer>
......@@ -64,5 +64,28 @@ td {
</tr>
</table>
<dtml-unless expr="REQUEST.get('zmi_top_frame', '1')">
<table width="100%" bgcolor="#6699cc">
<tr>
<td valign="top" align="left" colspan="2">
<div align="center">
<a href="http://www.zope.org/" target="_new"><img src="<dtml-var
BASEPATH1>/p_/zopelogo_jpg" height="32" width="90" border="0"
alt="" />
</div>
<div align="center" class="std-text">
Logged in as <strong><dtml-var
AUTHENTICATED_USER></strong>
<br />
<dtml-if "AUTHENTICATED_USER.getUserName() != 'Anonymous User'">
<a href="<dtml-var BASEPATH1>/manage_zmi_prefs"
target="manage_main">Preferences</a>
| <a href="<dtml-var BASEPATH1>/manage_logout" target="_top">Logout</a>
</dtml-if>
</div>
</td></tr></table>
</dtml-unless>
<dtml-var manage_page_footer>
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