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.27 -r1.28
--- openacs-4/contrib/packages/project-manager/www/one.tcl 11 Dec 2003 21:39:44 -0000 1.27
+++ openacs-4/contrib/packages/project-manager/www/one.tcl 26 Jan 2004 15:39:40 -0000 1.28
@@ -37,12 +37,14 @@
write_p:onevalue
create_p:onevalue
versions:multirow
+ custom:multirow
parent_task_id:onevalue
task_type:onevalue
project_id:onevalue
use_goal_p:onevalue
use_project_code_p:onevalue
use_uncertain_completion_times_P:onevalue
+ use_project_customizations_p:onevalue
} -validate {
project_item_id_exists {
if {![exists_and_not_null project_item_id]} {
@@ -56,6 +58,8 @@
}
}
+set original_project_id $project_id
+
# --------------------------------------------------------------- #
# the unique identifier for this package
@@ -68,6 +72,7 @@
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"]
# permissions
permission::require_permission -party_id $user_id -object_id $package_id -privilege read
@@ -109,34 +114,29 @@
set work_display_template "@tasks.estimated_hours_work@ h"
}
+set process_link "process-use?project_item_id=$project_item_id"
+
template::list::create \
-name tasks \
-multirow tasks \
-key task_id \
-elements {
+ task_id {
+ label "ID"
+ }
title {
label "Subject"
display_col title
- link_url_col item_url
- link_html { title "View this task" }
display_template {
- @tasks.title@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ @tasks.title@
}
}
+ parent_task_id {
+ label "Dep"
+ display_template {
+ @tasks.parent_task_id@
+ }
+ }
slack_time {
label "Slack"
display_template "@tasks.slack_time@"
@@ -167,7 +167,7 @@
}
} \
- -actions [list "Use process" [export_vars -base process-use {project_item_id}] "Use a process"] \
+ -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"]\
-bulk_actions {
"Edit" "task-add-edit" "Edit tasks"
} \
@@ -190,7 +190,6 @@
earliest_start {orderby earliest_start}
earliest_finish {orderby earliest_finish}
latest_start {orderby latest_start}
- slack_time {orderby slack_time}
latest_finish {orderby latest_finish}
default_value latest_start,asc
} \
@@ -199,14 +198,25 @@
}
-db_multirow -extend { item_url earliest_start_pretty earliest_finish_pretty latest_start_pretty latest_finish_pretty} tasks project_tasks_query {
+db_multirow -extend { item_url earliest_start_pretty earliest_finish_pretty latest_start_pretty latest_finish_pretty slack_time} tasks project_tasks_query {
} {
set item_url [export_vars -base "task-one" { revision_id task_id}]
set earliest_start_pretty [lc_time_fmt $earliest_start "%x"]
set earliest_finish_pretty [lc_time_fmt $earliest_finish "%x"]
set latest_start_pretty [lc_time_fmt $latest_start "%x"]
set latest_finish_pretty [lc_time_fmt $latest_finish "%x"]
+
+ if {[exists_and_not_null earliest_start_j]} {
+ if {$earliest_start_j < $today_j} {
+ set slack_time "[expr $latest_start_j - $today_j] days"
+ } else {
+ set slack_time "[expr $latest_start_j - $earliest_start_j] days"
+ }
+ } else {
+ set slack_time "n/a"
+ }
+
}
@@ -344,7 +354,15 @@
}
+# -------------------------CUSTOMIZATIONS--------------------------
+# If there are customizations, put them in a multirow called custom
+# -----------------------------------------------------------------
-ad_return_template
+db_1row custom_query { } -column_array custom
+# end of customizations
+
+
+
+ad_return_template
# ------------------------- END OF FILE ------------------------- #