Index: openacs-4/contrib/obsolete-packages/acs-workflow/www/admin/define-transition-info.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/contrib/obsolete-packages/acs-workflow/www/admin/define-transition-info.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/contrib/obsolete-packages/acs-workflow/www/admin/define-transition-info.tcl 13 Mar 2001 22:59:27 -0000 1.1 +++ openacs-4/contrib/obsolete-packages/acs-workflow/www/admin/define-transition-info.tcl 19 Nov 2001 18:29:28 -0000 1.2 @@ -9,6 +9,7 @@ # mode # format # return_url +# modifiable_p (optional) # Returns: # workflow_key # transition:onerow(transition_key, transition_name, arc_add_url, arc_delete_url, edit_url, delete_url) @@ -18,16 +19,25 @@ set workflow_key $workflow(workflow_key) +if { ![info exists modifiable_p] } { + set modifiable_p 1 +} # transition:onerow(transition_key, transition_name, arc_add_url, arc_delete_url, edit_url, delete_url) set transition(transition_key) $transition_key set transition(transition_name) $workflow(transition,$transition_key,transition_name) -set transition(arc_add_url) "define?[export_ns_set_vars {url} {mode}]&mode=arcadd" -set transition(arc_delete_url) "define?[export_ns_set_vars {url} {mode}]&mode=arcdelete" set transition(edit_url) "task-edit?[export_url_vars workflow_key transition_key return_url]" -set transition(delete_url) "task-delete?[export_url_vars workflow_key transition_key return_url]" -set transition(panels_url) "task-panels?[export_vars -url {workflow_key transition_key return_url}]" +if { $modifiable_p } { + set transition(delete_url) "task-delete?[export_url_vars workflow_key transition_key return_url]" + set transition(arc_add_url) "define?[export_ns_set_vars {url} {mode}]&mode=arcadd" + set transition(arc_delete_url) "define?[export_ns_set_vars {url} {mode}]&mode=arcdelete" +} else { + set transition(delete_url) "" + set transition(arc_add_url) "" + set transition(arc_delete_url) "" +} +#set transition(panels_url) "task-panels?[export_vars -url {workflow_key transition_key return_url}]" set transition(assignment_url) "task-assignment?[export_vars -url {workflow_key transition_key return_url}]" set transition(attributes_url) "task-attributes?[export_vars -url {workflow_key transition_key return_url}]" set transition(actions_url) "task-actions?[export_vars -url {workflow_key transition_key return_url}]" @@ -39,7 +49,11 @@ set direction "in" foreach loop_place_key $workflow(arcs,transition,$transition_key,in) { set url "define?[export_url_vars workflow_key place_key=[ns_urlencode $loop_place_key] format]" - set arc_delete_url "arc-delete?[export_url_vars workflow_key transition_key place_key=[ns_urlencode $loop_place_key] direction return_url]" + if { $modifiable_p } { + set arc_delete_url "arc-delete?[export_url_vars workflow_key transition_key place_key=[ns_urlencode $loop_place_key] direction return_url]" + } else { + set arc_delete_url "" + } template::multirow append input_places $loop_place_key $workflow(place,$loop_place_key,place_name) $url $arc_delete_url } @@ -52,7 +66,11 @@ set direction "out" foreach loop_place_key $workflow(arcs,transition,$transition_key,out) { set url "define?[export_url_vars workflow_key place_key=[ns_urlencode $loop_place_key] format]" - set arc_delete_url "arc-delete?[export_url_vars workflow_key transition_key place_key=[ns_urlencode $loop_place_key] direction return_url]" + if { $modifiable_p } { + set arc_delete_url "arc-delete?[export_url_vars workflow_key transition_key place_key=[ns_urlencode $loop_place_key] direction return_url]" + } else { + set arc_delete_url "" + } set guard_pretty [ad_decode $workflow(arc,$transition_key,$loop_place_key,out,guard_description) \ "" $workflow(arc,$transition_key,$loop_place_key,out,guard_callback) \ $workflow(arc,$transition_key,$loop_place_key,out,guard_description)]