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 -r1.1.2.2 -r1.1.2.3 --- openacs-4/contrib/packages/project-manager/tcl/calendar-procs.tcl 6 Aug 2004 18:28:18 -0000 1.1.2.2 +++ openacs-4/contrib/packages/project-manager/tcl/calendar-procs.tcl 13 Aug 2004 18:57:34 -0000 1.1.2.3 @@ -16,15 +16,14 @@ ad_proc -public one_month_display { {-user_id:required} - {-day_template "\$day_number"} - {-item_template "\$item"} - {-item_add_template ""} {-date ""} - {-prev_nav_template ""} - {-next_nav_template ""} } { Creates a month widget for tasks } { + set day_template "\$day_number" + set prev_nav_template "<" + set next_nav_template ">" + if {[empty_string_p $date]} { set date [dt_systime] } @@ -43,42 +42,55 @@ db_foreach select_monthly_tasks {} { + # highlight what you're assigned to. if {[string equal $person_id $user_id]} { - set font_begin "" - set font_end "" + set font_begin "" + set font_end "" } else { - set font_begin "" - set font_end "" + set font_begin "" + set 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 "$font_begin, $full_name$font_end" + append day_details "
  • , ${font_begin}${full_name}${font_end}
  • " } else { + # this is the beginning of an item. + + # save the last item for output if {![empty_string_p $last_task_id]} { - ns_set put $items $latest_start_j "$day_details

    " + ns_set put $items $latest_start_j "${day_details}

    " } - set day_details "$task_id $title" + + # set up the next item for output - append day_details "
    $font_begin$full_name$font_end" + if {[string equal $status "c"]} { + set detail_begin "" + set detail_end "" + } else { + set detail_begin "" + set detail_end "" + } + # begin setting up this calendar item + set day_details "

    ${detail_begin}$task_id
    $title${detail_end}" + + append day_details "

    " } # Display stuff - if {[empty_string_p $item_add_template]} { - set day_number_template "$day_template" - } else { - set day_number_template "$day_template     $item_add_template" - } + set day_number_template "$day_template" return [dt_widget_month -calendar_details $items -date $date \ -master_bgcolor black \