Index: openacs-4/contrib/packages/simulation/www/siminst/map-tasks.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/siminst/Attic/map-tasks.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/contrib/packages/simulation/www/siminst/map-tasks.tcl 28 Nov 2003 16:55:52 -0000 1.2 +++ openacs-4/contrib/packages/simulation/www/siminst/map-tasks.tcl 15 Dec 2003 15:28:21 -0000 1.3 @@ -6,6 +6,45 @@ workflow_id:integer } -set page_title "Map to Tasks" +workflow::get -workflow_id $workflow_id -array workflow_array +set page_title "Tasks for $workflow_array(pretty_name)" set context [list [list "." "SimInst" ] $page_title] +db_multirow -extend { description_html } tasks select_taks { + select a.action_id, + a.short_name, + a.pretty_name, + a.description, + a.description_mime_type, + st.attachment_num, + (select count(*) + from sim_task_object_map stom + where stom.task_id = st.task_id) as prop_not_empty_count + from workflow_actions a, + sim_tasks st + where a.workflow_id = :workflow_id + and st.task_id = a.action_id +} { + set description_html [ad_html_text_convert -maxlen 100 -from $description_mime_type -- $description] +} + +# TODO: Honor description_mime_type, fancy truncate + +template::list::create \ + -name "tasks" \ + -elements { + pretty_name { + label "Name" + link_url_eval {[export_vars -base task-edit { action_id }]} + } + description { + label "Description" + display_template {@tasks.description_html;noquote@} + } + attachment_num { + label "Number of attachments" + } + prop_not_empty_count { + label "Number of attachments populated" + } + }