--- loncom/interface/loncommon.pm	2009/07/08 07:51:01	1.851
+++ loncom/interface/loncommon.pm	2009/07/09 17:17:49	1.855
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # a pile of common routines
 #
-# $Id: loncommon.pm,v 1.851 2009/07/08 07:51:01 tempelho Exp $
+# $Id: loncommon.pm,v 1.855 2009/07/09 17:17:49 bisitz Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -3871,8 +3871,41 @@ sub build_block_table {
     }
     $output .= &end_data_table();
 }
-
 sub blocking_status {
+  my $blocked = blocking_status_print(@_);
+  my ($activity,$uname,$udom) = @_;
+  if(!wantarray) {
+    return $blocked;
+  }
+  my $output;
+  my $querystring;
+  $querystring = "?activity=$activity";
+  if(defined($uname)) { 
+    $querystring .= "&uname=$uname";
+  }if(defined($udom)) {
+    $querystring .= "&udom=$udom";
+  }
+
+      $output .= <<"END_MYBLOCK";
+<script type="text/javascript">
+// <![CDATA[
+    function openWindow(url, wdwName, w, h, toolbar,scrollbar) {
+        var options = "width=" + w + ",height=" + h + ",";
+        options += "resizable=yes,scrollbars="+scrollbar+",status=no,";
+        options += "menubar=no,toolbar="+toolbar+",location=no,directories=no";
+        var newWin = window.open(url, wdwName, options);
+        newWin.focus();
+    }
+
+// ]]>
+</script>
+END_MYBLOCK
+  my $popupUrl = "/adm/blockingstatus/$querystring";
+  $output.="\n<img src='/res/adm/pages/emblem-readonly.png' /><a onclick='openWindow(\"$popupUrl\",\"Blocking Table\",600,300,\"no\",\"no\");return false;' href='/adm/blockingstatus/$querystring'>Blocking Table</a>";
+
+  return ($blocked, $output);
+}
+sub blocking_status_print {
     my ($activity,$uname,$udom) = @_;
     my %setters;
     my ($blocked,$output,$ownitem,$is_course);
@@ -4394,6 +4427,9 @@ sub bodytag {
         $dc_info = '('.$dc_info.')';
     }
 
+    $role = "($role)" if $role;
+    &get_unprocessed_cgi($ENV{'QUERY_STRING'}, ['inhibitmenu']);
+
     if ($env{'environment.remote'} eq 'off') {
         # No Remote
 	if ($env{'request.state'} eq 'construct') {
@@ -4411,8 +4447,9 @@ sub bodytag {
 	if ($no_nav_bar) {
 	    $bodytag .= $titletable;
 	} else {
-        $bodytag .= qq|<div id="LC_nav_bar">$name ($role)<br />
-            <em>$realm</em> $dc_info</div>|;
+        $bodytag .= qq|<div id="LC_nav_bar">$name $role<br />
+            <em>$realm</em> $dc_info</div>| unless $env{'form.inhibitmenu'};
+
 	    if ($env{'request.state'} eq 'construct') {
                 $bodytag .= &Apache::lonmenu::menubuttons($forcereg,$forcereg,
 							  $titletable);
@@ -4436,7 +4473,12 @@ sub bodytag {
 
     # Explicit link to get inline menu
     my $menu= ($no_inline_link?''
-	       :'<br /><a href="/adm/remote?action=collapse">'.&mt('Switch to Inline Menu Mode').'</a>');
+	       :'<a href="/adm/remote?action=collapse">'.&mt('Switch to Inline Menu Mode').'</a>');
+    $bodytag .= qq|<div id="LC_nav_bar">$name $role
+            <em>$realm</em> $dc_info </div>
+            <ol class="LC_smallMenu LC_right">
+                <li>$menu</li>
+            </ol>| unless $env{'form.inhibitmenu'};
     #
     return(<<ENDBODY);
 $bodytag
@@ -5504,8 +5546,7 @@ table.LC_prior_match tr td {
   border: 1px solid #000000;
 }
 
-td.LC_nobreak,
-span.LC_nobreak {
+.LC_nobreak {
   white-space: nowrap;
 }
 
@@ -5842,7 +5883,7 @@ fieldset > legend {
 
 #LC_nav_bar {
     float: left;
-    margin: 0;
+    margin: 0.2em 0 0 0;
 }
 
 #LC_nav_bar em{
@@ -5852,9 +5893,10 @@ fieldset > legend {
 
 ol.LC_smallMenu {
     float: right;
+    margin: 0.2em 0 0 0;
 }
 
-ol.LC_smallMenu, ol#LC_PathBreadcrumbs {
+ol#LC_PathBreadcrumbs {
 	margin: 0;
 }
 
@@ -5881,12 +5923,10 @@ ul#LC_TabMainMenuContent {
     list-style: none;
     padding: 0;
     margin: 0;
-    float:left;
     width: 100%;
 }
 
 ul#LC_TabMainMenuContent li {
-    float: left;
     font-weight: bold;
     line-height: 1.8em;
     padding: 0 0.8em;