Index: openacs-4/contrib/packages/simulation/lib/cases-admin.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/lib/Attic/cases-admin.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/simulation/lib/cases-admin.adp 8 Jan 2004 11:23:34 -0000 1.1
@@ -0,0 +1 @@
+
Index: openacs-4/contrib/packages/simulation/lib/cases-admin.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/lib/Attic/cases-admin.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/contrib/packages/simulation/lib/cases-admin.tcl 8 Jan 2004 11:23:34 -0000 1.1
@@ -0,0 +1,47 @@
+simulation::include_contract {
+ Displays a list of cases for the specified user.
+
+ @author Joel Aufrecht
+ @creation-date 2003-11-12
+ @cvs-id $Id: cases-admin.tcl,v 1.1 2004/01/08 11:23:34 joela Exp $
+} {
+ party_id {
+ default_value ""
+ }
+}
+
+# TODO: add link to simplay/case for each case
+set package_id [ad_conn package_id]
+set user_id [auth::get_user_id]
+
+set elements {
+ label {
+ label "Case"
+ orderby upper(w.pretty_name)
+ link_url_eval {[export_vars -base [ad_conn package_url]simplay/case { case_id }]}
+ }
+ pretty_name {
+ label "Simulation"
+ orderby upper(w.pretty_name)
+ }
+}
+
+template::list::create \
+ -name cases \
+ -multirow cases \
+ -no_data "You are not administering any active simulation cases." \
+ -elements $elements
+
+db_multirow cases select_cases "
+ select distinct wc.case_id,
+ sc.label,
+ w.pretty_name
+ from workflow_cases wc,
+ sim_cases sc,
+ workflows w,
+ acs_objects ao
+ where wc.workflow_id = w.workflow_id
+ and sc.sim_case_id = wc.object_id
+ and w.workflow_id = ao.object_id
+ and ao.creation_user = :user_id
+"
Index: openacs-4/packages/simulation/lib/cases-admin.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/lib/cases-admin.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/simulation/lib/cases-admin.adp 8 Jan 2004 11:23:34 -0000 1.1
@@ -0,0 +1 @@
+
Index: openacs-4/packages/simulation/lib/cases-admin.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/lib/cases-admin.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/simulation/lib/cases-admin.tcl 8 Jan 2004 11:23:34 -0000 1.1
@@ -0,0 +1,47 @@
+simulation::include_contract {
+ Displays a list of cases for the specified user.
+
+ @author Joel Aufrecht
+ @creation-date 2003-11-12
+ @cvs-id $Id: cases-admin.tcl,v 1.1 2004/01/08 11:23:34 joela Exp $
+} {
+ party_id {
+ default_value ""
+ }
+}
+
+# TODO: add link to simplay/case for each case
+set package_id [ad_conn package_id]
+set user_id [auth::get_user_id]
+
+set elements {
+ label {
+ label "Case"
+ orderby upper(w.pretty_name)
+ link_url_eval {[export_vars -base [ad_conn package_url]simplay/case { case_id }]}
+ }
+ pretty_name {
+ label "Simulation"
+ orderby upper(w.pretty_name)
+ }
+}
+
+template::list::create \
+ -name cases \
+ -multirow cases \
+ -no_data "You are not administering any active simulation cases." \
+ -elements $elements
+
+db_multirow cases select_cases "
+ select distinct wc.case_id,
+ sc.label,
+ w.pretty_name
+ from workflow_cases wc,
+ sim_cases sc,
+ workflows w,
+ acs_objects ao
+ where wc.workflow_id = w.workflow_id
+ and sc.sim_case_id = wc.object_id
+ and w.workflow_id = ao.object_id
+ and ao.creation_user = :user_id
+"