[Zope-Checkins] CVS: Zope/lib/python/OFS/dtml - addOrderedFolder.dtml:1.1.2.1 main.dtml:1.18.10.2
Yvo Schubbe
schubbe@web.de
Fri, 25 Apr 2003 09:07:53 -0400
Update of /cvs-repository/Zope/lib/python/OFS/dtml
In directory cvs.zope.org:/tmp/cvs-serv1454/OFS/dtml
Modified Files:
Tag: yuppie-ordersupport-branch
main.dtml
Added Files:
Tag: yuppie-ordersupport-branch
addOrderedFolder.dtml
Log Message:
initial checkin of OrderSupport and OrderedFolder
=== Added File Zope/lib/python/OFS/dtml/addOrderedFolder.dtml ===
<dtml-var manage_page_header>
<dtml-var "manage_form_title(this(), _,
form_title='Add Folder (Ordered)',
help_product='OFSP',
help_topic='Folder_Add.stx'
)">
<p class="form-help">
A ordered Folder contains other objects. Use Folders to organize your
web objects in to logical groups. The <em>create public interface</em>
option creates an index document inside the Folder to give the
Folder a default HTML representation. The <em>create user folder</em>
option creates a User Folder inside the Folder to hold authorization
information for the Folder.
</p>
<form action="manage_addOrderedFolder" method="post">
<table cellspacing="0" cellpadding="2" border="0">
<tr>
<td align="left" valign="top">
<div class="form-label">
Id
</div>
</td>
<td align="left" valign="top">
<input type="text" name="id" size="40" />
</td>
</tr>
<tr>
<td align="left" valign="top">
<div class="form-optional">
Title
</div>
</td>
<td align="left" valign="top">
<input type="text" name="title" size="40" />
</td>
</tr>
<dtml-if
"_.SecurityCheckPermission('Add Documents, Images, and Files',this())">
<tr>
<td align="left" valign="top">
</td>
<td align="left" valign="top">
<div class="form-text">
<input type="checkbox" name="createPublic:int" value="1"
id="cbCreatePublic">
<label for="cbCreatePublic">Create public interface</label>
</div>
</td>
</tr>
</dtml-if>
<dtml-if
"_.SecurityCheckPermission('Add User Folders',this())">
<tr>
<td align="left" valign="top">
</td>
<td align="left" valign="top">
<div class="form-text">
<input type="checkbox" name="createUserF:int" value="1"
id="cbCreateUserF">
<label for="cbCreateUserF">Create user folder</label>
</div>
</td>
</tr>
</dtml-if>
<tr>
<td align="left" valign="top">
</td>
<td align="left" valign="top">
<div class="form-element">
<input class="form-element" type="submit" name="submit"
value="Add" />
</div>
</td>
</tr>
</table>
</form>
<dtml-var manage_page_footer>
=== Zope/lib/python/OFS/dtml/main.dtml 1.18.10.1 => 1.18.10.2 ===
--- Zope/lib/python/OFS/dtml/main.dtml:1.18.10.1 Fri Apr 25 05:33:15 2003
+++ Zope/lib/python/OFS/dtml/main.dtml Fri Apr 25 09:07:22 2003
@@ -26,9 +26,6 @@
//-->
</script>
-<dtml-unless skey><dtml-call expr="REQUEST.set('skey', 'id')"></dtml-unless>
-<dtml-unless rkey><dtml-call expr="REQUEST.set('rkey', '')"></dtml-unless>
-
<!-- Add object widget -->
<br />
<dtml-if filtered_meta_types>
@@ -62,6 +59,17 @@
<form action="&dtml-URL1;/" name="objectItems" method="post">
<dtml-if objectItems>
+ <dtml-let hasOrderSupport="_.hasattr(this().aq_self, 'has_order_support')">
+ <dtml-unless skey>
+ <dtml-if hasOrderSupport>
+ <dtml-call expr="REQUEST.set('skey', getDefaultSorting()[0])">
+ <dtml-call expr="REQUEST.set('rkey', getDefaultSorting()[1])">
+ <dtml-else>
+ <dtml-call expr="REQUEST.set('skey', 'id')">
+ </dtml-if>
+ </dtml-unless>
+ <dtml-unless rkey><dtml-call expr="REQUEST.set('rkey', '')"></dtml-unless>
+
<table width="100%" cellspacing="0" cellpadding="2" border="0">
<tr class="list-header">
<td width="5%" align="right" colspan="2"><div
@@ -88,7 +96,7 @@
"skey == 'get_size' or rkey == 'get_size'"
><strong>Size</strong><dtml-else>Size</dtml-if></a></div>
</td>
- <td width="29%" align="left"><div class="list-item"><a
+ <td width="19%" align="left"><div class="list-item"><a
href="./manage_main?skey=bobobase_modification_time<dtml-if
"skey == 'bobobase_modification_time' and not rkey"
>&rkey=bobobase_modification_time</dtml-if>"
@@ -97,8 +105,18 @@
"skey == 'bobobase_modification_time' or rkey == 'bobobase_modification_time'"
><strong>Last Modified</strong><dtml-else>Last Modified</dtml-if></a></div>
</td>
+ <dtml-if hasOrderSupport>
+ <td width="10%" align="left"><div class="list-item"><a
+ href="./manage_main?skey=position"
+ onMouseOver="window.status='Sort objects by position'; return true"
+ onMouseOut="window.status=''; return true"><dtml-if
+ "skey == 'position'"
+ ><strong>Position</strong><dtml-else>Position</dtml-if></a></div>
+ </td>
+ </dtml-if>
</tr>
-<dtml-in objectItems sort_expr="skey" reverse_expr="rkey">
+
+<dtml-in objectItems sort_expr="skey+'/cmp/asc'" reverse_expr="rkey">
<dtml-if sequence-odd>
<tr class="row-normal">
<dtml-else>
@@ -182,6 +200,18 @@
</div>
</td>
</dtml-with>
+
+ <dtml-if hasOrderSupport>
+ <td>
+ <div class="list-item">
+ <dtml-if "skey == 'position'">
+ <dtml-var sequence-number>
+ <dtml-else>
+ ...
+ </dtml-if>
+ </div>
+ </td>
+ </dtml-if>
</tr>
</dtml-in>
</table>
@@ -222,8 +252,46 @@
</div>
</td>
</tr>
+<dtml-if "_.len(objectItems)>1">
+ <dtml-if "hasOrderSupport and
+ _.SecurityCheckPermission( 'Copy or Move', this() )">
+<tr>
+ <td align="left" valign="top" width="16"></td>
+ <td align="left" valign="top">
+ <div class="form-element">
+ <dtml-if expr="skey == 'position'">
+ <input class="form-element" type="submit"
+ name="manage_move_objects_up:method" value="Up" />
+ /
+ <input class="form-element" type="submit"
+ name="manage_move_objects_down:method" value="Down" />
+ by
+ <select name="delta:int">
+ <dtml-in "_.range(1,_.min(5,_.len(objectIds())))">
+ <option><dtml-var sequence-item></option>
+ </dtml-in>
+ <dtml-in "_.range(5,_.len(objectIds()),5)">
+ <option><dtml-var sequence-item></option>
+ </dtml-in>
+ </select>
+ <input class="form-element" type="submit"
+ name="manage_move_objects_to_top:method" value="Top" />
+ <input class="form-element" type="submit"
+ name="manage_move_objects_to_bottom:method" value="Bottom" />
+ </dtml-if>
+ <input type="hidden" name="key" value="<dtml-var skey>">
+ <input type="hidden" name="reverse" value="<dtml-var rkey>">
+ <input class="form-element" type="submit"
+ name="manage_apply_sorting:method"
+ value="Apply Current Sorting" />
+ </div>
+ </td>
+</tr>
+ </dtml-if>
+</dtml-if>
</table>
+ </dtml-let>
<dtml-else>
<table cellspacing="0" cellpadding="2" border="0">
<tr>
@@ -259,16 +327,3 @@
</dtml-if>
<dtml-var manage_page_footer>
-
-
-
-
-
-
-
-
-
-
-
-
-