Index: openacs-4/packages/project-manager/lib/project-calendar.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/project-calendar.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/project-manager/lib/project-calendar.tcl 22 Jul 2005 22:04:29 -0000 1.2 +++ openacs-4/packages/project-manager/lib/project-calendar.tcl 30 Jul 2005 18:32:36 -0000 1.3 @@ -79,17 +79,20 @@ # ------------------------------------- set users_to_view [pm::calendar::users_to_view] +set package_id [dotlrn_community::get_package_id_from_package_key -package_key project-manager -community_id [dotlrn_community::get_community_id]] -set community_id [dotlrn_community::get_community_id] +set users_clause "" -set users_list "community_members" +if { ![string eq [ad_conn package_id] [dotlrn::get_package_id]]} { + set users_clause "and pa.project_id in (select p.item_id + from pm_projectsx p + where + p.item_id = pa.project_id + and p.object_package_id = :package_id)" +} -if {[empty_string_p $community_id]} { - set users_list "dotlrn_members" -} - -db_multirow -extend {checked_p} users $users_list {} { +db_multirow -extend {checked_p} users assignees {} { if {[lsearch $users_to_view $party_id] == -1} { set checked_p f } else { Index: openacs-4/packages/project-manager/lib/project-calendar.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/project-calendar.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/project-manager/lib/project-calendar.xql 22 Jul 2005 21:29:27 -0000 1.1 +++ openacs-4/packages/project-manager/lib/project-calendar.xql 30 Jul 2005 18:32:36 -0000 1.2 @@ -7,34 +7,19 @@ - + - select + select distinct p.first_names || ' ' || p.last_name as name, p.person_id as party_id FROM persons p, - acs_rels r, - membership_rels mr + pm_project_assignment pa WHERE - r.object_id_one = :community_id and - mr.rel_id = r.rel_id and - p.person_id = r.object_id_two and - member_state = 'approved' - ORDER BY - p.first_names, p.last_name + p.person_id = pa.party_id + $users_clause - - - select - du.first_names || ' ' || du.last_name as name, - du.user_id as party_id - FROM - dotlrn_users du - - - \ No newline at end of file Index: openacs-4/packages/project-manager/lib/project-week-calendar.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/project-week-calendar.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/project-manager/lib/project-week-calendar.tcl 30 Jul 2005 00:26:33 -0000 1.1 +++ openacs-4/packages/project-manager/lib/project-week-calendar.tcl 30 Jul 2005 18:32:36 -0000 1.2 @@ -3,11 +3,18 @@ set selected_users [pm::calendar::users_to_view] set instance_clause "" +set users_clause "" set package_id [dotlrn_community::get_package_id_from_package_key -package_key project-manager -community_id [dotlrn_community::get_community_id]] set base_url "[apm_package_url_from_id $package_id]" if { ![string eq [ad_conn package_id] [dotlrn::get_package_id]]} { set instance_clause "and f.package_id=:package_id" + set users_clause "and pa.project_id in (select p.item_id + from pm_projectsx p + where + p.item_id = pa.project_id + and p.object_package_id = :package_id)" + } set return_url [ad_return_url]\#top @@ -110,7 +117,7 @@ set users_list "" foreach user $selected_users { - if {[db_string users {select 1 from pm_project_assignment where party_id=:user and project_id=:project_id} -default 0]} { + if {[db_string users { } -default 0]} { db_1row name {select p.first_names || ' ' || p.last_name as full_name from persons p where person_id=:user} if { $user == $user_id } { append users_list "" @@ -167,16 +174,7 @@ set users_to_view [pm::calendar::users_to_view] -set community_id [dotlrn_community::get_community_id] - -set users_list "community_members" - -if {[empty_string_p $community_id]} { - set users_list "dotlrn_members" -} - - -db_multirow -extend {checked_p} users $users_list {} { +db_multirow -extend {checked_p} users assignees {} { if {[lsearch $users_to_view $party_id] == -1} { set checked_p f } else { Index: openacs-4/packages/project-manager/lib/project-week-calendar.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/project-week-calendar.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/project-manager/lib/project-week-calendar.xql 30 Jul 2005 00:26:33 -0000 1.1 +++ openacs-4/packages/project-manager/lib/project-week-calendar.xql 30 Jul 2005 18:32:36 -0000 1.2 @@ -94,36 +94,29 @@ - + - select + select distinct p.first_names || ' ' || p.last_name as name, p.person_id as party_id FROM persons p, - acs_rels r, - membership_rels mr + pm_project_assignment pa WHERE - r.object_id_one = :community_id and - mr.rel_id = r.rel_id and - p.person_id = r.object_id_two and - member_state = 'approved' - ORDER BY - p.first_names, p.last_name + p.person_id = pa.party_id + $users_clause - + - select - du.first_names || ' ' || du.last_name as name, - du.user_id as party_id - FROM - dotlrn_users du + select distinct 1 + from pm_project_assignment + where party_id=:user and project_id=:project_id + + - - Index: openacs-4/packages/project-manager/lib/task-calendar.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/task-calendar.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/project-manager/lib/task-calendar.adp 30 Jul 2005 00:26:33 -0000 1.3 +++ openacs-4/packages/project-manager/lib/task-calendar.adp 30 Jul 2005 18:32:36 -0000 1.4 @@ -1,10 +1,10 @@ View options - By latest finish + By latest finish - By deadline + By deadline

