Index: openacs-4/packages/theme-selva/tcl/selva-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/theme-selva/tcl/selva-procs.tcl,v diff -u -r1.5.2.3 -r1.5.2.4 --- openacs-4/packages/theme-selva/tcl/selva-procs.tcl 4 May 2006 14:16:27 -0000 1.5.2.3 +++ openacs-4/packages/theme-selva/tcl/selva-procs.tcl 13 May 2006 22:34:09 -0000 1.5.2.4 @@ -31,7 +31,7 @@ ad_proc -public portal_navbar { } { - A helper procedure that generates the Subnavbar (above the portal navbar, ie the tabs) + A helper procedure that generates the Navbar, ie the tabs, for dotlrn. It is called from the selva-master template. } { set current_url [ad_conn url] @@ -73,16 +73,20 @@ set user_name {} } - set subnavbar "" + } ad_proc -public portal_subnavbar { @@ -118,7 +123,7 @@ {-pre_html ""} {-post_html ""} } { - A helper procedure that generates the PORTAL navbar (the thing + A helper procedure that generates the portal subnavbar (the thing with the portal pages on it) for dotlrn. It is called from the dotlrn-master template } { @@ -134,9 +139,10 @@ # else on the site set link "[dotlrn::get_url]/" - if {[dotlrn::user_p -user_id $user_id]} { + if {[dotlrn::user_p -user_id $user_id] && + ($link eq [ad_conn url] || "${link}index" eq [ad_conn url]) } { # this user is a dotlrn user, show their personal portal - # navbar, including the control panel link + # subnavbar, including the control panel link set portal_id [dotlrn::get_portal_id -user_id $user_id] set show_control_panel 1 } else { @@ -187,8 +193,8 @@ } } - #AG: This code belongs in the portal package, near portal::navbar. For display reasons we need to do this - #as a ul instead of a table, which portal::navbar returns. Obviously we shouldn't be letting display-level + #AG: This code belongs in the portal package, near portal::subnavbar. For display reasons we need to do this + #as a ul instead of a table, which portal::subnavbar returns. Obviously we shouldn't be letting display-level #stuff decide where we put our code, but first we'll need to mod the portal package accordingly. if { [catch {set page_num [ad_get_client_property dotlrn page_num]}] || $page_num eq "" || ![string is integer $page_num] } { @@ -199,34 +205,25 @@ regsub -all {[^0-9]} $page_num {} page_num } - set navbar "" }