Index: openacs-4/contrib/packages/project-manager/www/one.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/project-manager/www/Attic/one.tcl,v diff -u -r1.26.2.8 -r1.26.2.9 --- openacs-4/contrib/packages/project-manager/www/one.tcl 27 Feb 2004 22:46:13 -0000 1.26.2.8 +++ openacs-4/contrib/packages/project-manager/www/one.tcl 6 Mar 2004 00:29:24 -0000 1.26.2.9 @@ -1,11 +1,12 @@ ad_page_contract { - Main view page for one project. + Main view page for one project. Also shows logged time, and allows a + user to log time @author jader@bread.com, ncarroll@ee.usyd.edu.au @creation-date 2003-05-15 @cvs-id $Id$ - @return context_bar Context bar. + @return context Context bar. @return versions a multirow holding versions of the project @return live_revision the project_id of the live_revision @@ -30,7 +31,7 @@ } -properties { categories:onelist - context_bar:onevalue + context:onevalue project:multirow tasks:multirow people:multirow @@ -45,15 +46,20 @@ use_project_code_p:onevalue use_uncertain_completion_times_P:onevalue use_project_customizations_p:onevalue + task_term:onevalue + then_ansi:onevalue + edit_url:onevalue } -validate { project_item_id_exists { if {![exists_and_not_null project_item_id]} { - set project_item_id [db_string get_item_id { }] + set project_item_id [pm::project::get_project_item_id \ + -project_id $project_id] } } project_id_exists { if {![exists_and_not_null project_id]} { - set project_id [db_string get_project_id { }] + set project_id [pm::project::get_project_id \ + -project_item_id $project_item_id] } } } @@ -66,11 +72,13 @@ set package_id [ad_conn package_id] set user_id [ad_maybe_redirect_for_registration] + # terminology set project_term [parameter::get -parameter "ProjectName" -default "Project"] set project_term_lower [parameter::get -parameter "projectname" -default "project"] -set use_goal_p [parameter::get -parameter "UseGoalP" -default "1"] -set use_project_code_p [parameter::get -parameter "UseUserProjectCodesP" -default "1"] +set task_term [parameter::get -parameter "TaskName" -default "Task"] +set use_goal_p [parameter::get -parameter "UseGoalP" -default "1"] +set use_project_code_p [parameter::get -parameter "UseUserProjectCodesP" -default "1"] set use_uncertain_completion_times_p [parameter::get -parameter "UseUncertainCompletionTimesP" -default "1"] set use_project_customizations_p [parameter::get -parameter "UseProjectCustomizationsP" -default "0"] @@ -80,9 +88,9 @@ set write_p [permission::permission_p -object_id $package_id -privilege write] set create_p [permission::permission_p -object_id $package_id -privilege create] + # categories - set categories [list] set cat_list [category::get_mapped_categories $project_item_id] foreach cat $cat_list { @@ -97,13 +105,25 @@ set project(estimated_finish_date) [lc_time_fmt $project(estimated_finish_date) "%x"] set project(earliest_finish_date) [lc_time_fmt $project(earliest_finish_date) "%x"] set project(latest_finish_date) [lc_time_fmt $project(latest_finish_date) "%x"] +set project(logger_variable_id) [logger::variable::get_default_variable_id] +set log_url "[ad_conn package_url]log?project_id=$project(logger_project)&pm_project_id=$project_item_id" + +set then_ansi [db_string get_now_julian "select to_char(current_timestamp - '30 days'::INTERVAL,'YYYY-MM-DD')"] + + +set log_note "Last 30 days" + + + +set edit_url "[ad_conn package_url]add-edit?[export_url_vars project_item_id]" + # set up context bar, needs parent_id if {[string equal $project(parent_id) $project_root]} { - set context_bar [ad_context_bar "View"] + set context [list "View"] } else { - set context_bar [ad_context_bar [list "one?project_item_id=$project(parent_id)" "Parent"] "View"] + set context [list [list "one?project_item_id=$project(parent_id)" "Parent"] "View"] } # Tasks, using list-builder --------------------------------- @@ -165,7 +185,9 @@ } } \ - -actions [list "Use process" $process_link "Use a process" "Projects" "index" "View list of tasks" "Tasks" "tasks" "View tasks for all projects" "Processes" "processes" "View and use processes" "Admin" "admin/" "Administration pages"]\ + -actions { + "Use process" $process_link "Use a process" + } \ -bulk_actions { "Edit" "task-add-edit" "Edit tasks" } \ @@ -174,7 +196,7 @@ project_id {my_key 1} } \ - -main_class { + -sub_class { narrow } \ -filters { @@ -232,7 +254,7 @@ label "Hours completed" } } \ - -main_class { + -sub_class { narrow } \ -filters { @@ -275,7 +297,7 @@ label "Role" } } \ - -main_class { + -sub_class { narrow } \ -filters { @@ -323,7 +345,7 @@ label "Deadline" } } \ - -main_class { + -sub_class { narrow } \ -filters { @@ -356,9 +378,17 @@ db_1row custom_query { } -column_array custom +set custom(item_code_issued) [lc_time_fmt $custom(item_code_issued) "%x"] + # end of customizations +# ----------------------------------------------------------------- +# Logger forms and so on - shows time logged, and allows you to log +# other time +# ----------------------------------------------------------------- + + ad_return_template # ------------------------- END OF FILE ------------------------- #