[Zope3-checkins] CVS: Zope3/src/zope/app/site/browser - tool.pt:1.2

Stephan Richter srichter at cosmos.phy.tufts.edu
Sun Mar 21 19:52:26 EST 2004


Update of /cvs-repository/Zope3/src/zope/app/site/browser
In directory cvs.zope.org:/tmp/cvs-serv1413/src/zope/app/site/browser

Modified Files:
	tool.pt 
Log Message:


Implemented support for Add, Delete, Rename, Activate, Deactivate.




=== Zope3/src/zope/app/site/browser/tool.pt 1.1 => 1.2 ===
--- Zope3/src/zope/app/site/browser/tool.pt:1.1	Sun Mar 21 11:02:19 2004
+++ Zope3/src/zope/app/site/browser/tool.pt	Sun Mar 21 19:52:26 2004
@@ -11,22 +11,30 @@
   </p>
 
   <div tal:define="message view/update;
-                   registries view/getComponents">
+                   registries view/getComponents;
+                   rename_list view/renameList">
 
     
+    <p class="message"
+       tal:condition="message"
+       tal:content="message"
+       i18n:translate="">
+      Message
+    </p>
+
     <p tal:condition="not:registries" i18n:translate="">
       No tools are registered.
     </p>
     
-    <div tal:condition="registries">
+    <div>
       <p i18n:translate="">
          Unless a tool is disabled the tool name links to the
          active tool. ...
       </p>
     
-      <form method="POST" action=".">
+      <form method="POST">
     
-        <table width="100%">
+        <table width="100%" tal:condition="registries">
           <tr>
             <th width="5%"> </th>
             <th width="35%">Name</th>
@@ -41,9 +49,17 @@
             <td>
              <a href=""
                 tal:attributes= "href reg/url"
-                tal:content="reg/name">
+                tal:content="reg/name"
+                tal:condition="python: not reg['name'] in rename_list">
                Foobar (the tool)
              </a>
+             <input type="hidden" name="old_names:list" value=""
+                tal:attributes="value reg/name"
+                tal:condition="python:reg['name'] in rename_list" />
+             <input type="text" name ="new_names:list" value=""
+                tal:attributes="value reg/name"
+                tal:condition="python:reg['name'] in rename_list" />
+
             </td>
             <td>
              <tal:block>
@@ -70,19 +86,32 @@
           </tr>
         </table>
 
-        <input type="submit" name="Activate" value="Activate" 
-               i18n:attributes="value activate-button"/>
-        <input type="submit" name="Deactivate" value="Deactivate"
-               i18n:attributes="value deactivate-button"/>
-        &nbsp;
-        <input type="submit" name="Add" value="Add"
-               i18n:attributes="value add-button"/>
-         &nbsp;
-        <input type="submit" name="Delete" value="Delete"
-               i18n:attributes="value delete-button"/>
-        &nbsp;
-        <input type="submit" name="Refresh" value="Refresh"
-               i18n:attributes="value refresh-button"/>
+        <div tal:condition="not: rename_list">
+          <input type="submit" name="ACTIVATE" value="Activate" 
+                 i18n:attributes="value activate-button"/>
+          <input type="submit" name="DEACTIVATE" value="Deactivate"
+                 i18n:attributes="value deactivate-button"/>
+          &nbsp;
+          <input type="submit" name="ADD" value="Add"
+                 i18n:attributes="value add-button"/>
+          &nbsp;
+          <input type="submit" name="DELETE" value="Delete"
+                 i18n:attributes="value delete-button"/>
+          &nbsp;
+          <input type="submit" name="RENAME" value="Rename"
+                 i18n:attributes="value rename-button"
+                 tal:condition="view/can_rename" />
+          &nbsp;
+          <input type="submit" name="REFRESH" value="Refresh"
+                 i18n:attributes="value refresh-button"/>
+        </div>
+        <div tal:condition="rename_list">
+          <input type="submit" name="APPLY_RENAME" value="Apply"
+                 i18n:attributes="value apply-button"/>
+          &nbsp;
+          <input type="submit" name="CANCEL_RENAME" value="Cancel"
+                 i18n:attributes="value cancel-button"/>
+        </div>
 
       </form>
 




More information about the Zope3-Checkins mailing list