Index: openacs-4/contrib/packages/project-manager/www/task-add-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/task-add-edit.tcl,v diff -u -r1.27.2.16 -r1.27.2.17 --- openacs-4/contrib/packages/project-manager/www/task-add-edit.tcl 19 Nov 2004 22:43:22 -0000 1.27.2.16 +++ openacs-4/contrib/packages/project-manager/www/task-add-edit.tcl 25 Nov 2004 01:16:07 -0000 1.27.2.17 @@ -41,6 +41,16 @@ set user_id [ad_maybe_redirect_for_registration] set package_id [ad_conn package_id] +# use hour units or day units +set use_day_p [parameter::get -parameter "UseDayInsteadOfHour" -default "t"] +set hours_day [pm::util::hours_day] + +if {[string is true $use_day_p]} { + set work_units "days" +} else { + set work_units "hrs" +} + # --------------------------------------------------------------- # terminology # --------------------------------------------------------------- @@ -132,9 +142,12 @@ one_line \ description \ description_mime_type \ - work \ - work_min \ - work_max \ + work_hrs \ + work_min_hrs \ + work_max_hrs \ + work_days \ + work_min_days \ + work_max_days \ percent_complete \ end_date_html \ depends \ @@ -206,7 +219,20 @@ " - + + set task_estimated_days_work($task) \ + [pm::util::days_work \ + -hours_work $task_estimated_hours_work($task)] + + set task_estimated_days_work_min($task) \ + [pm::util::days_work \ + -hours_work $task_estimated_hours_work_min($task)] + + set task_estimated_days_work_max($task) \ + [pm::util::days_work \ + -hours_work $task_estimated_hours_work_max($task)] + + template::multirow append tasks \ $task \ "" \ @@ -216,6 +242,9 @@ $task_estimated_hours_work($task) \ $task_estimated_hours_work_min($task) \ $task_estimated_hours_work_max($task) \ + $task_estimated_days_work($task) \ + $task_estimated_days_work_min($task) \ + $task_estimated_days_work_max($task) \ $task_percent_complete($task) \ $end_date_html \ $task_dependency($task) \ @@ -294,6 +323,19 @@ set project_html "" + set process_estimated_days_work($pt) \ + [pm::util::days_work \ + -hours_work $process_estimated_hours_work($pt)] + + set process_estimated_days_work_min($pt) \ + [pm::util::days_work \ + -hours_work $process_estimated_hours_work_min($pt)] + + set process_estimated_days_work_max($pt) \ + [pm::util::days_work \ + -hours_work $process_estimated_hours_work_max($pt)] + + # make sure deps are working. template::multirow append tasks \ @@ -305,6 +347,9 @@ $process_estimated_hours_work($pt) \ $process_estimated_hours_work_min($pt) \ $process_estimated_hours_work_max($pt) \ + $process_estimated_days_work($pt) \ + $process_estimated_days_work_min($pt) \ + $process_estimated_days_work_max($pt) \ "0" \ $end_date_html \ $process_dependency($pt) \ @@ -351,6 +396,9 @@ 0 \ 0 \ 0 \ + 0 \ + 0 \ + 0 \ $end_date_html \ "" \ $assignee_html \