Commit 81ecb603 authored by 's avatar

Fixes to PropMgr

parent 98de4e56
...@@ -84,7 +84,7 @@ ...@@ -84,7 +84,7 @@
############################################################################## ##############################################################################
"""Property management""" """Property management"""
__version__='$Revision: 1.1 $'[11:-2] __version__='$Revision: 1.2 $'[11:-2]
...@@ -100,10 +100,11 @@ __version__='$Revision: 1.1 $'[11:-2] ...@@ -100,10 +100,11 @@ __version__='$Revision: 1.1 $'[11:-2]
## import Globals ## import Globals
from ZPublisher.Converters import type_converters from ZPublisher.Converters import type_converters
from Globals import HTMLFile, MessageDialog
from string import find,join,lower,split from string import find,join,lower,split
from DocumentTemplate import html_quote from DocumentTemplate import html_quote
from DateTime import DateTime from DateTime import DateTime
from Globals import HTMLFile
def aq_base(ob): def aq_base(ob):
......
<HTML> <html>
<HEAD> <head>
<TITLE>Properties</TITLE> <title>Properties</title>
</HEAD> </head>
<BODY BGCOLOR="#FFFFFF" LINK="#000099" VLINK="#555555"> <body bgcolor="#FFFFFF" link="#000099" vlink="#555555">
<!--#var manage_tabs--> <!--#var manage_tabs-->
<!--#if Principia-Session--> <!--#if Principia-Session-->
<EM>You are currently working in session <!--#var Principia-Session--></EM> <p>
<P> <em>You are currently working in session <!--#var Principia-Session--></em>
</p>
<!--#/if Principia-Session--> <!--#/if Principia-Session-->
<FORM ACTION="<!--#var URL1-->/manage_editProperties"> <form action="." method="POST">
<!--#if propertyMap--> <!--#if propertyMap-->
The following properties are defined for this item. <p>
To change a property's value, edit the value and click "Change". The following properties are defined for this item. To <a href="#addpropform">
<P> add a new property</a>, enter a name, type and value for the new property
<TABLE CELLPADDING="4"> and click the &quot;Add&quot; button. To change property values, edit the
<TR> values and click "Save Changes".
<TD ALIGN="LEFT" VALIGN="TOP"> </p>
<STRONG>id</STRONG> <table border="0" cellspacing="0" cellpadding="2">
</TD> <!--#in propertyMap mapping-->
<TD ALIGN="LEFT" VALIGN="TOP"> <tr>
<!--#var id--> <td align="left" valign="top" width="16">
</TD> <!--#if "'d' in _['sequence-item'].get('mode', 'awd')"-->
</TR> <input type="checkbox" name="ids:list" value="<!--#var id-->">
<!--#if propertyInputs--> <!--#else-->
<!--#in propertyInputs mapping--> <!--#endif-->
<TR> </td>
<TD ALIGN="LEFT" VALIGN="TOP"> <td align="left" valign="top">
<STRONG><!--#var id--></STRONG> <strong><!--#var id--></strong>
</TD> </td>
<TD ALIGN="LEFT" VALIGN="TOP"> <td align="left" valign="top">
<!--#var input--> <!--#if "'w' in _['sequence-item'].get('mode', 'awd')"-->
</TD> <!--#if "type in ('string', 'int', 'long', 'float', 'date')"-->
</TR> <input type="text" name="<!--#var id-->:<!--#var type-->" size="35"
<!--#/in propertyInputs--> value="<!--#var "_[id]"-->">
<!--#/if propertyInputs--> <!--#elif "type=='tokens'"-->
<TR> <input type="text" name="<!--#var id-->:tokens" size="35"
<TD ALIGN="LEFT" VALIGN="TOP"> value="<!--#in "_[id]"--><!--#var sequence-item--> <!--#endin-->">
</TD> <!--#elif "type=='text'"-->
<TD ALIGN="LEFT" VALIGN="TOP"> <textarea name="<!--#var id-->:text" rows="6" cols="35"><!--#var
<INPUT TYPE="SUBMIT" VALUE="Change"> "_[id]"--></textarea>
</TD> <!--#elif "type=='lines'"-->
</TR> <textarea name="<!--#var id-->:lines" rows="6" cols="35"><!--#in
</TABLE> "_[id]"--><!--#var sequence-item-->
</FORM> <!--#endin--></textarea>
<!--#else propertyMap--> <!--#else-->
<EM>No properties have been defined for <em>Unknown property type</em>
<STRONG><!--#var title_or_id--></STRONG></EM> <!--#endif-->
<!--#/if propertyMap--> <!--#else-->
<table border="1">
<tr><td><!--#var "_[id]"--></td></tr>
</table>
<!--#endif-->
</td>
</tr>
<!--#endin-->
<tr>
<td align="left" valign="top" width="16">
</td>
<td align="left" valign="top" width="16">
</td>
<td align="left" valign="top">
<input type="submit" name="manage_editProperties:method"
value="Save Changes">
<input type="submit" name="manage_delProperties:method" value="Delete">
</td>
</tr>
</table>
<P> <!--#else-->
<HR> <p>
<FORM ACTION="<!--#var URL1-->/manage_addProperty" METHOD="POST"> There are currently no properties defined for this item.
To add a property, enter the id, type, and initial value of the new To add a property, click the &quot;Add...&quot; button.
property below and click &quot;Add&quot;. </p>
<BR>
<TABLE> <!--#endif-->
<TR> </form>
<TD ALIGN="LEFT" VALIGN="TOP">
<STRONG>Id</STRONG> <hr>
</TD> <a name="addpropform">
<TD ALIGN="LEFT" VALIGN="TOP"> <form action="<!--#var URL1-->/manage_addProperty" method="POST">
<INPUT TYPE="TEXT" NAME="id" SIZE="16"> <p>
</TD> To add a new property, enter a name, type and value for the new
</TR> property and click the &quot;Add&quot;
<TR> button.
<TD ALIGN="LEFT" VALIGN="TOP"> </p>
<STRONG>Type</STRONG> <table>
</TD> <tr>
<TD ALIGN="LEFT" VALIGN="TOP"> <td align="left" valign="top">
<SELECT NAME="type"> <strong>Id</strong>
</td>
<td align="left" valign="top">
<input type="text" name="id" size="20">
</td>
</tr>
<tr>
<td align="left" valign="top">
<strong>Type</strong>
</td>
<td align="left" valign="top">
<select name="type">
<!--#in propertyTypes mapping--> <!--#in propertyTypes mapping-->
<OPTION <!--#var selected-->><!--#var id--> <option <!--#var selected-->><!--#var id-->
<!--#/in propertyTypes--> <!--#/in propertyTypes-->
</SELECT> </select>
</TD> </td>
</TR> </tr>
<TR> <tr>
<TD ALIGN="LEFT" VALIGN="TOP"> <td align="left" valign="top">
<STRONG>Value</STRONG> <strong>Value</strong>
</TD> </td>
<TD ALIGN="LEFT" VALIGN="TOP"> <td align="left" valign="top">
<INPUT TYPE="TEXT" NAME="value" SIZE="40"> <input type="text" name="value" size="20">
</TD> </td>
</TR> </tr>
<TR> <tr>
<TD ALIGN="LEFT" VALIGN="TOP"></TD> <td align="left" valign="top">
<TD ALIGN="LEFT" VALIGN="TOP"> </td>
<INPUT TYPE="SUBMIT" VALUE=" Add "> <td align="left" valign="top">
</TD> <input type="submit" value=" Add ">
</TR> </td>
</TABLE> </tr>
</FORM> </table>
</form>
<br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br>
<br><br><br><br><br><br><br><br>
<!--#if propertyMap_d--> </body>
<P> </html>
<HR>
<FORM ACTION="<!--#var URL1-->/manage_delProperties" METHOD="POST">
To delete properties, select one or more property ids
from the list below and click &quot;Delete&quot;.
<BR>
<TABLE>
<TR>
<TD ALIGN="LEFT" VALIGN="TOP">
<SELECT NAME="ids:list" SIZE="5" MULTIPLE>
<!--#in propertyMap_d mapping-->
<OPTION VALUE="<!--#var id-->"><!--#var id-->
<!--#/in propertyMap_d-->
</SELECT>
<BR>
<INPUT TYPE="SUBMIT" VALUE="Delete">
</TD>
</TR>
</TABLE>
</FORM>
<!--#/if propertyMap_d-->
</BODY>
</HTML>
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