Index: openacs-4/packages/project-manager/lib/task-calendar.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/task-calendar.tcl,v diff -u -r1.4 -r1.5 --- openacs-4/packages/project-manager/lib/task-calendar.tcl 30 Jul 2005 00:26:33 -0000 1.4 +++ openacs-4/packages/project-manager/lib/task-calendar.tcl 30 Jul 2005 18:32:36 -0000 1.5 @@ -45,6 +45,7 @@ set return_url [ad_return_url]\#top set edit_hidden_vars [export_vars -form {return_url {new_tasks "0"}}] +set users_clause "" if { ![exists_and_not_null package_id]} { set calendar [pm::calendar::one_month_display \ @@ -53,6 +54,16 @@ -hide_closed_p $hide_closed_p \ -display_p $display_p \ ] + set package_id [dotlrn_community::get_package_id_from_package_key -package_key project-manager -community_id [dotlrn_community::get_community_id]] + if { ![string eq [ad_conn package_id] [dotlrn::get_package_id]]} { + set users_clause "and pa.project_id in (select p.item_id + from pm_projectsx p + where + p.item_id = pa.project_id + and p.object_package_id = :package_id)" + } + + } else { set calendar [pm::calendar::one_month_display \ -user_id $user_id \ @@ -91,16 +102,9 @@ set users_to_view [pm::calendar::users_to_view] -set community_id [dotlrn_community::get_community_id] -set users_list "community_members" -if {[empty_string_p $community_id]} { - set users_list "dotlrn_members" -} - - -db_multirow -extend {checked_p} users $users_list {} { +db_multirow -extend {checked_p} users assignees {} { if {[lsearch $users_to_view $party_id] == -1} { set checked_p f } else { Index: openacs-4/packages/project-manager/lib/task-calendar.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/task-calendar.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/project-manager/lib/task-calendar.xql 22 Jul 2005 22:04:29 -0000 1.1 +++ openacs-4/packages/project-manager/lib/task-calendar.xql 30 Jul 2005 18:32:36 -0000 1.2 @@ -7,34 +7,19 @@ - + - select + select distinct p.first_names || ' ' || p.last_name as name, p.person_id as party_id FROM persons p, - acs_rels r, - membership_rels mr + pm_project_assignment pa WHERE - r.object_id_one = :community_id and - mr.rel_id = r.rel_id and - p.person_id = r.object_id_two and - member_state = 'approved' - ORDER BY - p.first_names, p.last_name + p.person_id = pa.party_id + $users_clause - - - select - du.first_names || ' ' || du.last_name as name, - du.user_id as party_id - FROM - dotlrn_users du - - - \ No newline at end of file Index: openacs-4/packages/project-manager/lib/task-week-calendar.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/task-week-calendar.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/project-manager/lib/task-week-calendar.tcl 30 Jul 2005 00:26:33 -0000 1.1 +++ openacs-4/packages/project-manager/lib/task-week-calendar.tcl 30 Jul 2005 18:32:36 -0000 1.2 @@ -2,11 +2,18 @@ set selected_users [pm::calendar::users_to_view] set instance_clause "" +set users_clause "" set package_id [dotlrn_community::get_package_id_from_package_key -package_key project-manager -community_id [dotlrn_community::get_community_id]] if { ![string eq [ad_conn package_id] [dotlrn::get_package_id]]} { set instance_clause "and o.package_id=:package_id" + set users_clause "and pa.project_id in (select p.item_id + from pm_projectsx p + where + p.item_id = pa.project_id + and p.object_package_id = :package_id)" + } set return_url [ad_return_url]\#top @@ -113,7 +120,7 @@ set users_list "
$full_name
" foreach user $selected_users { - if {[db_string users {select 1 from pm_task_assignment where party_id=:user and task_id=:item_id} -default 0]} { + if {[db_string users { } -default 0]} { db_1row name {select p.first_names || ' ' || p.last_name as full_name from persons p where person_id=:user} if { $user == $user_id } { append users_list "" @@ -174,14 +181,8 @@ set community_id [dotlrn_community::get_community_id] -set users_list "community_members" -if {[empty_string_p $community_id]} { - set users_list "dotlrn_members" -} - - -db_multirow -extend {checked_p} users $users_list {} { +db_multirow -extend {checked_p} users assignees {} { if {[lsearch $users_to_view $party_id] == -1} { set checked_p f } else { Index: openacs-4/packages/project-manager/lib/task-week-calendar.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/task-week-calendar.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/project-manager/lib/task-week-calendar.xql 30 Jul 2005 00:26:33 -0000 1.1 +++ openacs-4/packages/project-manager/lib/task-week-calendar.xql 30 Jul 2005 18:32:36 -0000 1.2 @@ -128,35 +128,30 @@ - + - select + select distinct p.first_names || ' ' || p.last_name as name, p.person_id as party_id FROM persons p, - acs_rels r, - membership_rels mr + pm_project_assignment pa WHERE - r.object_id_one = :community_id and - mr.rel_id = r.rel_id and - p.person_id = r.object_id_two and - member_state = 'approved' - ORDER BY - p.first_names, p.last_name - + p.person_id = pa.party_id + $users_clause - + - select - du.first_names || ' ' || du.last_name as name, - du.user_id as party_id - FROM - dotlrn_users du + select distinct 1 + from pm_task_assignment + where party_id=:user and task_id=:item_id + + + Index: openacs-4/packages/project-manager/www/project-assign-edit.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/project-assign-edit.adp,v diff -u -r1.4 -r1.5 --- openacs-4/packages/project-manager/www/project-assign-edit.adp 27 Jul 2005 19:15:05 -0000 1.4 +++ openacs-4/packages/project-manager/www/project-assign-edit.adp 30 Jul 2005 18:32:36 -0000 1.5 @@ -1,5 +1,8 @@ @title@ @context@ + +
+ @html;noquote@ Index: openacs-4/packages/project-manager/www/project-assign-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/project-assign-edit.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/packages/project-manager/www/project-assign-edit.tcl 28 Jul 2005 08:23:45 -0000 1.9 +++ openacs-4/packages/project-manager/www/project-assign-edit.tcl 30 Jul 2005 18:32:36 -0000 1.10 @@ -11,11 +11,17 @@ } { project_item_id:integer,notnull return_url:notnull + {search_user_id ""} } -properties { } -validate { } -errors { } + +# Validate that search_user_id is on persons table to get the user name +ad_return_complaint 1 "[template::form is_valid search_user]" + + # The unique identifier for this package. set package_id [ad_conn package_id] @@ -62,6 +68,7 @@ set assignee_list_of_lists [pm::util::subsite_assignees_list_of_lists] + set html "
$full_name
" foreach role_list $roles_list_of_lists { @@ -75,7 +82,8 @@ foreach assignee_list $assignee_list_of_lists { set name [lindex $assignee_list 0] set person_id [lindex $assignee_list 1] - set email [party::email -party_id $person_id] + set email Email + #[party::email -party_id $person_id] if {[exists_and_not_null assigned($person_id-$role)]} { set checked "checked" @@ -101,3 +109,18 @@ set export_vars [export_vars -form {project_item_id return_url}] append html "
$export_vars" + + + +ad_form -name search_user -form { + {project_item_id:text(hidden) + {value $project_item_id} + } + {return_url:text(hidden) + {value $return_url} + } + {search_user_id:party_search(party_search),optional + {label "Search for User:"} + } +} + Index: openacs-4/packages/project-manager/www/task-week-calendar.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/task-week-calendar.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/project-manager/www/task-week-calendar.tcl 30 Jul 2005 00:26:33 -0000 1.1 +++ openacs-4/packages/project-manager/www/task-week-calendar.tcl 30 Jul 2005 18:32:36 -0000 1.2 @@ -11,7 +11,13 @@ set package_id [ad_conn package_id] set instance_clause "and o.package_id=:package_id" +set users_clause "and pa.project_id in (select p.item_id + from pm_projectsx p + where + p.item_id = pa.project_id + and p.object_package_id = :package_id)" + set return_url [ad_return_url]\#top set edit_hidden_vars [export_vars -form {return_url {new_tasks "0"}}] @@ -116,7 +122,7 @@ set users_list "" foreach user $selected_users { - if {[db_string users {select 1 from pm_task_assignment where party_id=:user and task_id=:item_id} -default 0]} { + if {[db_string users {} -default 0]} { db_1row name {select p.first_names || ' ' || p.last_name as full_name from persons p where person_id=:user} if { $user == $user_id } { append users_list "" @@ -175,16 +181,7 @@ set users_to_view [pm::calendar::users_to_view] -set community_id [dotlrn_community::get_community_id] - -set users_list "community_members" - -if {[empty_string_p $community_id]} { - set users_list "dotlrn_members" -} - - -db_multirow -extend {checked_p} users $users_list {} { +db_multirow -extend {checked_p} users assignees {} { if {[lsearch $users_to_view $party_id] == -1} { set checked_p f } else { Index: openacs-4/packages/project-manager/www/task-week-calendar.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/task-week-calendar.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/project-manager/www/task-week-calendar.xql 30 Jul 2005 00:26:33 -0000 1.1 +++ openacs-4/packages/project-manager/www/task-week-calendar.xql 30 Jul 2005 18:32:36 -0000 1.2 @@ -128,35 +128,27 @@ - + - select + select distinct p.first_names || ' ' || p.last_name as name, p.person_id as party_id FROM persons p, - acs_rels r, - membership_rels mr + pm_project_assignment pa WHERE - r.object_id_one = :community_id and - mr.rel_id = r.rel_id and - p.person_id = r.object_id_two and - member_state = 'approved' - ORDER BY - p.first_names, p.last_name - + p.person_id = pa.party_id + $users_clause - + - select - du.first_names || ' ' || du.last_name as name, - du.user_id as party_id - FROM - dotlrn_users du + select distinct 1 + from pm_task_assignment + where party_id=:user and task_id=:item_id + - + - Index: openacs-4/packages/project-manager/www/lib/master.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/lib/master.adp,v diff -u -r1.3 -r1.4 --- openacs-4/packages/project-manager/www/lib/master.adp 27 Jul 2005 19:01:02 -0000 1.3 +++ openacs-4/packages/project-manager/www/lib/master.adp 30 Jul 2005 18:32:36 -0000 1.4 @@ -18,7 +18,7 @@ @import url(@package_url@style.css) all; - +

$full_name