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

albertel lon-capa-cvs@mail.lon-capa.org
Mon, 01 May 2006 21:03:36 -0000


albertel		Mon May  1 17:03:36 2006 EDT

  Modified files:              
    /loncom/interface	loncommon.pm 
  Log:
  - add ability to turn off inline link
  
  
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.360 loncom/interface/loncommon.pm:1.361
--- loncom/interface/loncommon.pm:1.360	Mon May  1 16:50:50 2006
+++ loncom/interface/loncommon.pm	Mon May  1 17:03:35 2006
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.360 2006/05/01 20:50:50 albertel Exp $
+# $Id: loncommon.pm,v 1.361 2006/05/01 21:03:35 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -2773,6 +2773,9 @@
 
 =item * $notitle, if true keep the nav controls, but remove the title bar
 
+=item * $no_inline_link, if true and in remote mode, don't show the 
+         'Switch To Inline Menu' link
+
 
 =back
 
@@ -2785,7 +2788,7 @@
 
 sub bodytag {
     my ($title,$function,$addentries,$bodyonly,$domain,$forcereg,$customtitle,
-	$notopbar,$bgcolor,$notitle)=@_;
+	$notopbar,$bgcolor,$notitle,$no_inline_link)=@_;
 
     $title=&mt($title);
 
@@ -2845,12 +2848,13 @@
     $env{'environment.middlename'}
     $env{'environment.lastname'}
     $env{'environment.generation'}
+     
 </div>
 <div class="LC_title_bar_role">
-$role
+$role&nbsp;
 </div>
 <div class="LC_title_bar_realm">
-$realm
+$realm&nbsp;
 </div>
 </td>
 ENDROLE
@@ -2932,7 +2936,8 @@
         $lonhttpdPort.$img.'" alt="'.$function.'" />';
 
     # Explicit link to get inline menu
-    my $menu='<br /><a href="/adm/remote?action=collapse">'.&mt('Switch to Inline Menu Mode').'</a>';
+    my $menu= ($no_inline_link?''
+	       :'<br /><a href="/adm/remote?action=collapse">'.&mt('Switch to Inline Menu Mode').'</a>');
     #
     if ($notitle) {
 	return $bodytag;
@@ -3451,6 +3456,9 @@
                                     head -> skip the <html><head> generation
                                     body -> skip all <body> generation
 
+                  no_inline_link -> if true and in remote mode, don't show the 
+                                    'Switch To Inline Menu' link
+
 =back
 
 =cut
@@ -3486,7 +3494,7 @@
 			 $args->{'only_body'},      $args->{'domain'},
 			 $args->{'force_register'}, $args->{'body_title'},
 			 $args->{'no_nav_bar'},     $args->{'bgcolor'},
-			 $args->{'no_title'});
+			 $args->{'no_title'},       $args->{'no_inline_link'});
 	}
     }