[Zope] Re: optimized HTML for the manage interface

Robb Shecter shecter@darmstadt.gmd.de
Thu, 17 Feb 2000 18:05:19 +0100


This is a multi-part message in MIME format.
--------------2A7DD0FCEF615E45A4E95420
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi,

I saw that the html in my first post got mangled, so I am attching the
lib/python/OFS/main.dtml file as an attachment...

- Robb

--------------2A7DD0FCEF615E45A4E95420
Content-Type: text/html; charset=us-ascii;
 name="main.dtml"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="main.dtml"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML lang="en">
<HEAD>
<TITLE>Contents</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555">
<dtml-var manage_tabs>
<P>


<dtml-comment>
    Feb. 13, 2000 Robb	Optimized this page by removing most tables, and adding height
                        and width attributes to an IMG tag.
</dtml-comment>


<FORM ACTION="<dtml-var URL1>" METHOD="POST">
<dtml-if objectItems>

<dtml-in objectItems sort>

  &nbsp;

  <INPUT TYPE="CHECKBOX" NAME="ids:list" VALUE="<dtml-var sequence-key html_quote>">

  &nbsp;&nbsp;

  <dtml-if icon>
  <A HREF="<dtml-var sequence-key url_quote>/manage_workspace">
  <IMG SRC="<dtml-var SCRIPT_NAME>/<dtml-var icon>" height="16" width="16"
   ALT="[<dtml-var meta_type>]" BORDER="0"></A>
  </dtml-if icon>

  &nbsp;&nbsp; 

  <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>
  <dtml-if locked_in_version>
    <dtml-if modified_in_version>
      <IMG SRC="<dtml-var SCRIPT_NAME>/p_/locked"
       ALT="This item has been modified in this version">
    <dtml-else>
      <IMG SRC="<dtml-var SCRIPT_NAME>/p_/lockedo"
       ALT="This item has been modified in another version">
       (<em><dtml-var locked_in_version></em>)
    </dtml-if>
  </dtml-if>

  <br>

</dtml-in>


  &nbsp;<br>&nbsp;&nbsp;

  <dtml-unless dontAllowCopyAndPaste>
  <INPUT TYPE="SUBMIT" NAME="manage_renameForm:method" VALUE="Rename">
  <INPUT TYPE="SUBMIT" NAME="manage_cutObjects:method" VALUE="Cut"> 
  <INPUT TYPE="SUBMIT" NAME="manage_copyObjects:method" VALUE="Copy">
  <dtml-if cb_dataValid>
  <INPUT TYPE="SUBMIT" NAME="manage_pasteObjects:method" VALUE="Paste">
  </dtml-if>
  </dtml-unless>
  <dtml-if "AUTHENTICATED_USER.has_permission('Delete objects', this())">
  <INPUT TYPE="SUBMIT" NAME="manage_delObjects:method" VALUE="Delete">
  </dtml-if>
  <dtml-if "AUTHENTICATED_USER.has_permission('Import/Export objects', this())">
  <INPUT TYPE="SUBMIT" NAME="manage_importExportForm:method" VALUE="Export...">
  </dtml-if>


<dtml-else>
<TABLE BORDER="0" CELLSPACING="0" CELLPADDING="2">
<TR>
<TD>
There are currently no items in <EM><dtml-var title_or_id></EM>
<P>
<dtml-unless dontAllowCopyAndPaste>
<dtml-if cb_dataValid>
<INPUT TYPE="SUBMIT" NAME="manage_pasteObjects:method" VALUE="Paste">
</dtml-if>
  </dtml-unless>
</TD>
</TABLE>
</dtml-if>
</FORM>

<dtml-if "filtered_meta_types(AUTHENTICATED_USER)">

<dtml-if "_.len(filtered_meta_types(AUTHENTICATED_USER)) > 1">

  <br>

  &nbsp;&nbsp;
  To add a new item, select an item type 
  <NOSCRIPT>and click &quot;Add&quot;</NOSCRIPT>. 

  <br>

  <FORM ACTION="<dtml-var URL1>/" METHOD="GET">
  &nbsp;&nbsp;<SELECT NAME=":method" ONCHANGE="location.href='<dtml-var URL1
  >/'+this.options[this.selectedIndex].value">
    <OPTION value="manage_workspace" DISABLED>Available Objects
  <dtml-in "filtered_meta_types(AUTHENTICATED_USER)" mapping sort=name>
    <OPTION value="<dtml-var action fmt="url-quote">"><dtml-var name>
  </dtml-in>
  </SELECT>
  <INPUT TYPE="SUBMIT" VALUE=" Add ">
  </FORM>

<dtml-else>
  <FORM ACTION="<dtml-var URL1>/" METHOD="GET">
    To add a new item click &quot;Add&quot;.
    <dtml-in "filtered_meta_types(AUTHENTICATED_USER)" mapping sort=name>
      <input type=hidden name=":method" value="<dtml-var action fmt="url-quote">">
      <INPUT TYPE="SUBMIT" VALUE=" Add ">
    </dtml-in>
  </FORM>
</dtml-if>

</dtml-if>

<dtml-if update_menu>
<SCRIPT LANGUAGE="javascript">
<!--
window.parent.update_menu();
//-->
</SCRIPT>
</dtml-if>

</BODY>
</HTML>

--------------2A7DD0FCEF615E45A4E95420--