Index: openacs-4/contrib/packages/simulation/www/simplay/case-admin.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/simplay/Attic/case-admin.adp,v diff -u -r1.6 -r1.7 --- openacs-4/contrib/packages/simulation/www/simplay/case-admin.adp 27 Jan 2004 12:48:39 -0000 1.6 +++ openacs-4/contrib/packages/simulation/www/simplay/case-admin.adp 27 Jan 2004 15:30:07 -0000 1.7 @@ -2,16 +2,13 @@ @title;noquote@ @context;noquote@ - @assigned_filter;noquote@ + + +

-

- -

+ +

Add users in uncast role

- -

Add users in uncast role

- -

- -

-
+ +

+
Index: openacs-4/contrib/packages/simulation/www/simplay/case-admin.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/simplay/Attic/case-admin.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/contrib/packages/simulation/www/simplay/case-admin.tcl 27 Jan 2004 12:48:39 -0000 1.7 +++ openacs-4/contrib/packages/simulation/www/simplay/case-admin.tcl 27 Jan 2004 15:30:07 -0000 1.8 @@ -19,40 +19,50 @@ set elements { role { label "Role" + link_url_eval {[export_vars -base case { case_id role_id }]} } role_action { display_template { Add user to role } } user_name { - label "User" - display_template { - @roles.user_name@   Move remove - } - } - max_n_users { - label "Target # users" - } + label "User" } - -if { $assigned_only_p } { - lappend elements assigned_action { - label "Assigned action" + user_actions { + label "" + display_template { + Move user Remove user } + } + max_n_users { + label "Target # users" + } + assigned_action { + label "Assigned action" + hide_p {[expr !$assigned_only_p]} + } } -if { $assigned_only_p } { - set assigned_filter "Show all roles" -} else { - set assigned_filter "Show only roles with assigned actions" -} - template::list::create \ -name roles \ -multirow roles \ -no_data "There are no roles or users in this simulation case" \ - -elements $elements + -elements $elements \ + -pass_properties { case_id } \ + -filters { + assigned_only_p { + label "Display" + values { + {"All" 0} + {"Roles with actions only" 1} + } + default_value 0 + } + case_id { + hide_p 1 + } + } # Set clauses for the assigned only filter set select_clause "" Index: openacs-4/contrib/packages/simulation/www/simplay/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/simplay/Attic/index.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/contrib/packages/simulation/www/simplay/index.tcl 23 Jan 2004 15:14:01 -0000 1.9 +++ openacs-4/contrib/packages/simulation/www/simplay/index.tcl 27 Jan 2004 15:30:07 -0000 1.10 @@ -21,7 +21,9 @@ and wc.case_id = wcrpm.case_id }] -if { [llength $case_list] == 1 } { +if { !$adminplayer_p && [llength $case_list] == 1 } { set case_id [lindex [lindex $case_list 0] 0] set role_id [lindex [lindex $case_list 0] 1] + ad_returnredirect [export_vars -base case { case_id role_id }] + ad_script_abort } Index: openacs-4/contrib/packages/simulation/www/simplay/task-detail.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/packages/simulation/www/simplay/Attic/task-detail.tcl,v diff -u -r1.15 -r1.16 --- openacs-4/contrib/packages/simulation/www/simplay/task-detail.tcl 23 Jan 2004 13:18:44 -0000 1.15 +++ openacs-4/contrib/packages/simulation/www/simplay/task-detail.tcl 27 Jan 2004 15:30:07 -0000 1.16 @@ -17,8 +17,6 @@ set page_title $action(pretty_name) set context [list [list . "SimPlay"] [list [export_vars -base case { case_id role_id }] "Case"] [list [export_vars -base tasks { case_id role_id }] "Tasks"] $page_title] -set action(recipients) [list 110 111] - if { ![empty_string_p $action(recipients)] } { # We have recipient roles - use message form Index: openacs-4/packages/simulation/www/simplay/case-admin.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/simplay/case-admin.adp,v diff -u -r1.6 -r1.7 --- openacs-4/packages/simulation/www/simplay/case-admin.adp 27 Jan 2004 12:48:39 -0000 1.6 +++ openacs-4/packages/simulation/www/simplay/case-admin.adp 27 Jan 2004 15:30:07 -0000 1.7 @@ -2,16 +2,13 @@ @title;noquote@ @context;noquote@ - @assigned_filter;noquote@ + + +

-

- -

+ +

Add users in uncast role

- -

Add users in uncast role

- -

- -

-
+ +

+
Index: openacs-4/packages/simulation/www/simplay/case-admin.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/simplay/case-admin.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/simulation/www/simplay/case-admin.tcl 27 Jan 2004 12:48:39 -0000 1.7 +++ openacs-4/packages/simulation/www/simplay/case-admin.tcl 27 Jan 2004 15:30:07 -0000 1.8 @@ -19,40 +19,50 @@ set elements { role { label "Role" + link_url_eval {[export_vars -base case { case_id role_id }]} } role_action { display_template { Add user to role } } user_name { - label "User" - display_template { - @roles.user_name@   Move remove - } - } - max_n_users { - label "Target # users" - } + label "User" } - -if { $assigned_only_p } { - lappend elements assigned_action { - label "Assigned action" + user_actions { + label "" + display_template { + Move user Remove user } + } + max_n_users { + label "Target # users" + } + assigned_action { + label "Assigned action" + hide_p {[expr !$assigned_only_p]} + } } -if { $assigned_only_p } { - set assigned_filter "Show all roles" -} else { - set assigned_filter "Show only roles with assigned actions" -} - template::list::create \ -name roles \ -multirow roles \ -no_data "There are no roles or users in this simulation case" \ - -elements $elements + -elements $elements \ + -pass_properties { case_id } \ + -filters { + assigned_only_p { + label "Display" + values { + {"All" 0} + {"Roles with actions only" 1} + } + default_value 0 + } + case_id { + hide_p 1 + } + } # Set clauses for the assigned only filter set select_clause "" Index: openacs-4/packages/simulation/www/simplay/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/simplay/index.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/packages/simulation/www/simplay/index.tcl 23 Jan 2004 15:14:01 -0000 1.9 +++ openacs-4/packages/simulation/www/simplay/index.tcl 27 Jan 2004 15:30:07 -0000 1.10 @@ -21,7 +21,9 @@ and wc.case_id = wcrpm.case_id }] -if { [llength $case_list] == 1 } { +if { !$adminplayer_p && [llength $case_list] == 1 } { set case_id [lindex [lindex $case_list 0] 0] set role_id [lindex [lindex $case_list 0] 1] + ad_returnredirect [export_vars -base case { case_id role_id }] + ad_script_abort } 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.15 -r1.16 --- openacs-4/packages/simulation/www/simplay/task-detail.tcl 23 Jan 2004 13:18:44 -0000 1.15 +++ openacs-4/packages/simulation/www/simplay/task-detail.tcl 27 Jan 2004 15:30:07 -0000 1.16 @@ -17,8 +17,6 @@ set page_title $action(pretty_name) set context [list [list . "SimPlay"] [list [export_vars -base case { case_id role_id }] "Case"] [list [export_vars -base tasks { case_id role_id }] "Tasks"] $page_title] -set action(recipients) [list 110 111] - if { ![empty_string_p $action(recipients)] } { # We have recipient roles - use message form