[Checkins] SVN: Products.CMFDefault/trunk/Products/CMFDefault/ - main_template: Display action icons, thereby replacing the separate

Jens Vagelpohl jens at dataflake.org
Wed Sep 17 17:42:31 EDT 2008


Log message for revision 91228:
  - main_template: Display action icons, thereby replacing the separate
    CMFActionIcons product.
  

Changed:
  U   Products.CMFDefault/trunk/Products/CMFDefault/CHANGES.txt
  U   Products.CMFDefault/trunk/Products/CMFDefault/skins/zpt_generic/getMainGlobals.py
  U   Products.CMFDefault/trunk/Products/CMFDefault/skins/zpt_generic/main_template.pt

-=-
Modified: Products.CMFDefault/trunk/Products/CMFDefault/CHANGES.txt
===================================================================
--- Products.CMFDefault/trunk/Products/CMFDefault/CHANGES.txt	2008-09-17 21:41:09 UTC (rev 91227)
+++ Products.CMFDefault/trunk/Products/CMFDefault/CHANGES.txt	2008-09-17 21:42:30 UTC (rev 91228)
@@ -4,6 +4,9 @@
 2.2.0 (unreleased)
 ------------------
 
+- main_template: Display action icons, thereby replacing the separate
+  CMFActionIcons product.
+
 - Portal: Add a flag to toggle the display of action icons.
 
 - Workflow GenericSetup definition: Add icon URL expressions to the 

Modified: Products.CMFDefault/trunk/Products/CMFDefault/skins/zpt_generic/getMainGlobals.py
===================================================================
--- Products.CMFDefault/trunk/Products/CMFDefault/skins/zpt_generic/getMainGlobals.py	2008-09-17 21:41:09 UTC (rev 91227)
+++ Products.CMFDefault/trunk/Products/CMFDefault/skins/zpt_generic/getMainGlobals.py	2008-09-17 21:42:30 UTC (rev 91228)
@@ -40,6 +40,7 @@
            'membersfolder': mtool.getMembersFolder(),
            'isAnon': mtool.isAnonymousUser(),
            'wf_state': wtool.getInfoFor(context, 'review_state', ''),
+           'show_actionicons': ptool.getProperty('enable_actionicons'),
            'status_message': message}
 
 return decode(globals, context)

Modified: Products.CMFDefault/trunk/Products/CMFDefault/skins/zpt_generic/main_template.pt
===================================================================
--- Products.CMFDefault/trunk/Products/CMFDefault/skins/zpt_generic/main_template.pt	2008-09-17 21:41:09 UTC (rev 91227)
+++ Products.CMFDefault/trunk/Products/CMFDefault/skins/zpt_generic/main_template.pt	2008-09-17 21:42:30 UTC (rev 91228)
@@ -21,6 +21,7 @@
                   folder_actions actions/folder;
                   global_actions actions/global;
                   wf_state globals/wf_state;
+                  show_actionicons globals/show_actionicons;
                  "
 >
 
@@ -116,7 +117,13 @@
    <td class="ActionTitle" tal:content="uname">Guest</td>
    <td class="ActionLink" align="right">
     <tal:span tal:repeat="action user_actions"
-    ><a href="" tal:attributes="href action/url"
+    ><img src="" alt="" title=""
+            tal:define="icon_url action/icon|nothing"
+            tal:condition="python: show_actionicons and icon_url"
+            tal:attributes="src icon_url;
+                            alt action/title;
+                            title action/title"/>   
+    <a href="" tal:attributes="href action/url"
                 tal:content="action/title" i18n:translate="">Login</a
     ><tal:span tal:condition="not: repeat/action/end"> |</tal:span></tal:span>
     <tal:span tal:condition="nothing"
@@ -173,6 +180,12 @@
     <td class="ActionLink">
 
      <span tal:repeat="action object_actions">
+       <img src="" alt="" title=""
+            tal:define="icon_url action/icon|nothing"
+            tal:condition="python: show_actionicons and icon_url"
+            tal:attributes="src icon_url;
+                            alt action/title;
+                            title action/title"/>
       <a href=""
          tal:attributes="href action/url"
          tal:content="action/title"
@@ -205,6 +218,12 @@
       </span>
 
       <span tal:repeat="action workflow_actions">
+       <img src="" alt="" title=""
+            tal:define="icon_url action/icon|nothing"
+            tal:condition="python: show_actionicons and icon_url"
+            tal:attributes="src icon_url;
+                            alt action/title;
+                            title action/title"/>
        <a href="content_submit_form"
           tal:attributes="href action/url"
           tal:content="action/title"
@@ -219,6 +238,12 @@
    >
     <td class="ActionLink">
       <span tal:repeat="action folder_actions">
+       <img src="" alt="" title=""
+            tal:define="icon_url action/icon|nothing"
+            tal:condition="python: show_actionicons and icon_url"
+            tal:attributes="src icon_url;
+                            alt action/title;
+                            title action/title"/>
        <a href="../folder_contents"
           tal:attributes="href action/url"
           tal:content="action/title"
@@ -233,6 +258,12 @@
    >
     <td class="ActionLink">
      <span tal:repeat="action global_actions">
+       <img src="" alt="" title=""
+            tal:define="icon_url action/icon|nothing"
+            tal:condition="python: show_actionicons and icon_url"
+            tal:attributes="src icon_url;
+                            alt action/title;
+                            title action/title"/>
       <a href="undo_form"
          tal:attributes="href action/url"
          tal:content="action/title"



More information about the Checkins mailing list