Index: WAeUP_SRP/trunk/skins/waeup_directory/getMembersDirectoryActions.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_directory/getMembersDirectoryActions.py	(revision 1901)
+++ WAeUP_SRP/trunk/skins/waeup_directory/getMembersDirectoryActions.py	(revision 1901)
@@ -0,0 +1,70 @@
+##parameters=mode
+#$Id$
+"""
+Get the actions to provide on members directory view
+
+Return the updated actions
+"""
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+
+from Products.CMFCore.utils import getToolByName
+request = context.REQUEST
+qstring = request.get('QUERY_STRING','')
+id = ''
+for par in qstring.split('&'):
+    if par.startswith('id='):
+        id = par[3:]
+utool = getToolByName(context, 'portal_url')
+dtool = getToolByName(context, 'portal_directories')
+base_url = utool.getBaseUrl()
+renderActionIcon = context.portal_cpsportlets.renderActionIcon
+dirname  = 'members'
+dir = getattr(dtool,'members')
+
+actions_list = (('create_action',
+                 'new_entry',
+                 'Create New Member',
+                 base_url+'member_create_form?dirname=members',    
+                ),
+                ('search_action',
+                'search_entry',
+                'Search Member',
+                 base_url+'search_members_form?dirname=members',
+                ),
+                ('view_action',
+                'view_entry',
+                'View',
+                base_url+'member_view?dirname=members'+'&id='+id,
+                ),
+                ('edit_action',
+                'edit_entry',
+                'Edit',
+                base_url+'member_edit_form?dirname=members'+'&id='+id,
+                ),
+                )
+ad = {}
+for action_id,name,desc,url in actions_list:
+    ad[action_id] = {
+                     'id': name,
+                     'title': desc,
+                     'icon_tag': renderActionIcon(action_id= name,
+                                                  category='object',
+                                                  base_url=base_url,
+                                                  alt= name),
+                     'url': url,
+                     'name': desc,
+                     'category': 'object',
+                    }
+if mode in ['view', 'edit']:
+    return [ad['view_action'],
+            ad['edit_action'],
+            ad['create_action'],
+            ad['search_action']
+           ]
+elif mode in ['create']:
+    return [ad['search_action'],]
+return [ad['create_action'],]
Index: WAeUP_SRP/trunk/skins/waeup_directory/getWAeUPDirectoryActions.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_directory/getWAeUPDirectoryActions.py	(revision 1900)
+++ 	(revision )
@@ -1,80 +1,0 @@
-##parameters=actions, dirname, dir, mode, id=''
-#$Id: getDirectoryActions.py 25260 2005-07-26 00:41:23Z atchertchian $
-"""
-Get the actions to provide on a directory view
-
-Parameters are:
-- the current actions
-- the directory id
-- the directory itself
-- the mode (create, edit, view or search)
-- the entry id (eventually)
-
-Return the updated actions
-"""
-
-from Products.CMFCore.utils import getToolByName
-
-utool = getToolByName(context, 'portal_url')
-base_url = utool.getBaseUrl()
-
-create_action = {
-    'id': 'new_entry',
-    'url': base_url+'member_create_form?dirname='+dirname,
-    'name': 'cpsdir_label_create_entry',
-    'category': 'object',
-    }
-
-search_action = {
-    'id': 'search_entry',
-    'url': base_url+'search_members_form?dirname='+dirname,
-    'name': 'cpsdir_label_search_entry',
-    'category': 'object'
-    }
-
-view_action = {
-    'id': 'view_entry',
-    'url': base_url+'member_view?dirname='+dirname+'&id='+id,
-    'name': 'cpsdir_label_view_entry',
-    'category': 'object',
-    }
-
-edit_action = {
-    'id': 'edit_entry',
-    'url': base_url+'member_edit_form?dirname='+dirname+'&id='+id,
-    'name': 'cpsdir_label_edit_entry',
-    'category': 'object',
-    'available': True,
-    'visible': True,
-    'allowed': True,
-    'permissions': ('View',), 
-    }
-
-confirm_text = context.translation_service('description_confirm_delete')
-confirm_text.encode('ISO-8859-15', 'ignore')
-delete_action = {
-    'id': 'delete_entry',
-    'url': base_url+'member_delete?dirname='+dirname+'&id='+id,
-    'onclick': 'return window.confirm(\''+ confirm_text +'\')' ,
-    'name': 'cpsdir_label_delete_entry',
-    'category': 'object',
-    }
-
-
-# only actions with category 'object' have to be changed
-
-if dir.isSearchEntriesAllowed():
-    actions.update({'object': [search_action]})
-
-if dir.isCreateEntryAllowed():
-    actions['object'].append(create_action)
-
-if mode in ['view', 'edit']:
-    if dir.isViewEntryAllowed(id):
-        actions['object'].append(view_action)
-    if dir.isEditEntryAllowed(id):
-        actions['object'].append(edit_action)
-    if dir.isDeleteEntryAllowed(id):
-        actions['object'].append(delete_action)
-
-return actions
Index: WAeUP_SRP/trunk/skins/waeup_directory/member_create_form.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_directory/member_create_form.pt	(revision 1900)
+++ WAeUP_SRP/trunk/skins/waeup_directory/member_create_form.pt	(revision 1901)
@@ -5,33 +5,23 @@
   "/>
 <metal:block use-macro="here/main_template/macros/master">
