Index: openacs-4/packages/contacts/lib/groups.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/lib/groups.adp,v diff -u -r1.6 -r1.7 --- openacs-4/packages/contacts/lib/groups.adp 20 Jun 2005 15:31:53 -0000 1.6 +++ openacs-4/packages/contacts/lib/groups.adp 28 Jun 2005 05:49:39 -0000 1.7 @@ -7,11 +7,11 @@ -

#contacts.Groups#

+

#contacts.Groups#

@@ -20,3 +20,9 @@ #contacts.lt_This_contact_is_not_p# + +

#contacts.Other_Options#

+ +
Index: openacs-4/packages/contacts/lib/groups.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/lib/groups.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/contacts/lib/groups.tcl 7 Jun 2005 07:45:39 -0000 1.5 +++ openacs-4/packages/contacts/lib/groups.tcl 28 Jun 2005 05:49:39 -0000 1.6 @@ -14,7 +14,8 @@ set groups_belonging_to [db_list get_party_groups { select group_id from group_distinct_member_map where member_id = :party_id }] - +set return_url "[contact::url -party_id $party_id]groups" +set object_type [contact::type -party_id $party_id] if { [string is false $hide_form_p] } { set group_options [list] set active_top_level "" @@ -27,12 +28,13 @@ if { [llength $group_options] > 0 } { set group_options [concat [list [list "- [_ ams.select_one] -" ""]] $group_options] set package_url [ad_conn package_url] + set add_label [_ contacts.Add_to_Group] ad_form -name add_to_group -action "${package_url}group-party-add" \ -form { party_id:integer(hidden) return_url:text(hidden),optional {group_id:integer(select) {label {}} {options $group_options}} - {save:text(submit),optional {label {Add to Group}}} + {save:text(submit),optional {label {$add_label}}} } -on_request { } -after_submit { } @@ -43,8 +45,7 @@ } - -multirow create groups group_id group sub_p +multirow create groups group_id group sub_p remove_url set sub_p "0" foreach group [contact::groups -expand "all" -privilege_required "read"] { set group_name [lindex $group 0] @@ -53,12 +54,18 @@ } else { set sub_p "0" } + set group_id [lindex $group 1] + set remove_url [export_vars -base "/contacts/group-parties-remove" -url {group_id party_id return_url}] if { [lindex $group 2] == "1" } { set active_top_level [lindex $group 0] } if { [lsearch $groups_belonging_to [lindex $group 1]] >= 0 } { - multirow append groups [lindex $group 1] $group_name $sub_p + multirow append groups [lindex $group 1] $group_name $sub_p $remove_url } } +if { [permission::permission_p -object_id "-2" -privilege "delete"] } { + set remove_url [export_vars -base "/contacts/group-parties-remove" -url {{group_id "-2"} party_id {return_url {/contacts/}}}] + set delete_p 1 +} else { + set delete_p 0 +} - -