--- loncom/interface/loncommon.pm 2009/11/18 11:18:23 1.915
+++ loncom/interface/loncommon.pm 2009/11/23 14:04:36 1.918
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.915 2009/11/18 11:18:23 droeschl Exp $
+# $Id: loncommon.pm,v 1.918 2009/11/23 14:04:36 wenzelju Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -4503,9 +4503,8 @@ sub bodytag {
$env{'course.'.$env{'request.course.id'}.
'.domain'}.'/'})) {
my $cid = $env{'request.course.id'};
- $dc_info.= $cid.' '.$env{'course.'.$cid.'.internal.coursecode'};
+ $dc_info = $cid.' '.$env{'course.'.$cid.'.internal.coursecode'};
$dc_info =~ s/\s+$//;
- $dc_info = '('.$dc_info.')';
}
$role = '('.$role.')' if $role;
@@ -4513,7 +4512,9 @@ sub bodytag {
if ($env{'environment.remote'} eq 'off') {
# No Remote
- if ($no_nav_bar) { return $bodytag; }
+ if ($no_nav_bar || $env{'form.inhibitmenu'} eq 'yes') {
+ return $bodytag;
+ }
if ($env{'request.state'} eq 'construct') { $forcereg=1; }
@@ -4521,21 +4522,29 @@ sub bodytag {
# $titleinfo = &CSTR_pageheader(); #FIXME: Will be removed once all scripts have their own calls
# }
- $bodytag .= qq|
$name $role
- $realm $dc_info
| unless $env{'form.inhibitmenu'};
- if ( $env{'form.inhibitmenu'} eq 'yes'
- || $ENV{'REQUEST_URI'} eq '/adm/logout'
- || $env{'request.noversionuri'} =~ m{^/res/adm/pages/}) {
+ if ($env{'request.noversionuri'} =~ m{^/res/adm/pages/}) {
+ if ($dc_info) {
+ $dc_info = qq|$dc_info|;
+ }
+ $bodytag .= qq|$name $role
+ $realm $dc_info
|;
return $bodytag;
}
+ $bodytag .= qq|$name $role
|;
+
$bodytag .= Apache::lonhtmlcommon::scripttag(
Apache::lonmenu::utilityfunctions(), 'start');
$bodytag .= Apache::lonmenu::primary_menu();
+ if ($dc_info) {
+ $dc_info = &dc_courseid_toggle($dc_info);
+ }
+ $bodytag .= qq|$realm $dc_info
|;
+
#don't show menus for public users
if($env{'user.name'} ne 'public' && $env{'user.domain'} ne 'public'){
$bodytag .= Apache::lonmenu::secondary_menu();
@@ -4567,12 +4576,15 @@ sub bodytag {
# Explicit link to get inline menu
my $menu= ($no_inline_link?''
:''.&mt('Switch to Inline Menu Mode').'');
- $bodytag .= qq|$name $role
- $realm $dc_info
+
+ if ($dc_info) {
+ $dc_info = qq|($dc_info)|;
+ }
+
+ $bodytag .= qq|$name $role
| unless $env{'form.inhibitmenu'};
- #
+ $realm $dc_info
| unless $env{'form.inhibitmenu'};
return(<
@@ -4585,6 +4597,14 @@ $bodytag
ENDBODY
}
+sub dc_courseid_toggle {
+ my ($dc_info) = @_;
+ return ' '.
+ ''.
+ &mt('(More ...)').''.
+ ''.$dc_info.'
';
+}
+
sub make_attr_string {
my ($register,$attr_ref) = @_;
@@ -5207,6 +5227,7 @@ table.LC_createuser tr.LC_info_row td {
table.LC_calendar {
border: 1px solid #000000;
border-collapse: collapse;
+ width: 98%;
}
table.LC_calendar_pickdate {
@@ -5216,6 +5237,7 @@ table.LC_calendar_pickdate {
table.LC_calendar tr td {
border: 1px solid #000000;
vertical-align: top;
+ width: 14%;
}
table.LC_calendar tr td.LC_calendar_day_empty {
@@ -5519,15 +5541,17 @@ table.LC_notify_front_page td {
.LC_topic_bar {
font-weight: bold;
- width: 100%;
background: $tabbg;
- vertical-align: middle;
- margin: 2ex 0ex 2ex 0ex;
+ margin: 1em 0em 1em 2em;
padding: 3px;
+ font-size: 1.2em;
}
.LC_topic_bar span {
+ left: 0.5em;
+ position: absolute;
vertical-align: middle;
+ font-size: 1.2em;
}
.LC_topic_bar img {
@@ -5913,6 +5937,13 @@ div.LC_createcourse {
margin: 10px 10px 10px 10px;
}
+.LC_dccid {
+ margin: 0.2em 0 0 0;
+ padding: 0;
+ font-size: 90%;
+ display:none;
+}
+
/* ---- Remove when done ----
# The following styles is part of the redesign of LON-CAPA and are
# subject to change during this project.
@@ -6003,6 +6034,13 @@ fieldset > legend {
margin: 0.2em 0 0 0;
}
+#LC_realm {
+ margin: 0.2em 0 0 0;
+ padding: 0;
+ font-weight: bold;
+ text-align: center;
+}
+
#LC_nav_bar em {
font-weight: bold;
font-style: normal;