-  <metal:block fill-slot="style_slot">
-    <tal:block define="global actions
-      python:context.getWAeUPDirectoryActions(actions, dirname, dir, 'create')"/>
-
-    <link rel="Stylesheet" type="text/css" href=""
-      tal:attributes="href string:${base_url}document.css" />
-  </metal:block>
-
-  
-  
   <metal:block fill-slot="main" tal:define="
-      dummy dir/checkCreateEntryAllowed;
-      validate python: request.has_key('member_create_form');
-      create_request python: validate and request or nothing;
-      res python: dir.renderCreateEntryDetailed(
-      validate=validate, request=create_request,
-      created_callback='member_created');
-      global rendered_main python: res[0];
-      rendered_ok python: res[1];
-      ds python: res[2];
-      global portal_status_message python: validate and (rendered_ok and 
-        'psm_content_changed' or 'psm_content_error') or '';">
-
+  actions python:context.getMembersDirectoryActions('create');
+  dummy dir/checkCreateEntryAllowed;
+  validate python: request.has_key('member_create_form');
+  create_request python: validate and request or nothing;
+  res python: dir.renderCreateEntryDetailed(
+  validate=validate, request=create_request,
+  created_callback='member_created');
+  global rendered_main python: res[0];
+  rendered_ok python: res[1];
+  ds python: res[2];
+  global portal_status_message python: validate and (rendered_ok and 
+  'psm_content_changed' or 'psm_content_error') or '';"
+  >
+    <span metal:use-macro="here/member_view/macros/members_actions" />
     <h3>
       Create Member     
     </h3>        
-
     <div tal:replace="structure rendered_main">Rendered main...</div>
   </metal:block>
-
 </metal:block>
Index: WAeUP_SRP/trunk/skins/waeup_directory/member_edit_form.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_directory/member_edit_form.pt	(revision 1900)
+++ WAeUP_SRP/trunk/skins/waeup_directory/member_edit_form.pt	(revision 1901)
@@ -6,32 +6,24 @@
   "/>
 <metal:block use-macro="here/main_template/macros/master">
-
-  <metal:block fill-slot="style_slot">
-    <tal:block define="global actions
-      python:context.getWAeUPDirectoryActions(actions, dirname, dir, 'edit', id)"/>
-    <link rel="Stylesheet" type="text/css" href=""
-      tal:attributes="href string:${base_url}document.css" />
-  </metal:block>
-
   <metal:block fill-slot="main" tal:define="
-      title_field dir/title_field;
-      validate python: request.has_key('member_edit_form');
-      edit_request python: validate and request or nothing;
-      res python: dir.renderEditEntryDetailed(id, request=edit_request);
-      global rendered_main python: res[0];
-      rendered_ok python: res[1];
-      ds python: res[2];
-      global title ds/?title_field|id;
-      portal_status_message request/portal_status_message|nothing;
-      global portal_status_message python: portal_status_message or (validate 
-        and (rendered_ok and 'psm_content_changed' or 'psm_content_error')) 
-        or '';">
-        
+  actions python:context.getMembersDirectoryActions('edit');
+  title_field dir/title_field;
+  validate python: request.has_key('member_edit_form');
+  edit_request python: validate and request or nothing;
+  res python: dir.renderEditEntryDetailed(id, request=edit_request);
+  global rendered_main python: res[0];
+  rendered_ok python: res[1];
+  ds python: res[2];
+  global title ds/?title_field|id;
+  portal_status_message request/portal_status_message|nothing;
+  global portal_status_message python: portal_status_message or (validate 
+  and (rendered_ok and 'psm_content_changed' or 'psm_content_error')) 
+  or '';"
+  >
+    <span metal:use-macro="here/member_view/macros/members_actions" />
     <h3>
       <span tal:content="ds/fullname" />     
     </h3>        
-        
     <div tal:replace="structure rendered_main">Rendered main...</div>
   </metal:block>
