Index: openacs-4/contrib/packages/project-manager/www/task-one.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/task-one.tcl,v diff -u -r1.24.2.1 -r1.24.2.2 --- openacs-4/contrib/packages/project-manager/www/task-one.tcl 20 May 2004 17:30:05 -0000 1.24.2.1 +++ openacs-4/contrib/packages/project-manager/www/task-one.tcl 2 Jul 2004 23:13:49 -0000 1.24.2.2 @@ -18,11 +18,14 @@ @param context_bar value for context bar creation @param orderby_dependency specifies how the dependencies will be sorted @param orderby_dependency2 specifies how the dependencies will be sorted (for tasks that have dependencies on this task) + @param logger_days The number of days back to view logged entries } { task_id:integer,optional task_revision_id:integer,optional orderby_dependency:optional orderby_dependency2:optional + {logger_variable_id:integer ""} + {logger_days:integer "30"} } -properties { closed_message:onevalue notification_chunk:onevalue @@ -62,6 +65,11 @@ } } } + logger_days_positive { + if {$logger_days < 1} { + set logger_days 1 + } + } } -errors { task_id_exists {That task does not exist} revision_id_exists {That task does not exist} @@ -81,8 +89,9 @@ # the unique identifier for this package -set package_id [ad_conn package_id] -set user_id [ad_maybe_redirect_for_registration] +set package_id [ad_conn package_id] +set package_url [ad_conn package_url] +set user_id [ad_maybe_redirect_for_registration] # permissions @@ -97,6 +106,12 @@ db_1row task_query { } -column_array task_info +# 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"] + # we do this for the hours include portion set project_item_id $task_info(project_item_id) @@ -121,11 +136,12 @@ } + # set link to comments set comments [general_comments_get_comments -print_content_p 1 -print_attachments_p 1 $task_id "[ad_conn url]?task_id=$task_id"] -set comments_link [general_comments_create_link -object_name "$task_term: $task_info(task_title)" -link_text "Add a comment" -context_id $package_id $task_id "[ad_conn url]?task_id=$task_id"] +set comments_link "Add comment" set print_link "task-print?&task_id=$task_id&project_item_id=$task_info(project_item_id)" @@ -138,12 +154,28 @@ set logger_project [pm::project::get_logger_project \ -project_item_id $task_info(project_item_id)] -set logger_variable_id [logger::variable::get_default_variable_id] -set log_url "[ad_conn package_url]log?project_id=$logger_project&pm_project_id=$task_info(project_item_id)&pm_task_id=$task_id" +set logger_url [pm::util::logger_url] -set log_note "Task logged time listed below" +if {[empty_string_p $logger_variable_id]} { + set logger_variable_id [logger::variable::get_default_variable_id] +} +set log_url [export_vars -base "${logger_url}log" {{return_url $return_url} {project_id $logger_project} {pm_project_id $task_info(project_item_id)} {pm_task_id $task_id}}] + +set today_ansi [clock format [clock scan today] -format "%Y-%m-%d"] +set then_ansi [clock format [clock scan "-$logger_days days"] -format "%Y-%m-%d"] + +set day_widget "Last Days" + +set variable_widget [logger::ui::variable_select_widget \ + -project_id $logger_project \ + -current_variable_id $logger_variable_id \ + -select_name logger_variable_id] + +set variable_exports [export_vars -form -entire_form -exclude {logger_variable_id logger_days }] + + # ------------------ # Notifications info # ------------------ @@ -389,3 +421,4 @@ ad_return_template # ------------------------- END OF FILE ------------------------- # +