--- loncom/interface/lonmenu.pm 2003/04/04 22:00:26 1.57
+++ loncom/interface/lonmenu.pm 2003/04/05 22:14:40 1.58
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Routines to control the menu
#
-# $Id: lonmenu.pm,v 1.57 2003/04/04 22:00:26 www Exp $
+# $Id: lonmenu.pm,v 1.58 2003/04/05 22:14:40 www Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -46,6 +46,9 @@ use Apache::loncommon;
use Apache::File;
use vars qw(@desklines $readdesk);
my @inlineremote;
+my $font;
+my $tabbg;
+my $pgbg;
# ============================= This gets called at the top of the body section
@@ -77,26 +80,57 @@ ENDMAINMENU
return $output."
";
} elsif ($ENV{'environment.remote'} eq 'off') {
# Remote Control is switched off
+# figure out colors
+ my $function='student';
+ if ($ENV{'request.role'}=~/^(cc|in|ta|ep)/) {
+ $function='coordinator';
+ }
+ if ($ENV{'request.role'}=~/^(su|dc|ad|li)/) {
+ $function='admin';
+ }
+ if (($ENV{'request.role'}=~/^(au|ca)/) ||
+ ($ENV{'REQUEST_URI'}=~/^(\/priv|\~)/)) {
+ $function='author';
+ }
+ my $domain=&Apache::loncommon::determinedomain();
+ $pgbg=&Apache::loncommon::designparm($function.'.pgbg',$domain);
+ $tabbg=&Apache::loncommon::designparm($function.'.tabbg',$domain);
+ $font=&Apache::loncommon::designparm($function.'.font',$domain);
+ my $link=&Apache::loncommon::designparm($function.'.link',$domain);
+ my $alink=&Apache::loncommon::designparm($function.'.alink',$domain);
+ my $vlink=&Apache::loncommon::designparm($function.'.vlink',$domain);
+ my $sidebg=&Apache::loncommon::designparm($function.'.sidebg',$domain);
+# Do we have a NAV link?
if ($ENV{'request.course.id'}) {
$navmaps=(<Navigate Contents
+
+Navigate Contents |
ENDNAVREM
}
- my $output=(<
// BEGIN LON-CAPA Internal
-
-Main Menu
+
+$reg
ENDINLINEMENU
- if ($registration) { $output.=&innerregister($forcereg,$target); }
- return $output." |
";
} else {
return '';
}
@@ -156,6 +190,8 @@ sub innerregister {
'swmenu.setstatus("you have","messages");');
}
my $timesync=($textual?'':'swmenu.syncclock(1000*'.time.');');
+ my $tablestart=($noremote?'':'');
+ my $tableend=($noremote?'
':'');
# =============================================================================
# ============================ This is for URLs that actually can be registered
if (($ENV{'REQUEST_URI'}!~/^\/(res\/)*adm\//) || ($forcereg)) {
@@ -240,7 +276,7 @@ sub innerregister {
my $menuitems=(<
$timesync
$newmail
+$tablestart
$inlinebuttons
+$tableend
$form