Index: openacs-4/packages/project-manager/lib/assignee-portlet.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/assignee-portlet.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/project-manager/lib/assignee-portlet.tcl 4 Aug 2005 17:07:07 -0000 1.3
+++ openacs-4/packages/project-manager/lib/assignee-portlet.tcl 10 Aug 2005 17:42:57 -0000 1.4
@@ -20,6 +20,9 @@
set user_id [auth::require_login]
+# Get the URL for contacts
+set contacts_url [site_node::get_package_url -package_key contacts]
+
# Send Email URL
set send_email_url "send-mail?project_id=$project_id"
@@ -41,25 +44,40 @@
set assignee_edit_url [export_vars -base project-assign-edit {project_item_id return_url}]
-db_multirow people project_people_query { }
+db_multirow -extend {contact_url complaint_url} people project_people_query {} {
+
+ # If contacts is installed provide a link to the contacts party_id, otherwise don't
+ if {![empty_string_p $contacts_url]} {
+ set contact_url "${contacts_url}$party_id"
+ set complaint_url [export_vars -base "${contacts_url}complaint-ae" {{project_id $project_id} {supplier_id $party_id}}]
+ } else {
+ set contact_url ""
+ }
+ }
+set elements [list \
+ user_name [list \
+ label "[_ project-manager.Who]" \
+ display_template {
+ @people.user_name@
+
+ } \
+ ] \
+ role_name [list \
+ label "[_ project-manager.Role]" \
+ ] \
+ complaint [list \
+ label "[_ contacts.Complaint]" \
+ display_template {[_ project-manager.Add_complaint]
+ } \
+ ] \
+ ]
+
template::list::create \
-name people \
-multirow people \
-key item_id \
- -elements {
- user_name {
- label "[_ project-manager.Who]"
- display_template {
-
- @people.user_name@
-
- }
- }
- role_name {
- label "[_ project-manager.Role]"
- }
- } \
+ -elements $elements \
-sub_class {
narrow
} \