Index: openacs-4/packages/project-manager/www/task-one.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/task-one.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/project-manager/www/task-one.tcl 27 Jul 2005 19:01:57 -0000 1.8 +++ openacs-4/packages/project-manager/www/task-one.tcl 28 Jul 2005 10:57:56 -0000 1.9 @@ -87,8 +87,9 @@ #set write_p [permission::permission_p -object_id $task_id -privilege "write"] #set create_p [permission::permission_p -object_id $task_id -privilege "create"] +# Master for the portlets +set portlet_master "/packages/project-manager/lib/portlet" - # terminology and other parameters set task_term [_ project-manager.Task] set task_term_lower [_ project-manager.task] @@ -97,8 +98,9 @@ set project_term [_ project-manager.Project] set use_uncertain_completion_times_p [parameter::get -parameter "UseUncertainCompletionTimesP" -default "1"] + set use_days_p [parameter::get -parameter "UseDayInsteadOfHour" -default "t"] -set urgency_threshold 8 + # the unique identifier for this package set package_id [ad_conn package_id] set package_url [ad_conn package_url] @@ -118,29 +120,6 @@ db_1row task_query { } -column_array task_info -# format the hours remaining section - -set task_info(hours_remaining) \ - [pm::task::hours_remaining \ - -estimated_hours_work $task_info(estimated_hours_work) \ - -estimated_hours_work_min $task_info(estimated_hours_work_min) \ - -estimated_hours_work_max $task_info(estimated_hours_work_max) \ - -percent_complete $task_info(percent_complete)] - -set task_info(days_remaining) \ - [pm::task::days_remaining \ - -estimated_hours_work $task_info(estimated_hours_work) \ - -estimated_hours_work_min $task_info(estimated_hours_work_min) \ - -estimated_hours_work_max $task_info(estimated_hours_work_max) \ - -percent_complete $task_info(percent_complete)] - -# format the dates according to the local settings -set task_info(earliest_start) [lc_time_fmt $task_info(earliest_start) "%x"] -set task_info(earliest_finish) [lc_time_fmt $task_info(earliest_finish) "%x"] -set task_info(latest_start) [lc_time_fmt $task_info(latest_start) "%x"] -set task_info(latest_finish) [lc_time_fmt $task_info(latest_finish) "%x"] -set task_info(end_date) [lc_time_fmt $task_info(end_date) "%x"] - # we do this for the hours include portion set project_item_id $task_info(project_item_id) @@ -178,15 +157,7 @@ set process_html "" } -# set link to comments -set comments [general_comments_get_comments -print_content_p 1 -print_attachments_p 1 $task_id "[pm::task::get_url $task_id]"] - -set comments_link "[_ project-manager.Add_comment]" - -set print_link "task-print?&task_id=$task_id&project_item_id=$task_info(project_item_id)" - - # how to get back here set return_url [ad_return_url] @@ -203,18 +174,8 @@ set log_url [export_vars -base "${logger_url}log" -url {{project_id $logger_project} {pm_project_id $task_info(project_item_id)} {pm_task_id $task_id} return_url}] -set assignee_add_self_widget "Add myself as
" -# Only need a 'remove myself' link if you are already assigned -set assigned_p [pm::task::assigned_p -task_item_id $task_id -party_id $user_id] -if {$assigned_p} { - set assignee_remove_self_url [export_vars -base task-assign-remove {{task_item_id $task_id} user_id return_url}] -} -# Set the link to the permissions page -set permissions_url "[site_node::closest_ancestor_package -package_key subsite]/permissions/one?[export_vars {{object_id $task_id}}]" - -set nextyear_ansi [clock format [clock scan "+ 365 day"] -format "%Y-%m-%d"] set then_ansi [clock format [clock scan "-$logger_days days"] -format "%Y-%m-%d"] set day_widget "[_ project-manager.Last] [_ project-manager.Days]" @@ -237,75 +198,7 @@ -url "[ad_conn url]?[ad_conn query]" \ ] -# ------------------ -# Dynamic Attributes -# ------------------ -set form_attributes [list] -foreach element [dtype::form::metadata::widgets_list -object_type pm_task -exclude_static_p 1 -dform $task_info(dform)] { - lappend form_attributes [lindex $element 3] -} - -dtype::get_object -object_id $task_revision_id -object_type pm_task -array dattr -exclude_static - -multirow create dynamic_attributes name value -foreach attr [array names dattr] { - if {[lsearch -exact $form_attributes $attr] > -1} { - multirow append dynamic_attributes "[_ acs-translations.pm_task_$attr]" $dattr($attr) - } -} - - -# People, using list-builder --------------------------------- - -template::list::create \ - -name people \ - -multirow people \ - -key item_id \ - -elements { - first_names { - label { - "[_ project-manager.Who]" - } - display_template { -