Changeset 1899
- Timestamp:
- 14 Jun 2007, 20:28:57 (17 years ago)
- Location:
- WAeUP_SRP/trunk/skins/waeup_directory
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/trunk/skins/waeup_directory/search_members.py
r1886 r1899 12 12 from Products.CPSDirectory.BaseDirectory import SearchSizeLimitExceeded 13 13 from Products.AdvancedQuery import Eq, Between, Le,In 14 try: 15 from Products.zdb import set_trace 16 except: 17 def set_trace(): 18 pass 14 19 try: 15 20 aq_portal = context.portal_catalog.evalAdvancedQuery … … 32 37 ## {'id': id_field, 'title': 'label_user_name'}, 33 38 ## ] 39 if dir.getId() == "members": 40 result_fields.append({'id': 'groups', 'title': 'Group(s)'}) 34 41 35 42 return_fields = [] … … 58 65 rendered = dir.member_search_errors(exception=e) 59 66 return rendered, 'results' 60 61 67 for field, process_meth in process_fields.items(): 62 68 meth = getattr(context, process_meth, None) … … 93 99 roles.append(r) 94 100 item[1]['roles'] = roles 95 rendered = dir.search_members_results(results=results) 101 if "groups" in return_fields: 102 item[1]['groups'] = " ".join(item[1]['groups']) 103 104 rendered = dir.search_members_results(results=results,result_fields=result_fields) 96 105 97 106 return rendered, 'results' -
WAeUP_SRP/trunk/skins/waeup_directory/search_members_results.pt
r953 r1899 11 11 dirname here/getId; 12 12 title_field here/title_field; 13 fields python:here.getDirectoryResultFields(dirname);13 fields options/result_fields; 14 14 isAdmin python:here.portal_membership.getAuthenticatedMember().has_role(['Manager',]); 15 15 cpsmcat nocall:here/translation_service; … … 40 40 </tal:block> 41 41 <td> 42 <span tal:condition="repeat/field/start"> 42 43 <a href="." 43 44 tal:attributes="href string:${portal_url}/member_view?id=${id}" 44 45 ><strong tal:content="structure python:data.get(field['id'])">john</strong></a> 46 </span> 47 <span tal:condition="not:repeat/field/start" 48 tal:content="structure python:data.get(field['id'])" /> 45 49 </td> 46 50 </tal:block>
Note: See TracChangeset for help on using the changeset viewer.