[LON-CAPA-cvs] cvs: loncom(version_2_11_X) /interface loncommon.pm

raeburn raeburn at source.lon-capa.org
Sun May 26 18:44:02 EDT 2013


raeburn		Sun May 26 22:44:02 2013 EDT

  Modified files:              (Branch: version_2_11_X)
    /loncom/interface	loncommon.pm 
  Log:
  - For 2.11
    - Backport 1.1129, 1.1130, 1.1131
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.1075.2.37 loncom/interface/loncommon.pm:1.1075.2.38
--- loncom/interface/loncommon.pm:1.1075.2.37	Sun May 12 11:25:47 2013
+++ loncom/interface/loncommon.pm	Sun May 26 22:44:02 2013
@@ -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 @@
     my $bodytag = "<body $extra_body_attr>".
 	&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 = '<h1>'.$title.'</h1>';
@@ -5089,14 +5087,11 @@
     }
 
     $role = '<span class="LC_nobreak">('.$role.')</span>' 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 @@
         #        $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|<span class="LC_cusr_subheading">$dc_info</span>|;
             }
-            $bodytag .= qq|<div id="LC_nav_bar">$name $role<br />
+            $bodytag .= qq|<div id="LC_nav_bar">$left $role<br />
                            <em>$realm</em> $dc_info</div>|;
             return $bodytag;
         }
 
         unless ($env{'request.symb'} =~ m/\.page___\d+___/) {
-            $bodytag .= qq|<div id="LC_nav_bar">$name $role</div>|;
+            $bodytag .= qq|<div id="LC_nav_bar">$left $role</div>|;
         }
 
-        $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 @@
         $dc_info = qq|<span class="LC_cusr_subheading">($dc_info)</span>|;
     }
 
+    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|<div id="LC_nav_bar">$name $role</div>
-                       <ol class="LC_primary_menu LC_right">
+                       <ol class="LC_primary_menu LC_floatright LC_right">
                        <li>$menu</li>
                        </ol><div id="LC_realm"> $realm $dc_info</div>|;
     }
@@ -5381,6 +5382,14 @@
   vertical-align:middle;
 }
 
+.LC_floatleft {
+  float: left;
+}
+
+.LC_floatright {
+  float: right;
+}
+
 .LC_400Box {
   width:400px;
 }
@@ -6470,6 +6479,7 @@
 }
 
 .LC_dccid {
+  float: right;
   margin: 0.2em 0 0 0;
   padding: 0;
   font-size: 90%;
@@ -6567,7 +6577,6 @@
 }
 
 ol.LC_primary_menu {
-  float: right;
   margin: 0;
   padding: 0;
   background-color: $pgbg_or_bgcolor;
@@ -11805,7 +11814,7 @@
                 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 @@
             }
             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 @@
         $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 @@
         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;




More information about the LON-CAPA-cvs mailing list