[Zope-Checkins] CVS: Zope/lib/python/App/dtml - manage_tabs.dtml:1.11.16.2

Chris McDonough chrism at zope.com
Sun Oct 12 19:15:22 EDT 2003


Update of /cvs-repository/Zope/lib/python/App/dtml
In directory cvs.zope.org:/tmp/cvs-serv3200

Modified Files:
      Tag: Zope-2_7-branch
	manage_tabs.dtml 
Log Message:
Fix after namespace issue fix.  Because 'action' always exists in a manage_options entry for an item, its existence in the entry is not a reliable indicator that the entry is not the "View" tab.  Since it was tested for by "has_key", the View tab always pointed back to the current page (manage_workspace).  We fix it here by using "get" instead of "has_key".


=== Zope/lib/python/App/dtml/manage_tabs.dtml 1.11.16.1 => 1.11.16.2 ===
--- Zope/lib/python/App/dtml/manage_tabs.dtml:1.11.16.1	Wed Sep  3 12:48:01 2003
+++ Zope/lib/python/App/dtml/manage_tabs.dtml	Sun Oct 12 19:15:22 2003
@@ -53,21 +53,27 @@
 </tr>
 <tr>
 <dtml-in manage_options mapping>
-<dtml-if "_['sequence-index']==a_">
+<dtml-let s_item=sequence-item s_index=sequence-index>
+<dtml-if "s_index==a_">
   <td bgcolor="#ffffff" valign="bottom" class="tab-small" 
    align="center"><font face="Verdana, Arial, Helvetica" 
-   size="1" color="#000000">&nbsp;<a <dtml-if 
-   "_['sequence-item'].has_key('action')">href="&dtml-action;"<dtml-else>href="&dtml-URL1;"</dtml-if
-   ><dtml-if "_['sequence-item'].has_key('target')"> target="&dtml-target;"</dtml-if
-   >><span style="color: #000000;"><strong><dtml-var "_['sequence-item']['label']"></strong></span></a>&nbsp;</font></td>
+   size="1" color="#000000">&nbsp;<a <dtml-if "s_item.get('action')"
+   >href="&dtml-action;"<dtml-else
+   >href="&dtml-URL1;"</dtml-if
+   ><dtml-if "s_item.get('target')"> target="&dtml-target;"</dtml-if
+   >><span style="color: #000000;"><strong><dtml-var "s_item['label']"
+   ></strong></span></a>&nbsp;</font></td>
 <dtml-else>
   <td bgcolor="#efefef" valign="bottom" class="tab-small" 
    align="center"><font face="Verdana, Arial, Helvetica" 
-   size="1" color="#000000">&nbsp;<a <dtml-if 
-   "_['sequence-item'].has_key('action')">href="&dtml-action;"<dtml-else>href="&dtml-URL1;"</dtml-if
-   ><dtml-if "_['sequence-item'].has_key('target')"> target="&dtml-target;"</dtml-if
-   >><span style="color: #000000;"><strong>&dtml-label;</strong></span></a>&nbsp;</font></td>
+   size="1" color="#000000">&nbsp;<a <dtml-if "s_item.get('action')"
+   >href="&dtml-action;"<dtml-else
+   >href="&dtml-URL1;"</dtml-if
+   ><dtml-if "s_item.get('target')"> target="&dtml-target;"</dtml-if
+   >><span style="color: #000000;"><strong><dtml-var "s_item['label']"
+   ></strong></span></a>&nbsp;</font></td>
 </dtml-if>
+</dtml-let>
 </dtml-in>
 </tr>
 <tr>




More information about the Zope-Checkins mailing list