Index: openacs-4/contrib/packages/project-manager/tcl/calendar-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/tcl/Attic/calendar-procs.tcl,v diff -u -N -r1.2 -r1.3 --- openacs-4/contrib/packages/project-manager/tcl/calendar-procs.tcl 13 Jan 2005 13:54:35 -0000 1.2 +++ openacs-4/contrib/packages/project-manager/tcl/calendar-procs.tcl 21 Jul 2005 16:28:08 -0000 1.3 @@ -51,10 +51,19 @@ } { Creates a month widget for tasks } { + set day_template "\$day_number" set prev_nav_template "<" set next_nav_template ">" + set package_id [ad_conn package_id] + + if { ![string eq $package_id [dotlrn::get_package_id]]} { + set instance_clause "and (select context_id from acs_objects where object_id=(select context_id from acs_objects where object_id=(select context_id from acs_objects where object_id=t.parent_id))) = :package_id" + } else { + set instance_clause "" + } + #ad_return_complaint 1 "$package_id $instance_clause" if {[empty_string_p $date]} { set date [dt_systime] } @@ -82,83 +91,86 @@ set last_latest_start_j "" set assignee_list [list] - db_foreach select_monthly_tasks {} { - - # highlight what you're assigned to. - if {[string equal $person_id $user_id]} { - set font_begin "" - set font_end "" - } else { - set font_begin "" - set font_end "" - } - - if { \ - ![empty_string_p $is_lead_p] && \ - [string is true $is_lead_p]} { - - set font_begin "$font_begin" - set font_end "$font_end" - } - - # if this is another row of the same item, just add the name. - if {[string equal $last_task_id $task_id]} { - append day_details "
${detail_begin}$task_id
$title${detail_end}
$project_name" - - # only add to the list if we want to see closed tasks - append day_details "
${detail_begin}$task_id
$title${detail_end}
$project_name" + + # only add to the list if we want to see closed tasks + append day_details "