Index: openacs-4/packages/contacts/lib/contact-attributes.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/lib/contact-attributes.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/contacts/lib/contact-attributes.tcl 15 Feb 2006 10:06:36 -0000 1.7 +++ openacs-4/packages/contacts/lib/contact-attributes.tcl 27 Apr 2006 06:37:21 -0000 1.8 @@ -28,10 +28,10 @@ } set groups_belonging_to [db_list get_party_groups { select group_id from group_distinct_member_map where member_id = :party_id }] -contact::require_visiblity -party_id $party_id +contact::require_visiblity -party_id $party_id -package_id $package_id -set ams_groups [contacts::default_group] -foreach group [contact::groups -expand "all" -privilege_required "read"] { +set ams_groups [contacts::default_group -package_id $package_id] +foreach group [contact::groups -expand "all" -privilege_required "read" -package_id $package_id] { set group_id [lindex $group 1] if { [lsearch $groups_belonging_to $group_id] >= 0 } { lappend ams_groups $group_id Index: openacs-4/packages/contacts/lib/contact-relationships-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/lib/contact-relationships-postgresql.xql,v diff -u -r1.5 -r1.6 --- openacs-4/packages/contacts/lib/contact-relationships-postgresql.xql 10 Mar 2006 09:39:34 -0000 1.5 +++ openacs-4/packages/contacts/lib/contact-relationships-postgresql.xql 27 Apr 2006 06:37:21 -0000 1.6 @@ -3,7 +3,7 @@ -select rel_id, other_name, other_party_id, role_singular, role_plural, rel_type +select rel_id, other_name, other_party_id, role_singular, role_plural, rel_type, creation_date from ( select CASE WHEN object_id_one = :party_id THEN contact__name(object_id_two,'t') ELSE contact__name(object_id_one,'t') END as other_name, CASE WHEN object_id_one = :party_id THEN object_id_two ELSE object_id_one END as other_party_id, CASE WHEN object_id_one = :party_id THEN role_two ELSE role_one END as role, @@ -13,9 +13,11 @@ from acs_rels, acs_rel_types where acs_rels.rel_type = acs_rel_types.rel_type + and acs_objects.object_id = acs_rels.rel_id and ( object_id_one = :party_id or object_id_two = :party_id ) and acs_rels.rel_type in ( select object_type from acs_object_types where supertype = 'contact_rel') - ) rels_temp + ) rels_temp, acs_objects + where rels_temp.rel_id = acs_objects.object_id order by upper(role_singular) asc, upper(other_name) Index: openacs-4/packages/contacts/lib/contact-relationships.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/lib/contact-relationships.adp,v diff -u -r1.6 -r1.7 --- openacs-4/packages/contacts/lib/contact-relationships.adp 4 Apr 2006 13:33:16 -0000 1.6 +++ openacs-4/packages/contacts/lib/contact-relationships.adp 27 Apr 2006 06:37:21 -0000 1.7 @@ -9,7 +9,7 @@
@rels.contact@ - + [@rels.creation_date@]
Index: openacs-4/packages/contacts/lib/contact-relationships.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/lib/contact-relationships.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/contacts/lib/contact-relationships.tcl 4 Apr 2006 13:33:16 -0000 1.8 +++ openacs-4/packages/contacts/lib/contact-relationships.tcl 27 Apr 2006 06:37:21 -0000 1.9 @@ -22,7 +22,7 @@ set package_id [ad_conn package_id] } -multirow create rels relationship relation_url contact contact_url attribute value +multirow create rels relationship relation_url contact contact_url attribute value creation_date set groups_belonging_to [db_list get_party_groups { select group_id from group_distinct_member_map where member_id = :party_id and group_id > 0}] lappend groups_belonging_to [contacts::default_group] @@ -41,8 +41,9 @@ set relation_url "" } + set creation_date [lc_time_fmt $creation_date %q] set role_singular [lang::util::localize $role_singular] - multirow append rels $role_singular $relation_url $other_name $contact_url {} {} + multirow append rels $role_singular $relation_url $other_name $contact_url {} {} $creation_date # NOT YET IMPLEMENTED - Checking to see if role_singular or role_plural is needed @@ -51,7 +52,7 @@ if { [llength $details_list] > 0 } { foreach {section attribute_name pretty_name value} $details_list { - multirow append rels $role_singular $relation_url $other_name $contact_url $pretty_name $value + multirow append rels $role_singular $relation_url $other_name $contact_url $pretty_name $value $creation_date } } } Index: openacs-4/packages/contacts/www/select-groups.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/www/select-groups.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/contacts/www/select-groups.tcl 26 Apr 2006 06:20:18 -0000 1.5 +++ openacs-4/packages/contacts/www/select-groups.tcl 27 Apr 2006 06:37:21 -0000 1.6 @@ -18,9 +18,12 @@ set form_elements { object_type:text(hidden) - object_id_two:text(hidden) - role_two:text(hidden) } + +if {![string eq "" $object_id_two]} { + lappend form_elements "object_id_two:text(hidden)" + lappend form_elements "role_two:text(hidden)" +} set default_group [contacts::default_group] set group_options [contact::groups -privilege_required "create"] if { [llength $group_options] == "0" } {