Index: openacs-4/packages/contacts/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/www/index.adp,v diff -u -r1.16 -r1.17 --- openacs-4/packages/contacts/www/index.adp 19 Oct 2005 16:58:36 -0000 1.16 +++ openacs-4/packages/contacts/www/index.adp 20 Oct 2005 23:08:01 -0000 1.17 @@ -9,6 +9,6 @@ base_url="/contacts/" extend_p="@extend_p@" extend_values="@extend_values@" - attribute_values="@attribute_values@" + attr_val_name="@attr_val_name@" > \ No newline at end of file Index: openacs-4/packages/contacts/www/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/www/index.tcl,v diff -u -r1.16 -r1.17 --- openacs-4/packages/contacts/www/index.tcl 18 Oct 2005 23:01:21 -0000 1.16 +++ openacs-4/packages/contacts/www/index.tcl 20 Oct 2005 23:08:01 -0000 1.17 @@ -15,7 +15,7 @@ {add_organization:optional} {aggregate_attribute_id ""} {extend_values:optional ""} - {attribute_values:optional ""} + {attr_val_name:optional ""} } if { [exists_and_not_null add_person] } { Index: openacs-4/packages/contacts/www/search.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/www/search.adp,v diff -u -r1.7 -r1.8 --- openacs-4/packages/contacts/www/search.adp 19 Oct 2005 22:55:38 -0000 1.7 +++ openacs-4/packages/contacts/www/search.adp 20 Oct 2005 23:08:01 -0000 1.8 @@ -16,7 +16,7 @@
Index: openacs-4/packages/contacts/www/search.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/www/search.tcl,v diff -u -r1.17 -r1.18 --- openacs-4/packages/contacts/www/search.tcl 19 Oct 2005 22:55:38 -0000 1.17 +++ openacs-4/packages/contacts/www/search.tcl 20 Oct 2005 23:08:01 -0000 1.18 @@ -22,6 +22,7 @@ {attribute_values ""} {attribute_option ""} {attribute_names ""} + {attr_val_name ""} } -validate { valid_object_type -requires {object_type} { if { [lsearch [list party person organization] $object_type] < 0 } { @@ -83,7 +84,7 @@ } -#################################################### +# To extend the reusl list using default attributes if { [exists_and_not_null attribute_names] } { set show_names [join $attribute_names ", "] } @@ -162,24 +163,29 @@ {attribute_names:text(hidden) {value "$attribute_names"} } + {attr_val_name:text(hidden) + {value "$attr_val_name"} + } } -on_submit { # We clear the list when no value is submited, otherwise # we acumulate the extend values. if { [empty_string_p $attribute_option] } { set attribute_values [list] set attribute_names [list] + set attr_val_name [list] } else { set attribute $attribute_option - lappend attribute_values [list $attribute] - lappend attribute_names [lang::util::localize [db_string get_ams_pretty_name { }]] + ams::attribute::get -attribute_id $attribute -array attr_info + set name $attr_info(attribute_name) + lappend attribute_names "[_ acs-translations.ams_attribute_${attribute}_pretty_name]" + lappend attribute_values $attribute + lappend attr_val_name [list $attribute $name] } - ad_returnredirect [export_vars -base "search" {search_id attribute_values attribute_names}] + ad_returnredirect [export_vars -base "search" {search_id attribute_values attribute_names attr_val_name}] } } -#################################################### - set object_type_pretty_name(party) [_ contacts.People_or_Organizations] set object_type_pretty_name(person) [_ contacts.People] set object_type_pretty_name(organization) [_ contacts.Organizations]