--- loncom/interface/loncommon.pm 2013/05/12 11:25:47 1.1075.2.37 +++ loncom/interface/loncommon.pm 2013/05/26 22:44:02 1.1075.2.38 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.1075.2.37 2013/05/12 11:25:47 raeburn Exp $ +# $Id: loncommon.pm,v 1.1075.2.38 2013/05/26 22:44:02 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -5064,16 +5064,14 @@ sub bodytag { my $bodytag = "". &Apache::lontexconvert::init_math_support($args->{'inherit_jsmath'}); - if ($bodyonly) { + &get_unprocessed_cgi($ENV{'QUERY_STRING'}, ['inhibitmenu']); + + if (($bodyonly) || ($no_nav_bar) || ($env{'form.inhibitmenu'} eq 'yes')) { return $bodytag; - } + } - my $name = &plainname($env{'user.name'},$env{'user.domain'}); if ($public) { undef($role); - } else { - $name = &aboutmewrapper($name,$env{'user.name'},$env{'user.domain'}, - undef,'LC_menubuttons_link'); } my $titleinfo = '

'.$title.'

'; @@ -5089,14 +5087,11 @@ sub bodytag { } $role = '('.$role.')' if $role; - &get_unprocessed_cgi($ENV{'QUERY_STRING'}, ['inhibitmenu']); - - if ($no_nav_bar || $env{'form.inhibitmenu'} eq 'yes') { - return $bodytag; - } if ($env{'request.state'} eq 'construct') { $forcereg=1; } + + my $funclist; if (($env{'environment.remote'} eq 'on') && ($env{'request.state'} ne 'construct')) { $bodytag .= Apache::lonhtmlcommon::scripttag(Apache::lonmenu::utilityfunctions(), 'start')."\n". @@ -5115,25 +5110,25 @@ sub bodytag { # $titleinfo = &CSTR_pageheader(); #FIXME: Will be removed once all scripts have their own calls # } + $bodytag .= Apache::lonhtmlcommon::scripttag( + Apache::lonmenu::utilityfunctions(), 'start'); + my ($left,$right) = Apache::lonmenu::primary_menu(); if ($env{'request.noversionuri'} =~ m{^/res/adm/pages/}) { if ($dc_info) { $dc_info = qq|$dc_info|; } - $bodytag .= qq|
$name $role
+ $bodytag .= qq|
$left $role
$realm $dc_info
|; return $bodytag; } unless ($env{'request.symb'} =~ m/\.page___\d+___/) { - $bodytag .= qq|
$name $role
|; + $bodytag .= qq|
$left $role
|; } - $bodytag .= Apache::lonhtmlcommon::scripttag( - Apache::lonmenu::utilityfunctions(), 'start'); - - $bodytag .= Apache::lonmenu::primary_menu(); + $bodytag .= $right; if ($dc_info) { $dc_info = &dc_courseid_toggle($dc_info); @@ -5189,9 +5184,15 @@ sub bodytag { $dc_info = qq|($dc_info)|; } + my $name = &plainname($env{'user.name'},$env{'user.domain'}); + unless ($public) { + $name = &aboutmewrapper($name,$env{'user.name'},$env{'user.domain'}, + undef,'LC_menubuttons_link'); + } + unless ($env{'form.inhibitmenu'}) { $bodytag .= qq|
$name $role
-
    +
    1. $menu
    $realm $dc_info
    |; } @@ -5381,6 +5382,14 @@ form, .inline { vertical-align:middle; } +.LC_floatleft { + float: left; +} + +.LC_floatright { + float: right; +} + .LC_400Box { width:400px; } @@ -6470,6 +6479,7 @@ div.LC_createcourse { } .LC_dccid { + float: right; margin: 0.2em 0 0 0; padding: 0; font-size: 90%; @@ -6567,7 +6577,6 @@ fieldset > legend { } ol.LC_primary_menu { - float: right; margin: 0; padding: 0; background-color: $pgbg_or_bgcolor; @@ -11805,7 +11814,7 @@ sub get_folder_hierarchy { my @pcs = split(/,/,$pcslist); foreach my $pc (@pcs) { if ($pc == 1) { - push(@pathitems,&mt('Main Course Documents')); + push(@pathitems,&mt('Main Content')); } else { my $res = $navmap->getByMapPc($pc); if (ref($res)) { @@ -11820,7 +11829,7 @@ sub get_folder_hierarchy { } if ($showitem) { if ($mapres->{ID} eq '0.0') { - push(@pathitems,&mt('Main Course Documents')); + push(@pathitems,&mt('Main Content')); } else { my $maptitle = $mapres->compTitle(); $maptitle =~ s/\W+/_/g; @@ -14381,7 +14390,7 @@ sub symb_to_docspath { $path =~ s/^\&//; my $maptitle = $mapresobj->title(); if ($mapurl eq 'default') { - $maptitle = 'Main Course Documents'; + $maptitle = 'Main Content'; } $path .= (($path ne '')? '&' : ''). &Apache::lonhtmlcommon::entity_encode($mapurl).'&'. @@ -14395,14 +14404,14 @@ sub symb_to_docspath { my $maptitle = &Apache::lonnet::gettitle($mapurl); my $ispage = (($type eq 'page')? 1 : ''); if ($mapurl eq 'default') { - $maptitle = 'Main Course Documents'; + $maptitle = 'Main Content'; } $path = &Apache::lonhtmlcommon::entity_encode($mapurl).'&'. &Apache::lonhtmlcommon::entity_encode($maptitle).':::::'.$ispage; } unless ($mapurl eq 'default') { $path = 'default&'. - &Apache::lonhtmlcommon::entity_encode('Main Course Documents'). + &Apache::lonhtmlcommon::entity_encode('Main Content'). ':::::&'.$path; } return $path;