Index: openacs-4/packages/dotlrn/tcl/navigation-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/navigation-procs.tcl,v
diff -u -r1.23.2.1 -r1.23.2.1.4.1
--- openacs-4/packages/dotlrn/tcl/navigation-procs.tcl 26 Nov 2003 12:36:27 -0000 1.23.2.1
+++ openacs-4/packages/dotlrn/tcl/navigation-procs.tcl 24 Nov 2004 16:00:14 -0000 1.23.2.1.4.1
@@ -190,7 +190,8 @@
with the portal pages on it) for dotlrn. It is called from the
dotlrn-master template
} {
-
+
+ set navbar "
"
set dotlrn_url [dotlrn::get_url]
set community_id [dotlrn_community::get_community_id]
set control_panel_name control-panel
@@ -224,6 +225,9 @@
set link [dotlrn_community::get_community_url $community_id]
set control_panel_url "$link/$control_panel_name"
+ # add the my space tab, which isn't part of the class portal but is super useful for the end user
+ append navbar "
"
+
# figure out what this privs this user has on the community
set admin_p [dotlrn::user_can_admin_community_p \
-user_id $user_id \
@@ -254,36 +258,44 @@
}
}
+ #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
+ #stuff decide where we put our code, but first we'll need to mod the portal package accordingly.
+
+ set page_num [ns_queryget page_num]
+ #Strip out extra anchors and other crud.
+ #page_num will be empty_string for special pages like
+ #My Space and Control Panel
+ regsub -all {[^0-9]} $page_num {} page_num
+
+ db_foreach list_page_nums_select {} {
+ if { ("$dotlrn_url/" == [ad_conn url] || "$dotlrn_url/index" == [ad_conn url]) && $sort_key == 0 && $page_num == ""} {
+ # active tab is first tab and page_num may be ""
+ append navbar "