[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/OFS/Content/Folder/Views/Browser - contents.pt:1.6

Stephan Richter srichter@cbu.edu
Sat, 15 Jun 2002 05:13:05 -0400


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

Modified Files:
	contents.pt 
Log Message:
I hooked up Sidei's stylesheets and icon. Cleaned up th eHTML and CSS a bit
too.

There was also a buglet in the TAL interpreter, where the message id was
sometimes None. This was due to a wrong usage of i18n:attributes, where
someone did:

<input name="Delete"
       i18n:attributes="name string:delete_button">

whereby the right form is:

<input name="Delete"
       tal:attributes="name string:delete_button"
       i18n:attributes="name">

After I removed the wrong syntax no None was sent to translate anymore, but
just to make sure I left the code inside.

I think that an exception should be raised, if i18n:attributes is used
incorrectly like this, but that is really Fred and Barry's department.


=== Zope3/lib/python/Zope/App/OFS/Content/Folder/Views/Browser/contents.pt 1.5 => 1.6 ===
 <head>
-<style metal:fill-slot="headers" type="text/css">
-<!--
+  <style metal:fill-slot="headers" type="text/css">
+    <!--
 
 .ContentIcon {
     width: 20px;
@@ -11,80 +11,75 @@
     text-align: left;
 }
 
--->
-</style>
+    -->
+  </style>
 </head>
+
 <body>
 <div metal:fill-slot="body">
 
 <div>Folder Contents <a href="@@addForm.html"> Add... </a> </div>
 
+  <form name="folderContentsForm" method="get" action="@@index.html" 
+        tal:define="folder_contents view/listContentInfo">
 
-  <form name="folderContentsForm"
-          method="get"
-          action="@@index.html" 
-          tal:define="folder_contents view/listContentInfo">
-
-     <metal:block tal:condition="folder_contents">
-     
-            <table id="sortable"
-                   class="listing"
-                   summary="Content listing"
-                   cellpadding="0" cellspacing="0"
-                   metal:define-macro="folder_listing">
-    
-                <thead> 
-                    <tr>
-                        <th>&nbsp;</th>
-                        <th>&nbsp;</th>
-			<th>Title <img src="arrowUp.gif" alt="Sort" height="6" width="9" /></th>
-                    </tr>
-                </thead>
-    
-                <tbody>
-                <metal:block tal:repeat="item folder_contents"> 
-                    <tr tal:define="oddrow repeat/item/odd;
-		                    url item/url"
-                      tal:attributes="class python:oddrow and 'even' or 'odd'" > 
+    <metal:block tal:condition="folder_contents">
+
+      <table id="sortable" class="listing" summary="Content listing"
+             cellpadding="0" cellspacing="0"
+             metal:define-macro="folder_listing">
     
-                        <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 url"
-			                 tal:content="structure item/icon|default">
-                            </a> 
-                        </td>
-                        <td> 
-                            <a href="#" tal:attributes="href url">
-			     <span tal:replace="item/id">Id</span>
-			     <span tal:condition="item/title"
-			           tal:replace="string: (${item/title})">(Title)</span>
-                            </a> 
-                        </td>
-
-                    </tr>
-                </metal:block>
-                </tbody> 
-            </table>
-	    <br />
-
-	    <input type="submit" name="removeObjects:method" value="Delete"
-	           i18nXXX:attributes="value string:menu_delete_button"> 
-
-	    </metal:block>
-
-</form>
-
-<p><a href="./++etc++Services/"
-      tal:condition="context/hasServiceManager">Services</a>
-<a href="@@addServiceManager.html" 
-   tal:condition="not: context/hasServiceManager">Allow Services</a>
-</p>
+        <thead> 
+          <tr>
+            <th>&nbsp;</th>
+            <th>&nbsp;</th>
+            <th>Title 
+              <img src="/@@/arrowUp.gif" alt="Sort" height="6" width="9" />
+            </th>
+          </tr>
+        </thead>
+        <tbody>
+        <metal:block tal:repeat="item folder_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 url"
+                 tal:content="structure item/icon|default">
+              </a> 
+            </td>
+            <td> 
+              <a href="#" tal:attributes="href url">
+                <span tal:replace="item/id">Id</span>
+                <span tal:condition="item/title"
+                      tal:replace="string: (${item/title})">(Title)</span>
+              </a> 
+            </td>          
+          </tr>
+        </metal:block>
+        </tbody> 
+      </table>
+      <br />
+
+      <input type="submit" name="removeObjects:method" value="Delete"
+             tal:attributes="value string:menu_delete_button"
+             i18n:attributes="value" /> 
+
+    </metal:block>
+  </form>
+
+  <p><a href="./++etc++Services/"
+        tal:condition="context/hasServiceManager">Services</a>
+    <a href="@@addServiceManager.html" 
+       tal:condition="not: context/hasServiceManager">Allow Services</a>
+  </p>
 </div>
+
 </body>
 </html>