Index: openacs-4/packages/simulation/www/simulation-master.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/simulation/www/simulation-master.tcl,v diff -u -N -r1.10 -r1.11 --- openacs-4/packages/simulation/www/simulation-master.tcl 12 Jan 2004 16:04:22 -0000 1.10 +++ openacs-4/packages/simulation/www/simulation-master.tcl 16 Jan 2004 15:44:52 -0000 1.11 @@ -63,45 +63,47 @@ # ###################################################################### -# TODO (.25h): kill link bar for players +if { !$citybuild_p && !$simbuild_p && !$siminst_p && !$admin_p } { + set subnavbar_link {} +} else { + if { $citybuild_p } { + lappend subnavbar_list [list "${base_url}citybuild" "CityBuild"] + } -if { $citybuild_p } { - lappend subnavbar_list [list "${base_url}citybuild" "CityBuild"] -} + if { $simbuild_p } { + lappend subnavbar_list [list "${base_url}simbuild" "SimBuild"] + } -if { $simbuild_p } { - lappend subnavbar_list [list "${base_url}simbuild" "SimBuild"] -} + if { $siminst_p } { + lappend subnavbar_list [list "${base_url}siminst" "SimInst"] + } -if { $siminst_p } { - lappend subnavbar_list [list "${base_url}siminst" "SimInst"] -} + if { ![info exists header_stuff] } { + set header_stuff {} + } -if { ![info exists header_stuff] } { - set header_stuff {} -} + lappend subnavbar_list [list "${base_url}simplay" "SimPlay"] -lappend subnavbar_list [list "${base_url}simplay" "SimPlay"] + if { $admin_p } { + lappend subnavbar_list [list $parameters_url Configuration] + lappend subnavbar_list [list "/test/admin/index?by_package_key=simulation&view_by=testcase&quiet=0" Tests] + } -if { $admin_p } { - lappend subnavbar_list [list $parameters_url Configuration] - lappend subnavbar_list [list "/test/admin/index?by_package_key=simulation&view_by=testcase&quiet=0" Tests] -} + lappend subnavbar_list [list "/doc/simulation" "Doc"] -lappend subnavbar_list [list "/doc/simulation" "Doc"] - -# TODO B: should use ad_navbar -# couldn't figure out how to pass the input to ad_narbar so hacking it in here -# and also added context checking -set link_list "" -foreach arg $subnavbar_list { - lappend link_list "[lindex $arg 1]" -# removed context checking because people keep trying to use this navbar to -# get to the local parent, which context checking prevents -# if { [string match *[lindex $arg 0]* [ad_conn url]] } { -# lappend link_list "[lindex $arg 1]" -# } else { -# lappend link_list "[lindex $arg 1]" -# } + # TODO B: should use ad_navbar + # couldn't figure out how to pass the input to ad_narbar so hacking it in here + # and also added context checking + set link_list "" + foreach arg $subnavbar_list { + lappend link_list "[lindex $arg 1]" + # removed context checking because people keep trying to use this navbar to + # get to the local parent, which context checking prevents + # if { [string match *[lindex $arg 0]* [ad_conn url]] } { + # lappend link_list "[lindex $arg 1]" + # } else { + # lappend link_list "[lindex $arg 1]" + # } + } + set subnavbar_link "\[[join $link_list " | "]\]" } -set subnavbar_link "\[[join $link_list " | "]\]"