Index: openacs-4/contrib/packages/project-manager/www/tasks.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/tasks.tcl,v diff -u -r1.5.2.19 -r1.5.2.20 --- openacs-4/contrib/packages/project-manager/www/tasks.tcl 25 Apr 2005 11:09:05 -0000 1.5.2.19 +++ openacs-4/contrib/packages/project-manager/www/tasks.tcl 25 Apr 2005 11:43:06 -0000 1.5.2.20 @@ -3,6 +3,7 @@ Main view page for tasks. @author jader@bread.com + @author openacs@sussdorff.de (MS) @creation-date 2003-12-03 @cvs-id $Id$ @@ -139,38 +140,58 @@ role { label "Role" } - latest_start_pretty { - label "Latest Start" - } - latest_finish_pretty { - label "Latest Finish" - display_template { - @tasks.latest_finish_pretty@ - } - } +} + +# MS: This assumes that the status of "2" will always be closed. +# It does not make sense to display the latest_start and finished times for already +# Closed tasks + +if {$status_id != 2} { + append elements { + latest_start_pretty { + label "Latest Start" + } + latest_finish_pretty { + label "Latest Finish" + display_template { + @tasks.latest_finish_pretty@ + } + } + } +} + +append elements { status { label "Status" } } -if {[string is true $use_days_p]} { - append elements { - days_remaining { - label "Days work" - html { +# MS: This assumes that the status of "2" will always be closed. +# It does not make sense to display the remaining hours for +# Closed tasks + +if {$status_id != 2} { + + if {[string is true $use_days_p]} { + append elements { + days_remaining { + label "Days work" + html { + align right + } + } + } + } else { + append elements { + hours_remaining { + label "Hours remaining" + html { align right - } - } + } + } + } } -} else { - append elements { - hours_remaining { - label "Hours remaining" - html { - align right - } - } - } + } if {[string is true $use_days_p]} { @@ -198,6 +219,7 @@ label "Project" display_col project_name link_url_eval {[export_vars -base one {project_item_id $tasks(project_item_id)}]} + hide_p {[ad_decode [exists_and_not_null project_item_id] 1 1 0]} } log_url { label "Log"