Index: openacs-4/packages/dotlrn/www/master.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/Attic/master.tcl,v
diff -u -r1.7 -r1.8
--- openacs-4/packages/dotlrn/www/master.tcl 23 Jan 2002 01:14:47 -0000 1.7
+++ openacs-4/packages/dotlrn/www/master.tcl 23 Jan 2002 05:03:16 -0000 1.8
@@ -2,22 +2,10 @@
# sloan specifc master
#
-# if we have a portal_id show navbar
-if {[info exists portal_id] && ![empty_string_p $portal_id] && ![exists_and_not_null no_navbar_p]} {
-# if {[portal::page_count -portal_id $portal_id] > 1} {
- set navbar "
"
- append navbar [portal::list_pages -portal_id $portal_id -link "switch-page" -pre_html " " -separator " | " -post_html " | "]
- append navbar "
"
-# } else {
-# set navbar ""
-# }
-} else {
- set navbar ""
- set portal_id ""
-}
+# if we have a portal_id show navbar
set user_id [ad_verify_and_get_user_id]
db_0or1row pvt_home_user_info {
@@ -32,11 +20,47 @@
if {[ad_parameter community_level_p] == 1} {
# in a community
set text [dotlrn_community::get_community_name [dotlrn_community::get_community_id]]
-
+
+ if {[info exists portal_id] && ![empty_string_p $portal_id] && ![exists_and_not_null no_navbar_p]} {
+ set navbar ""
+
+ append navbar [portal::list_pages -portal_id $portal_id -link "switch-page" -pre_html " " -separator " | " -post_html " | "]
+
+ append navbar "
"
+
+ } else {
+ set navbar ""
+ set portal_id ""
+ }
+
} elseif {[ad_parameter community_type_level_p] == 1} {
# in a community type
set text [dotlrn_community::get_community_type_name [dotlrn_community::get_community_type]]
+
+ if {[info exists portal_id] && ![empty_string_p $portal_id] && ![exists_and_not_null no_navbar_p]} {
+ set navbar ""
+
+ append navbar [portal::list_pages -portal_id $portal_id -link "switch-page" -pre_html " " -separator " | " -post_html " | "]
+
+ append navbar "
"
+
+ } else {
+ set navbar ""
+ set portal_id ""
+ }
+
} else {
# under /dotlrn
set text $full_name
+ if {[info exists portal_id] && ![empty_string_p $portal_id] && ![exists_and_not_null no_navbar_p]} {
+ set navbar ""
+
+ append navbar [portal::list_pages -portal_id $portal_id -link "switch-page" -pre_html "\n " -separator " | \n " -post_html " | \n"]
+
+ append navbar "Control Panel |
"
+
+ } else {
+ set navbar ""
+ set portal_id ""
+ }
}