Index: openacs-4/contrib/packages/project-manager/www/process-one.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/process-one.tcl,v diff -u -r1.9.2.1 -r1.9.2.2 --- openacs-4/contrib/packages/project-manager/www/process-one.tcl 20 May 2004 17:30:05 -0000 1.9.2.1 +++ openacs-4/contrib/packages/project-manager/www/process-one.tcl 2 Jul 2004 23:13:49 -0000 1.9.2.2 @@ -14,7 +14,8 @@ } { process_id:integer - + orderby:optional + } -properties { process_id:onevalue context_bar:onevalue @@ -34,60 +35,105 @@ set write_p [permission::permission_p -object_id $package_id -privilege write] set create_p [permission::permission_p -object_id $package_id -privilege create] +set use_uncertain_completion_times_p [parameter::get -parameter "UseUncertainCompletionTimesP" -default "1"] + # set up context bar, needs parent_id - set context_bar [ad_context_bar [list "processes?process_id=$process_id" "Processes"] "One"] set use_link "" +if {[string is true $use_uncertain_completion_times_p]} { + set elements [list \ + one_line { + label "Subject" + display_template {@tasks.one_line@ + + + + + + + + + + + + + } + } \ + description { + label "Description" + } \ + estimated_hours_work_min { + label "Work estimate min" + } \ + estimated_hours_work_max { + label "Work estimate max" + } \ + ordering { + label "Order" + } ] + +} else { + + set elements [list \ + one_line { + label "Subject" + display_template {@tasks.one_line@ + + + + + + + + + + + + + } + } \ + description { + label "Description" + } \ + estimated_hours_work { + label "Work estimate" + } \ + ordering { + label "Order" + } ] +} + + + # Process tasks, using list-builder --------------------------------- template::list::create \ -name tasks \ -multirow tasks \ -key process_task_id \ - -elements { + -elements $elements \ + -orderby { + default_value ordering,asc + ordering { + label "Order" + orderby_asc "t.ordering, t.process_task_id" + orderby_desc "t.ordering desc, t.process_task_id desc" + default_direction asc + } one_line { - label "Subject" - display_template {@tasks.one_line@ - - - - - - - - - - - - - } + orderby_asc "t.one_line, t.ordering" + orderby_desc "t.one_line desc, t.ordering desc" + default_direction asc } - description { - label "Description" - } - estimated_hours_work { - label "Work estimate" - } - estimated_hours_work_min { - label "Work estimate min" - } - estimated_hours_work_max { - label "Work estimate max" - } - } \ - -orderby { - one_line {orderby one_line} - description {orderby description} estimated_hours_work {orderby estimated_hours_work} estimated_hours_work_min {orderby estimated_hours_work_min} estimated_hours_work_max {orderby estimated_hours_work_max} - default_value one_line,desc + } \ - -orderby_name orderby_tasks \ -bulk_actions { "Edit" "process-task-add-edit" "Edit tasks" "Delete" "process-task-delete" "Delete tasks" @@ -100,6 +146,7 @@ narrow } \ -filters { + process_id {} } \ -html { width 100%