Index: openacs-4/packages/contacts/lib/contact-attributes-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/lib/contact-attributes-portlet.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/contacts/lib/contact-attributes-portlet.tcl 20 Oct 2005 15:47:42 -0000 1.2 +++ openacs-4/packages/contacts/lib/contact-attributes-portlet.tcl 20 Feb 2006 22:01:02 -0000 1.3 @@ -1,4 +1,6 @@ set portlet_layout [parameter::get -parameter "DefaultPortletLayout"] -set attributes_url "[site_node::get_package_url -package_key "contacts"]${party_id}/edit" +set package_url [ad_conn package_url] +set attributes_url "[contact::url -party_id $party_id]edit" + Index: openacs-4/packages/contacts/lib/contact-complaint-form.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/lib/contact-complaint-form.tcl,v diff -u -r1.14 -r1.15 --- openacs-4/packages/contacts/lib/contact-complaint-form.tcl 20 Oct 2005 16:05:33 -0000 1.14 +++ openacs-4/packages/contacts/lib/contact-complaint-form.tcl 20 Feb 2006 22:01:02 -0000 1.15 @@ -31,14 +31,15 @@ } } +set package_url [ad_conn package_url] set customer_name [contact::name -party_id $customer_id] ad_form -extend -name complaint_form -form { {customer_id:text(hidden) {value $customer_id} } {customer:text(inform),optional {label "[_ contacts.Customer]"} - {value "$customer_name"} + {value "$customer_name"} } } Index: openacs-4/packages/contacts/lib/contact-complaint-list.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/lib/contact-complaint-list.tcl,v diff -u -r1.10 -r1.11 --- openacs-4/packages/contacts/lib/contact-complaint-list.tcl 16 Oct 2005 12:43:54 -0000 1.10 +++ openacs-4/packages/contacts/lib/contact-complaint-list.tcl 20 Feb 2006 22:01:02 -0000 1.11 @@ -37,9 +37,10 @@ lappend rows_list [list] } } +set package_url [ad_conn package_url] # This are the elements of the template::list -set edit_url "/contacts/add-edit-complaint?complaint_id=@complaint.complaint_id@&customer_id=@complaint.customer_id@" +set edit_url "${package_url}add-edit-complaint?complaint_id=@complaint.complaint_id@&customer_id=@complaint.customer_id@" set elements_list [list \ title [list label [_ contacts.Title_1] \ display_template \ @@ -107,7 +108,7 @@ db_multirow -extend { customer customer_url supplier supplier_url object_url} complaint get_complaints { } { set customer "[contact::name -party_id $customer_id]" set supplier "[contact::name -party_id $supplier_id]" - set customer_url "/contacts/$customer_id" - set supplier_url "/contacts/$supplier_id" + set customer_url "${package_url}$customer_id" + set supplier_url "${package_url}$supplier_id" set object_url "/o/$complaint_object_id" } Index: openacs-4/packages/contacts/lib/contact-relationships-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/lib/contact-relationships-portlet.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/contacts/lib/contact-relationships-portlet.tcl 20 Oct 2005 15:47:42 -0000 1.3 +++ openacs-4/packages/contacts/lib/contact-relationships-portlet.tcl 20 Feb 2006 22:01:02 -0000 1.4 @@ -1,3 +1,4 @@ +set package_url [ad_conn package_url] set portlet_layout [parameter::get -parameter "DefaultPortletLayout"] -set relations_url "[site_node::get_package_url -package_key "contacts"]${party_id}/relationships" +set relations_url "[contact::url -party_id $party_id]relationships" 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.6 -r1.7 --- openacs-4/packages/contacts/lib/contact-relationships.tcl 28 Dec 2005 12:38:11 -0000 1.6 +++ openacs-4/packages/contacts/lib/contact-relationships.tcl 20 Feb 2006 22:01:02 -0000 1.7 @@ -23,28 +23,30 @@ } multirow create rels relationship relation_url contact contact_url attribute value -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}] +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] db_foreach get_relationships {} { - set contact_url [contact::url -party_id $other_party_id] - if {[organization::organization_p -party_id $other_party_id]} { - set other_object_type "organization" - } else { - set other_object_type "person" - } - set relation_url [export_vars -base "/contacts/add/$other_object_type" -url {{group_ids $groups_belonging_to} {object_id_two "$party_id"} rel_type}] - set role_singular [lang::util::localize $role_singular] - multirow append rels $role_singular $relation_url $other_name $contact_url {} {} + if { [contact::visible_p -party_id $other_party_id] } { + set contact_url [contact::url -party_id $other_party_id] + if {[organization::organization_p -party_id $other_party_id]} { + set other_object_type "organization" + } else { + set other_object_type "person" + } + set relation_url [export_vars -base "[ad_conn package_url]add/$other_object_type" -url {{group_ids $groups_belonging_to} {object_id_two "$party_id"} rel_type}] + set role_singular [lang::util::localize $role_singular] + multirow append rels $role_singular $relation_url $other_name $contact_url {} {} - # NOT YET IMPLEMENTED - Checking to see if role_singular or role_plural is needed + # NOT YET IMPLEMENTED - Checking to see if role_singular or role_plural is needed - if { [ams::list::exists_p -package_key "contacts" -object_type ${rel_type} -list_name ${package_id}] } { - set details_list [ams::values -package_key "contacts" -object_type $rel_type -list_name $package_id -object_id $rel_id -format "text"] - - 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 - } - } + if { [ams::list::exists_p -package_key "contacts" -object_type ${rel_type} -list_name ${package_id}] } { + set details_list [ams::values -package_key "contacts" -object_type $rel_type -list_name $package_id -object_id $rel_id -format "text"] + + 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 + } + } + } } } Index: openacs-4/packages/contacts/lib/groups-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/lib/groups-portlet.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/contacts/lib/groups-portlet.tcl 16 Feb 2006 14:26:54 -0000 1.4 +++ openacs-4/packages/contacts/lib/groups-portlet.tcl 20 Feb 2006 22:01:02 -0000 1.5 @@ -7,4 +7,4 @@ set portlet_layout [parameter::get -parameter "DefaultPortletLayout"] set package_url [ad_conn package_url] -set groups_url "${package_url}/${party_id}/groups" \ No newline at end of file +set groups_url "[contact::url -party_id ${party_id}]groups" \ No newline at end of file Index: openacs-4/packages/contacts/lib/groups.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/lib/groups.tcl,v diff -u -r1.13 -r1.14 --- openacs-4/packages/contacts/lib/groups.tcl 26 Jan 2006 07:23:32 -0000 1.13 +++ openacs-4/packages/contacts/lib/groups.tcl 20 Feb 2006 22:01:02 -0000 1.14 @@ -55,7 +55,7 @@ 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}] + set remove_url [export_vars -base "${package_url}/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 $remove_url @@ -66,9 +66,9 @@ set user_p [contact::user_p -party_id $party_id] if { [permission::permission_p -object_id $default_group -privilege "delete"] } { - set remove_url [export_vars -base "/contacts/group-parties-remove" -url {{group_id $default_group} party_id {return_url {/contacts/}}}] + set remove_url [export_vars -base "${package_url}/group-parties-remove" -url {{group_id $default_group} party_id {return_url {${package_url}/}}}] if { [person::person_p -party_id $party_id] && [contact::email -party_id $party_id] != "" && $user_p != 1} { - set upgrade_url [export_vars -base "/contacts/person-upgrade-to-user" -url {{person_id $party_id}}] + set upgrade_url [export_vars -base "${package_url}/person-upgrade-to-user" -url {{person_id $party_id}}] } set delete_p 1 } else { Index: openacs-4/packages/contacts/lib/history-portlet.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/lib/history-portlet.adp,v diff -u -r1.2 -r1.3 --- openacs-4/packages/contacts/lib/history-portlet.adp 19 Oct 2005 16:58:36 -0000 1.2 +++ openacs-4/packages/contacts/lib/history-portlet.adp 20 Feb 2006 22:01:02 -0000 1.3 @@ -1,5 +1,5 @@ -#contacts.History# +#contacts.History# Index: openacs-4/packages/contacts/lib/history-portlet.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/lib/history-portlet.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/contacts/lib/history-portlet.tcl 28 Oct 2005 17:57:18 -0000 1.2 +++ openacs-4/packages/contacts/lib/history-portlet.tcl 20 Feb 2006 22:01:02 -0000 1.3 @@ -3,4 +3,7 @@ set $optional_param {} } } -set portlet_layout [parameter::get -parameter "DefaultPortletLayout"] \ No newline at end of file +set package_url [ad_conn package_url] +set portlet_layout [parameter::get -parameter "DefaultPortletLayout"] + +set history_url "[contact::url -party_id ${party_id}]history" Index: openacs-4/packages/contacts/lib/oo_mailing.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/lib/oo_mailing.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/contacts/lib/oo_mailing.tcl 20 Feb 2006 09:13:58 -0000 1.8 +++ openacs-4/packages/contacts/lib/oo_mailing.tcl 20 Feb 2006 22:01:02 -0000 1.9 @@ -242,6 +242,6 @@ cr_write_content -revision_id [lindex $file_revisions 0] } } - ad_returnredirect "/contacts/$party_id" + ad_returnredirect [contact::url -party_id $party_id] } Index: openacs-4/packages/contacts/lib/search-contact.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/lib/search-contact.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/contacts/lib/search-contact.tcl 18 Dec 2005 21:31:28 -0000 1.2 +++ openacs-4/packages/contacts/lib/search-contact.tcl 20 Feb 2006 22:01:02 -0000 1.3 @@ -29,5 +29,5 @@ } {return_url:text(hidden) {value $return_url}} } -on_submit { - ad_returnredirect [export_vars -base "/contacts/" -url {{query $keyword}}] + ad_returnredirect [export_vars -base [ad_conn package_url] -url {{query $keyword}}] } -has_submit {1} \ No newline at end of file Index: openacs-4/packages/contacts/www/contact.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/www/contact.adp,v diff -u -r1.39 -r1.40 --- openacs-4/packages/contacts/www/contact.adp 15 Feb 2006 10:21:49 -0000 1.39 +++ openacs-4/packages/contacts/www/contact.adp 20 Feb 2006 22:01:03 -0000 1.40 @@ -10,7 +10,7 @@ #contacts.Visit_Club# Index: openacs-4/packages/contacts/www/create-club.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/www/create-club.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/contacts/www/create-club.tcl 15 Feb 2006 10:06:36 -0000 1.2 +++ openacs-4/packages/contacts/www/create-club.tcl 20 Feb 2006 22:01:03 -0000 1.3 @@ -19,4 +19,4 @@ set group_id [group::get_id -group_name "Customers"] callback contact::organization_new_group -organization_id $party_id -group_id $group_id -ad_progress_bar_end -url "/contacts/$party_id" +ad_progress_bar_end -url [contact::url -party_id $party_id] Index: openacs-4/packages/contacts/www/index.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/www/index.adp,v diff -u -r1.18 -r1.19 --- openacs-4/packages/contacts/www/index.adp 14 Nov 2005 22:55:45 -0000 1.18 +++ openacs-4/packages/contacts/www/index.adp 20 Feb 2006 22:01:03 -0000 1.19 @@ -3,15 +3,15 @@ @show_default_names;noquote@ @show_names;noquote@ ( #contacts.Clear# ) - + Index: openacs-4/packages/contacts/www/search.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/www/search.tcl,v diff -u -r1.24 -r1.25 --- openacs-4/packages/contacts/www/search.tcl 3 Feb 2006 16:53:41 -0000 1.24 +++ openacs-4/packages/contacts/www/search.tcl 20 Feb 2006 22:01:03 -0000 1.25 @@ -52,8 +52,8 @@ } } +set package_url [ad_conn package_url] - if { [exists_and_not_null aggregate] } { ad_returnredirect "[export_vars -base ./ -url {search_id aggregate_attribute_id}]" } Index: openacs-4/packages/contacts/www/admin/ext-search-options.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/contacts/www/admin/ext-search-options.adp,v diff -u -r1.5 -r1.6 --- openacs-4/packages/contacts/www/admin/ext-search-options.adp 18 Nov 2005 17:48:27 -0000 1.5 +++ openacs-4/packages/contacts/www/admin/ext-search-options.adp 20 Feb 2006 22:01:03 -0000 1.6 @@ -27,7 +27,7 @@ #contacts.Remove_default_options#: - #contacts.Go_to_search_results# + #contacts.Go_to_search_results# #contacts.Search_List#