Index: openacs-4/packages/project-manager/lib/tasks.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/lib/tasks.tcl,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/project-manager/lib/tasks.tcl 30 Jul 2005 00:26:33 -0000 1.8
+++ openacs-4/packages/project-manager/lib/tasks.tcl 4 Aug 2005 09:50:08 -0000 1.9
@@ -225,7 +225,7 @@
}
status_type {
label "[_ project-manager.Done_1]"
- display_template {
+ display_template {
}
}
title {
@@ -309,11 +309,9 @@
hide_p {[ad_decode [exists_and_not_null project_item_id] 1 1 0]}
}
log_url {
- label "[_ project-manager.Log]"
display_template {L}
}
edit_url {
- label "[_ acs-kernel.common_Edit]"
display_template {E}
}
percent_complete {
@@ -393,7 +391,7 @@
}
}
-db_multirow -extend {item_url earliest_start_pretty earliest_finish_pretty end_date_pretty latest_start_pretty latest_finish_pretty slack_time edit_url log_url hours_remaining days_remaining actual_days_worked my_user_id user_url base_url} tasks tasks {} {
+db_multirow -extend {item_url earliest_start_pretty earliest_finish_pretty end_date_pretty latest_start_pretty latest_finish_pretty slack_time edit_url log_url hours_remaining days_remaining actual_days_worked my_user_id user_url base_url task_close_url} tasks tasks {} {
set item_url [export_vars \
-base "task-one" {{task_id $task_item_id}}]
@@ -404,6 +402,12 @@
set edit_url [export_vars \
-base "task-add-edit" {{task_id $task_item_id} project_item_id return_url}]
+ if {[parameter::get -parameter "UseDayInsteadOfHour"] == "f"} {
+ set fmt "%x %X"
+ } else {
+ set fmt "%x"
+ }
+
set earliest_start_pretty [lc_time_fmt $earliest_start $fmt]
set earliest_finish_pretty [lc_time_fmt $earliest_finish $fmt]
set latest_start_pretty [lc_time_fmt $latest_start $fmt]
@@ -448,6 +452,7 @@
acs_object::get -object_id $task_item_id -array task_array
set base_url [lindex [site_node::get_url_from_object_id -object_id $task_array(package_id)] 0]
+ set task_close_url [export_vars -base "${base_url}task-close" -url {task_item_id return_url}]
}
# ------------------------- END OF FILE -------------------------
Index: openacs-4/packages/project-manager/www/task-close.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/project-manager/www/task-close.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/project-manager/www/task-close.tcl 4 Aug 2005 09:50:08 -0000 1.1
@@ -0,0 +1,25 @@
+# packages/project-manager/www/task-close.tcl
+
+ad_page_contract {
+
+ Close a task and return to the return_url
+
+ @author Malte Sussdorff (sussdorff@sussdorff.de)
+ @creation-date 2005-08-04
+ @arch-tag: 86200b55-362f-4190-af76-c796abe986c8
+ @cvs-id $Id: task-close.tcl,v 1.1 2005/08/04 09:50:08 maltes Exp $
+} {
+ task_item_id
+ return_url
+} -properties {
+} -validate {
+} -errors {
+}
+
+pm::task::close -task_item_id $task_item_id
+set revision_id [pm::task::get_revision_id -task_item_id $task_item_id]
+db_dml complete_task "update pm_tasks_revisions set percent_complete = '100' where task_revision_id = :revision_id"
+ad_returnredirect $return_url
+
+
+