Index: openacs-4/packages/simulation/lib/sim-template-states.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/lib/sim-template-states.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/simulation/lib/sim-template-states.adp 9 Jan 2004 10:53:06 -0000 1.1
@@ -0,0 +1,3 @@
+
+
+
Index: openacs-4/packages/simulation/lib/sim-template-states.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/lib/sim-template-states.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/simulation/lib/sim-template-states.tcl 9 Jan 2004 10:53:06 -0000 1.1
@@ -0,0 +1,59 @@
+simulation::include_contract {
+ A list of all states associated with the Simulation Template
+
+ @author Peter Marklund
+ @creation-date 2003-11-12
+ @cvs-id $Id: sim-template-states.tcl,v 1.1 2004/01/09 10:53:06 peterm Exp $
+} {
+ workflow_id {}
+}
+
+set package_id [ad_conn package_id]
+
+#-------------------------------------------------------------
+# states list
+#-------------------------------------------------------------
+
+set actions [list "Add a State" [export_vars -base state-edit { workflow_id}] {}]
+
+template::list::create \
+ -name states \
+ -multirow states \
+ -no_data "No states in this Simulation Template" \
+ -actions $actions \
+ -elements {
+ edit {
+ sub_class narrow
+ link_url_col edit_url
+ display_template {
+

+ }
+ }
+ name {
+ label "Name"
+ display_col pretty_name
+ link_url_col edit_url
+ }
+ delete {
+ sub_class narrow
+ display_template {
+
+
+
+ }
+ }
+ }
+#-------------------------------------------------------------
+# states db_multirow
+#-------------------------------------------------------------
+set return_url "[ad_conn url]?[ad_conn query]"
+db_multirow -extend { edit_url char_url delete_url } states select_states "
+ select ws.state_id,
+ ws.pretty_name
+ from workflow_fsm_states ws
+ where ws.workflow_id = :workflow_id
+ order by ws.sort_order
+" {
+ set edit_url [export_vars -base "[ad_conn package_url]simbuild/state-edit" { state_id }]
+ set delete_url [export_vars -base "[ad_conn package_url]simbuild/state-delete" { state_id return_url }]
+}
Index: openacs-4/packages/simulation/lib/sim-template-tasks.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/lib/sim-template-tasks.tcl,v
diff -u -r1.25 -r1.26
--- openacs-4/packages/simulation/lib/sim-template-tasks.tcl 9 Jan 2004 10:28:00 -0000 1.25
+++ openacs-4/packages/simulation/lib/sim-template-tasks.tcl 9 Jan 2004 10:53:06 -0000 1.26
@@ -37,8 +37,7 @@
# how is type going to work? open question pending prototyping
if { $display_mode == "edit"} {
- set list_actions [list "Add a State" [export_vars -base state-edit { workflow_id}] {}]
- lappend list_actions "Add a Task" [export_vars -base task-edit {workflow_id} ] {}
+ set list_actions [list "Add a Task" [export_vars -base task-edit {workflow_id} ] {}]
} else {
set list_actions [list]
}
Index: openacs-4/packages/simulation/www/simbuild/task-edit.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/simbuild/task-edit.tcl,v
diff -u -r1.22 -r1.23
--- openacs-4/packages/simulation/www/simbuild/task-edit.tcl 9 Jan 2004 10:28:00 -0000 1.22
+++ openacs-4/packages/simulation/www/simbuild/task-edit.tcl 9 Jan 2004 10:53:07 -0000 1.23
@@ -296,7 +296,7 @@
set operation "update"
} -after_submit {
-
+
set action_id [simulation::action::edit \
-operation $operation \
-workflow_id $workflow_id \
Index: openacs-4/packages/simulation/www/simbuild/template-edit.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/simbuild/template-edit.adp,v
diff -u -r1.18 -r1.19
--- openacs-4/packages/simulation/www/simbuild/template-edit.adp 8 Jan 2004 11:03:02 -0000 1.18
+++ openacs-4/packages/simulation/www/simbuild/template-edit.adp 9 Jan 2004 10:53:07 -0000 1.19
@@ -32,8 +32,15 @@