Ignore:
Timestamp:
24 Nov 2006, 08:01:42 (18 years ago)
Author:
joachim
Message:

exclude all homeless members from search

Location:
WAeUP_SRP/trunk/skins/waeup_directory
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_directory/search_members.py

    r924 r930  
    2424        mapping[key] = value
    2525
    26 #result_fields = context.getDirectoryResultFields(dir.getId(),
    27 #                                                 dir.title_field)
    28 result_fields = [{'id': 'sn', 'title': 'label_last_name', 'sort': 'asc'},
    29                   {'id': 'givenName', 'title': 'label_first_name'},
    30                   {'id': 'email', 'title': 'label_email'},
    31                   #{'id': id_field, 'title': 'label_user_name'},
    32                   ]
     26#mapping['homeless'] = True
     27result_fields = context.getDirectoryResultFields(dir.getId(),
     28                                                 dir.title_field)
     29##result_fields = [{'id': 'sn', 'title': 'label_last_name', 'sort': 'asc'},
     30##                  {'id': 'givenName', 'title': 'label_first_name'},
     31##                  {'id': 'email', 'title': 'label_email'},
     32##                  {'id': id_field, 'title': 'label_user_name'},
     33##                  ]
    3334
    3435return_fields = []
  • WAeUP_SRP/trunk/skins/waeup_directory/search_members_results.pt

    r923 r930  
    4646              </tal:block>
    4747          <td tal:define="roles python:data['roles']">
    48             <form action="." method="get" tal:attributes="action context/portal_url">
     48            <form action="." method="get"
     49                  tal:condition="roles"
     50                  tal:attributes="action context/portal_url">
    4951              <select class="form-element" name=":action"
    5052                      onChange="location.href='/'+this.options[this.selectedIndex].value"
    5153                      tal:attributes="onChange string:location.href='${context/portal_url}'+this.options[this.selectedIndex].value">
    52                 <option value="/search_members_form">Goto</option>
     54                <option value="/search_members_form">&nbsp;Goto&nbsp;</option>
    5355                <option tal:repeat="role roles" value="." tal:content="role/getId"
    5456                        tal:attributes="value string:${role/getPath}/folder_localrole_form"></option>
Note: See TracChangeset for help on using the changeset viewer.