Index: openacs-4/packages/simulation/www/simplay/task-detail.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/simplay/task-detail.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/simulation/www/simplay/task-detail.tcl 19 Dec 2003 14:00:39 -0000 1.3
+++ openacs-4/packages/simulation/www/simplay/task-detail.tcl 19 Dec 2003 14:22:53 -0000 1.4
@@ -8,10 +8,11 @@
workflow::case::enabled_action_get -enabled_action_id $enabled_action_id -array enabled_action
-simulation::action::get -action_id $enabled_action(action_id) -array action
-
set case_id $enabled_action(case_id)
+set action_id $enabled_action(action_id)
+simulation::action::get -action_id $action_id -array action
+
set title "Task"
set context [list [list . "SimPlay"] [list [export_vars -base case { case_id }] "Case"] [list [export_vars -base tasks { case_id }] "Tasks"] $title]
@@ -47,8 +48,25 @@
} -on_request {
set pretty_name $action(pretty_name)
set description [template::util::richtext::create $action(description) $action(description_mime_type)]
- set document "TODO"
+ set documents {}
+ db_foreach documents {
+ select cr.title as object_title,
+ ci.name as object_name
+ from sim_task_object_map m,
+ cr_items ci,
+ cr_revisions cr
+ where m.task_id = :action_id
+ and m.relation_tag = 'attachment'
+ and ci.item_id = m.object_id
+ and cr.revision_id = ci.live_revision
+ order by m.order_n
+ } {
+ set object_url [simulation::object::url \
+ -name $object_name]
+ append documents "$object_title
"
+ }
+
set recipient_name [simulation::role::get_element -role_id $action(recipient) -element pretty_name]
set sender_name [simulation::role::get_element -role_id $action(assigned_role_id) -element pretty_name]
}