[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/OFS/Container/Views/Browser - main.pt:1.11

Jim Fulton jim@zope.com
Fri, 4 Oct 2002 15:58:30 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/App/OFS/Container/Views/Browser
In directory cvs.zope.org:/tmp/cvs-serv6522/lib/python/Zope/App/OFS/Container/Views/Browser

Modified Files:
	main.pt 
Log Message:
Added additional dublin core data to listing.

Turned form into a macro that can be used from customized contents
pages, like the one used by folders.



=== Zope3/lib/python/Zope/App/OFS/Container/Views/Browser/main.pt 1.10 => 1.11 ===
--- Zope3/lib/python/Zope/App/OFS/Container/Views/Browser/main.pt:1.10	Wed Oct  2 15:00:07 2002
+++ Zope3/lib/python/Zope/App/OFS/Container/Views/Browser/main.pt	Fri Oct  4 15:58:30 2002
@@ -16,71 +16,72 @@
 <body>
 <div metal:fill-slot="body">
 
-<form action="." method="get">
-  <table class="ContentListing">
-  
-    <caption>Folder Contents <a href="+"> Add... </a> </caption>
-  
-    <tbody>
-  
-      <tr>
-	<td class="ContentIcon"><br /> </td>
-	<th class="ContentTitle">Title</th>
-      </tr>
-  
-      <!--
-	** listContentInfo returns a sequence of mappings, containing:
-	**   'id'    : the ID of the contained within the container
-	**   'url'   : the absolute URL of the contained object
-	**   'title' : the title of the contained object
-	**   'icon'  : the absolute URL of the icon, for the contained object
-		       (may be None)
-	-->
-      <tr tal:repeat="info view/listContentInfo">
-  
-	<td class="ContentSelect">
-	  <input type="checkbox" name="ids:list" value="id"
-		 tal:attributes="value info/id" />
-	</td>
-  
-        <td> 
-          <a href="#" 
-             tal:attributes="href 
-                             string:${info/url}/@@SelectedManagementView.html"
-             tal:content="structure info/icon|default"
-             >
-          </a> 
-        </td>
-  
-	<td class="ContentTitle">
-	  <a href="subfolder_id"
-	     tal:attributes="href 
-                             string:${info/url}/@@SelectedManagementView.html"
-	     tal:content="info/title"
-	  >Folder Title or ID here</a>
-	</td>
-  
-      </tr>
-  
-      <tr tal:condition="nothing">
-  
-	<td class="ContentIcon">
-	  <img alt="Document" src="../../ZMI/www/document_icon.gif" />
-	</td>
-  
-	<td class="ContentTitle">
-	   <a href="document_id">Document Title or ID here</a>
-	</td>
-  
-      </tr>
-    </tbody>
-  
-  </table>
-  <br />
-
-  <input type="submit" name="@@removeObjects.html:method" value="Delete"
-         i18n:attributes="value string:menu_delete_button"> 
-</form>
+<div metal:define-macro="contents">
+
+  <div>Contents <a href="+"> Add... </a> </div>
+
+  <form name="containerContentsForm" method="get" action="." 
+        tal:define="container_contents view/listContentInfo"
+        tal:condition="container_contents"
+        >
+
+      <table id="sortable" class="listing" summary="Content listing"
+             cellpadding="2" cellspacing="0" >
+    
+        <thead> 
+          <tr>
+            <th>&nbsp;</th>
+            <th>&nbsp;</th>
+            <th>Name</th>
+            <th>Title</th>
+            <th>Created</th>
+            <th>Modified</th>
+          </tr>
+        </thead>
+
+        <tbody>
+
+        <metal:block tal:repeat="item container_contents"> 
+          <tr tal:define="oddrow repeat/item/odd; url item/url"
+              tal:attributes="class python:oddrow and 'even' or 'odd'" > 
+            <td>
+              <input type="checkbox" class="noborder" name="ids:list" id="#"
+                     value="#"
+                     tal:attributes="value item/id;
+                                     id python: 'cb_'+item['id'];
+                                     checked request/ids_checked|nothing;"/>
+            </td>
+            <td> 
+              <a href="#" 
+                 tal:attributes="href 
+                                 string:${url}/@@SelectedManagementView.html"
+                 tal:content="structure item/icon|default"
+                 >
+              </a> 
+            </td>
+            <td> 
+              <a href="#" 
+                 tal:attributes="href 
+                                 string:${url}/@@SelectedManagementView.html"
+                 tal:content="item/id"
+                 >foo</a> 
+            </td>          
+            <td><span tal:content="item/title|default">&nbsp;</span></td>
+            <td><span tal:content="item/created|default">&nbsp;</span></td>
+            <td><span tal:content="item/modified|default">&nbsp;</span></td>
+          </tr>
+        </metal:block>
+        </tbody> 
+      </table>
+      <br />
+
+      <input type="submit" name="@@removeObjects.html:method" value="Delete"
+             tal:attributes="value string:menu_delete_button"
+             i18n:attributes="value" /> 
+
+  </form>
+
+</div>
 
 </div>
 </body>