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
} \
Index: openacs-4/packages/project-manager/lib/assignee-portlet.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/assignee-portlet.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/project-manager/lib/assignee-portlet.xql 26 May 2005 09:34:27 -0000 1.1
+++ openacs-4/packages/project-manager/lib/assignee-portlet.xql 10 Aug 2005 17:42:57 -0000 1.2
@@ -13,6 +13,7 @@
a.project_id,
r.one_line as role_name,
p.first_names || ' ' || p.last_name as user_name,
+ a.party_id,
r.is_lead_p
FROM
pm_project_assignment a,
Index: openacs-4/packages/project-manager/tcl/project-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/tcl/project-procs.tcl,v
diff -u -r1.12 -r1.13
--- openacs-4/packages/project-manager/tcl/project-procs.tcl 30 Jul 2005 00:26:33 -0000 1.12
+++ openacs-4/packages/project-manager/tcl/project-procs.tcl 10 Aug 2005 17:42:57 -0000 1.13
@@ -1982,7 +1982,8 @@
ad_proc -public pm::project::name {
- -project_item_id:required
+ -project_item_id
+ -project_id
} {
Returns the name for a project
@@ -1995,18 +1996,30 @@
@error
} {
- return [db_string get_name {
- SELECT
- title
- FROM
- cr_revisions p,
- cr_items i
- WHERE
- i.live_revision = p.revision_id
- and i.item_id = :project_item_id
- } -default ""]
-}
+ if {[exists_and_not_null project_item_id]} {
+ return [db_string get_name {
+ SELECT
+ title
+ FROM
+ cr_revisions p,
+ cr_items i
+ WHERE
+ i.live_revision = p.revision_id
+ and i.item_id = :project_item_id
+ } -default ""]
+ } else {
+ return [db_string get_name {
+ SELECT
+ title
+ FROM
+ pm_projectsx
+ WHERE
+ project_id = :project_id
+ } -default ""]
+ }
+}
+
ad_proc -public pm::project::url {
-project_item_id:required