Index: openacs-4/packages/theme-zen/tcl/navigation-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/theme-zen/tcl/navigation-procs.tcl,v diff -u -N -r1.8 -r1.9 --- openacs-4/packages/theme-zen/tcl/navigation-procs.tcl 19 Jun 2018 13:35:53 -0000 1.8 +++ openacs-4/packages/theme-zen/tcl/navigation-procs.tcl 19 Jun 2018 13:45:23 -0000 1.9 @@ -30,7 +30,7 @@ namespace eval zen { ad_proc -public portal_navbar { - + } { A helper procedure that generates the Navbar, ie the tabs, for dotlrn. It is called from the zen-master template. @@ -51,11 +51,11 @@ set pvt_home_url [ad_pvt_home] set pvt_home_name [_ acs-subsite.Your_Account] set logout_url [ad_get_logout_url] - + # Site-wide admin link set admin_url {} set dotlrn_admin_url "" - + set sw_admin_p [acs_user::site_wide_admin_p -user_id $untrusted_user_id] set dotlrn_admin_p [permission::permission_p \ -party_id $user_id \ @@ -64,7 +64,7 @@ if { $dotlrn_admin_p } { set dotlrn_admin_url [dotlrn::get_admin_url] } - + if { $sw_admin_p } { set admin_url "/acs-admin/" set locale_admin_url "/acs-lang/admin" @@ -73,7 +73,7 @@ -object_id [subsite::get_element -element object_id] \ -privilege admin \ -party_id $untrusted_user_id] - + if { $subsite_admin_p } { set admin_url "[subsite::get_element -element url]admin/" } @@ -82,7 +82,7 @@ set login_url [ad_get_login_url -return] set user_name {} } - + set navbar "" } @@ -188,18 +188,18 @@ with the portal pages on it) for dotlrn. It is called from the dotlrn-master template } { - + set dotlrn_url [dotlrn::get_url] set community_id [dotlrn_community::get_community_id] set control_panel_name control-panel set control_panel_url "$dotlrn_url/$control_panel_name" - + if { $community_id eq "" } { # We are not under a dotlrn community. However we could be # under /dotlrn (i.e. in the user's portal) or anywhere # else on the site set link "[dotlrn::get_url]/" - + if {[dotlrn::user_p -user_id $user_id] && [ad_get_client_property dotlrn home_tab_selected_p] } { # this user is a dotlrn user, we've selected the home tab, @@ -216,9 +216,9 @@ # # We are under a dotlrn community. Get the community's portal_id, etc. # - + # some defaults - set text [dotlrn_community::get_community_header_name $community_id] + set text [dotlrn_community::get_community_header_name $community_id] set control_panel_name one-community-admin # link is important : it sets the options_set value, which will be used later to select the current page set link [dotlrn_community::get_community_url $community_id] @@ -229,7 +229,7 @@ -user_id $user_id \ -community_id $community_id ] - + if {!$admin_p} { # the user can't admin this community, perhaps they are a # humble member instead? @@ -240,9 +240,9 @@ # explicitly turned off set show_control_panel 1 } - + if {$admin_p || $member_p} { - + set portal_id [dotlrn_community::get_portal_id \ -community_id $community_id ] @@ -254,7 +254,7 @@ } } - #AG: This code belongs in the portal package, near portal::subnavbar. For display reasons we need to do this + #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. @@ -268,38 +268,38 @@ #My Space and Control Panel regsub -all {[^0-9]} $page_num {} page_num } - - + + set subnavbar "" db_foreach list_page_nums_select {} { if {$page_num eq $sort_key} { append subnavbar [subst { - - }] + + }] } else { append subnavbar [subst { -
  • - $pretty_name -
  • - }] +
  • + $pretty_name +
  • + }] } - } + } - if { $community_id ne "" && $admin_p } { + if { $community_id ne "" && $admin_p } { if {[string match "*/one-community-admin*" [ad_conn url]]} { append subnavbar [subst { - - }] + + }] } else { append subnavbar [subst { -
  • - [_ dotlrn.Admin] -
  • - }] +
  • + [_ dotlrn.Admin] +
  • + }] } }