Index: openacs-4/packages/simulation/www/siminst/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/siminst/index.tcl,v diff -u -r1.33 -r1.34 --- openacs-4/packages/simulation/www/siminst/index.tcl 23 Jan 2004 14:31:36 -0000 1.33 +++ openacs-4/packages/simulation/www/siminst/index.tcl 30 Nov 2004 21:09:17 -0000 1.34 @@ -1,15 +1,21 @@ ad_page_contract { The index page for SimInst +} { + ds_orderby:optional + cs_orderby:optional } set page_title "SimInst" set context [list $page_title] set package_id [ad_conn package_id] set user_id [ad_conn user_id] +set package_uri [apm_package_url_from_id $package_id] +set help_url "${package_uri}object/[parameter::get -package_id $package_id -parameter SimInstHelpFile]" + permission::require_permission -object_id $package_id -privilege sim_inst set admin_p [permission::permission_p -object_id $package_id -privilege admin] -set base_url [apm_package_url_from_id $package_id] +set base_url $package_uri #--------------------------------------------------------------------- # dev_sims: simulations in development @@ -18,9 +24,9 @@ template::list::create \ -name dev_sims \ -multirow dev_sims \ - -actions "{New Simulation From Template} simulation-new" \ -no_data "No Simulations are in Development" \ -sub_class "narrow" \ + -orderby_name ds_orderby \ -elements { edit { sub_class narrow @@ -42,14 +48,6 @@ display_template {@dev_sims.description;noquote@} } - copy { - sub_class narrow - display_template { - Copy - } - link_url_col clone_url - link_html { title "Clone this template" } - } delete { sub_class narrow link_url_col delete_url @@ -93,6 +91,7 @@ and ao.object_id = w.workflow_id and ss.sim_type = 'dev_sim' $sim_in_dev_filter_sql + [template::list::orderby_clause -orderby -name "dev_sims"] " { set description [ad_html_text_convert -from $description_mime_type -maxlen 200 -- $description] @@ -120,18 +119,11 @@ -name casting_sims \ -multirow casting_sims \ -no_data "No Simulations are in Casting" \ + -orderby_name cs_orderby \ -elements { - edit { - sub_class narrow - link_url_eval {[export_vars -base wizard { workflow_id }]} - display_template { - Edit - } - } pretty_name { label "Simulation" orderby upper(w.pretty_name) - link_url_eval {[export_vars -base wizard { workflow_id }]} } n_users { label "Users enrolled" @@ -143,6 +135,7 @@ } case_start { label "Start date" + orderby case_start } start_now { label "Start" @@ -151,12 +144,6 @@ Start immediately } } - copy { - sub_class narrow - display_template { - Copy - } - } delete { sub_class narrow link_url_col delete_url @@ -197,6 +184,7 @@ and ao.object_id = w.workflow_id and ss.sim_type = 'casting_sim' $sim_in_dev_filter_sql + [template::list::orderby_clause -orderby -name "casting_sims"] " { set delete_url [export_vars -base "${base_url}siminst/simulation-delete" { workflow_id }] set start_url [export_vars -base "simulation-start" { workflow_id }]