Index: openacs-4/contrib/packages/simulation/www/siminst/sim-tasks.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/siminst/Attic/sim-tasks.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/packages/simulation/www/siminst/sim-tasks.tcl 12 Dec 2003 11:22:20 -0000 1.1 +++ openacs-4/contrib/packages/simulation/www/siminst/sim-tasks.tcl 12 Dec 2003 15:40:32 -0000 1.2 @@ -17,15 +17,49 @@ # # tasks # -# a form showing description for all tasks in a sim +# a list showing description for all tasks in a sim # -# TODO: display mode doesn't exist yet - all display is through edit mode -# ###################################################################### #--------------------------------------------------------------------- # tasks form #--------------------------------------------------------------------- +template::list::create \ + -name tasks \ + -multirow tasks \ + -no_data "No tasks in this Simulation" \ + -elements { + pretty_name { + link_url_col task_url + label "Task" + orderby upper(w.pretty_name) + } + } +#------------------------------------------------------------- +# tasks db_multirow +#------------------------------------------------------------- +db_multirow -extend { task_url } tasks tasks_sql " + select wa.action_id, + wa.pretty_name, + wa.assigned_role, + (select pretty_name + from workflow_roles + where role_id = wa.assigned_role) as assigned_name, + (select pretty_name + from workflow_roles + where role_id = st.recipient) as recipient_name, + wa.sort_order + from workflow_actions wa, + sim_tasks st + where wa.workflow_id = :workflow_id + and st.task_id = wa.action_id + order by wa.sort_order +" { + set task_url [export_vars -base "[apm_package_url_from_id $package_id]siminst/task-edit" { action_id }] +} + + +