-
 </metal:block>
Index: WAeUP_SRP/trunk/skins/waeup_directory/member_view.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_directory/member_view.pt	(revision 1900)
+++ WAeUP_SRP/trunk/skins/waeup_directory/member_view.pt	(revision 1901)
@@ -5,33 +5,38 @@
   global dirtitle dir/title_or_id;
   "/>
-<metal:block use-macro="here/main_template/macros/master">
-
-  <metal:block fill-slot="head_slot">
-    <tal:block define="global actions
-      python:context.getWAeUPDirectoryActions(actions, dirname, dir, 'view', id)"/>    
-  </metal:block>
-
-  <metal:block fill-slot="style_slot">  
-    <link rel="Stylesheet" type="text/css" href=""
-      tal:attributes="href string:${base_url}document.css" />
-  </metal:block>
-
-
-
+  <metal:block use-macro="here/main_template/macros/master">
   <metal:block fill-slot="main" tal:define="
-                                res python: dir.renderEntryDetailed(id);
-                                global rendered_main python: res[0];
-                                ds python: res[1];
-                                global title ds/?title_field|id;">
-    
+  actions python:context.getMembersDirectoryActions('view');
+  res python: dir.renderEntryDetailed(id);
+  global rendered_main python: res[0];
+  ds python: res[1];
+  global title ds/?title_field|id;"
+  >
+    <div class="fontColordefaultfontcolors fontShapeaverage cpsskinsHBox body" 
+         metal:define-macro="members_actions">
+      <span tal:repeat="action actions">
+        <a tal:define="icon_tag action/icon_tag"
+           tal:attributes="href action/url;
+           class python:icon_tag and 'noicon' or None"
+           >
+          <tal:block condition="python:icon_tag"
+                     content="structure icon_tag"/>
+          <tal:block condition="python:not icon_tag">
+            <img tal:attributes="src
+            string:${base_url}noicon.png;
+            alt action/title" 
+            />
+          </tal:block>
+          <tal:block i18n:translate="" content="action/title" />
+        </a>
+      </span>
+    </div>
     <h3>
       <span tal:content="ds/fullname" />     
     </h3>
-
-    
     <div tal:replace="structure rendered_main">Rendered main...</div>
     <input type="submit" name="back" i18n:attributes="value"
-      class="standalone" value="button_back" onClick="history.back()" />
+           class="standalone" value="button_back" onClick="history.back()" />
   </metal:block>
+</metal:block>
 
-</metal:block>
Index: WAeUP_SRP/trunk/skins/waeup_directory/search_members_form.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_directory/search_members_form.pt	(revision 1900)
+++ WAeUP_SRP/trunk/skins/waeup_directory/search_members_form.pt	(revision 1901)
@@ -4,27 +4,18 @@
   global dirtitle dir/title_or_id;
   "/>
-<metal:block use-macro="here/main_template/macros/master">
-  <metal:block fill-slot="style_slot">
-    <tal:block define="dummy
-      python:context.setDirectoryBreadCrumbs(request, dirname, dir, dirtitle)"/>
-    <tal:block define="global actions
-      python:context.getWAeUPDirectoryActions(actions, dirname, dir, 'search')"/>
-
-    <link rel="Stylesheet" type="text/css" href=""
-      tal:attributes="href string:${base_url}document.css" />
-
-  </metal:block>
-
+  <metal:block use-macro="here/main_template/macros/master" >
   <metal:block fill-slot="header"/>
-
   <metal:block fill-slot="main" tal:define="
-    validate python: request.has_key('cpsdirectory_search_button');
-    res python: dir.renderSearchDetailed(request=request, validate=validate,
-                                      callback='search_members');
-    global rendered_main python: res[0];
-    global ok python: res[1];
-    ds python: res[2];
-    global portal_status_message python: (validate and not ok and
-      'psm_content_error') or request.form.get('portal_status_message', '');">
+  actions python:context.getMembersDirectoryActions('search');
+  validate python: request.has_key('cpsdirectory_search_button');
+  res python: dir.renderSearchDetailed(request=request, validate=validate,
+  callback='search_members');
+  global rendered_main python: res[0];
+  global ok python: res[1];
+  ds python: res[2];
+  global portal_status_message python: (validate and not ok and
+  'psm_content_error') or request.form.get('portal_status_message', '');"
+  >
+    <span metal:use-macro="here/member_view/macros/members_actions" />
     <h3>
       Search Member Section
@@ -33,4 +24,3 @@
     <div tal:replace="structure rendered_main">Rendered main...</div>
   </metal:block>
-
 </metal:block>
