From b398c902e6f8d3cbdd3b7eb7b4e151632fbd5af2 Mon Sep 17 00:00:00 2001 From: Yung Han Khoe Date: Sat, 24 May 2008 15:52:59 +0000 Subject: [PATCH] Added some UserList help and small fixes. --- lib/WebGUI/Asset/Wobject/UserList.pm | 18 ++++++++----- lib/WebGUI/Help/Asset_UserList.pm | 5 ++++ lib/WebGUI/i18n/English/Asset_UserList.pm | 31 +++++++++++++++++++++++ 3 files changed, 47 insertions(+), 7 deletions(-) diff --git a/lib/WebGUI/Asset/Wobject/UserList.pm b/lib/WebGUI/Asset/Wobject/UserList.pm index 3165260f5..530e18163 100644 --- a/lib/WebGUI/Asset/Wobject/UserList.pm +++ b/lib/WebGUI/Asset/Wobject/UserList.pm @@ -290,10 +290,12 @@ sub view { "visible"=>$profileField->{visible}, "fieldType"=>$profileField->{fieldType}, }); - push (@profileField_loop, { - "profileField_label"=>$label, - "profileField_sortByURL"=>$sortByURL, - }); + if($profileField->{visible}){ + push (@profileField_loop, { + "profileField_label"=>$label, + "profileField_sortByURL"=>$sortByURL, + }); + } unless($self->get("showOnlyVisibleAsNamed") && $profileField->{visible} != 1){ $var{'profileField_'.$fieldName.'_label'} = $label; $var{'profileField_'.$fieldName.'_sortByURL'} = $sortByURL; @@ -434,9 +436,11 @@ sub view { $profileFieldName =~ s/ /_/g; $profileFieldName =~ s/\./_/g; my $value = $user->{$profileField->{fieldName}}; - push (@profileFieldValues, { - "profile_value"=>$value, - }); + if($profileField->{visible}){ + push (@profileFieldValues, { + "profile_value"=>$value, + }); + } unless($self->get("showOnlyVisibleAsNamed") && $profileField->{visible} != 1){ $userProperties{'user_profile_'.$profileFieldName.'_value'} = $value; } diff --git a/lib/WebGUI/Help/Asset_UserList.pm b/lib/WebGUI/Help/Asset_UserList.pm index 454d23113..18d2bc783 100644 --- a/lib/WebGUI/Help/Asset_UserList.pm +++ b/lib/WebGUI/Help/Asset_UserList.pm @@ -26,6 +26,11 @@ our $HELP = { { 'name' => 'searchFormTypeAnd' }, { 'name' => 'searchFormTypeSelect' }, { 'name' => 'searchFormQuery_form' }, + { 'name' => 'search_PROFILEFIELDNAME_text' }, + { 'name' => 'searchExact_PROFILEFIELDNAME_text' }, + { 'name' => 'limitSearch' }, + { 'name' => 'includeInSearch_PROFILEFIELDNAME_hidden' }, + { 'name' => 'includeInSearch_PROFILEFIELDNAME_checkBox' }, { 'name' => 'numberOfProfileFields' }, { 'name' => 'profileField_PROFILEFIELDNAME_label' }, { 'name' => 'profileField_PROFILEFIELDNAME_sortByURL' }, diff --git a/lib/WebGUI/i18n/English/Asset_UserList.pm b/lib/WebGUI/i18n/English/Asset_UserList.pm index 6a776167a..3772be1ac 100644 --- a/lib/WebGUI/i18n/English/Asset_UserList.pm +++ b/lib/WebGUI/i18n/English/Asset_UserList.pm @@ -196,6 +196,37 @@ seperated values|, lastUpdated => 1081514049 }, + 'search_PROFILEFIELDNAME_text' => { + message => q|A text input to do a normal search in profile field PROFILEFIELDNAME. Example: +<tmpl_var search_lastName_text>.|, + lastUpdated => 1081514049 + }, + + 'searchExact_PROFILEFIELDNAME_text' => { + message => q|A text input to do an exact search in profile field PROFILEFIELDNAME. Example: +<tmpl_var searchExact_email_text>.|, + lastUpdated => 1081514049 + }, + + 'limitSearch' => { + message => q|A hidden form element to indicate that the search is limited to certain profile +fields. Use includeInSearch_PROFILEFIELDNAME_hidden or includeInSearch_PROFILEFIELDNAME_checkBox tmpl_vars to +select which fields the search is limited to.|, + lastUpdated => 1081514049 + }, + + 'includeInSearch_PROFILEFIELDNAME_hidden' => { + message => q|A hidden form element to indicate that profile field PROFILEFIELDNAME will be +searched. This will only have an effect if the limitSearch tmpl_var is part of the search form.|, + lastUpdated => 1081514049 + }, + + 'includeInSearch_PROFILEFIELDNAME_checkBox' => { + message => q|A checkBox that the user can use to choose whether profile field PROFILEFIELDNAME will +be searched or not. This will only have an effect if the limitSearch tmpl_var is part of the search form.|, + lastUpdated => 1081514049 + }, + 'numberOfProfileFields' => { message => q|The number of profile fields.|, lastUpdated => 1081514049