[LON-CAPA-cvs] cvs: loncom /homework structuretags.pm /interface loncommon.pm /publisher lonpubdir.pm /xml londefdef.pm

droeschl droeschl@source.lon-capa.org
Wed, 18 Nov 2009 20:48:14 -0000


droeschl		Wed Nov 18 20:48:14 2009 EDT

  Modified files:              
    /loncom/homework	structuretags.pm 
    /loncom/interface	loncommon.pm 
    /loncom/publisher	lonpubdir.pm 
    /loncom/xml	londefdef.pm 
  Log:
  - fixed an issue that caused wrong breadcrumb (and tools) behavior in construction space
  - course title is now centered at the top
  
  
Index: loncom/homework/structuretags.pm
diff -u loncom/homework/structuretags.pm:1.459 loncom/homework/structuretags.pm:1.460
--- loncom/homework/structuretags.pm:1.459	Mon Oct 19 21:16:30 2009
+++ loncom/homework/structuretags.pm	Wed Nov 18 20:47:52 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA 
 # definition of tags that give a structure to a document
 #
-# $Id: structuretags.pm,v 1.459 2009/10/19 21:16:30 bisitz Exp $
+# $Id: structuretags.pm,v 1.460 2009/11/18 20:47:52 droeschl Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -218,13 +218,15 @@
             'text'  => 'Construction Space',
             'href'  => &Apache::loncommon::authorspace(),
         });
+        # breadcrumbs (and tools) will be created 
+        # in start_page->bodytag->innerregister
+
 # FIXME Where are we?
 #        &Apache::lonhtmlcommon::add_breadcrumb({
 #            'text'  => 'Problem Editing', # 'Problem Testing'
 #            'href'  => '',
 #        });
-        $pageheader = &Apache::lonhtmlcommon::breadcrumbs()
-                     .&Apache::loncommon::head_subbox(
+        $pageheader =&Apache::loncommon::head_subbox(
                 &Apache::loncommon::CSTR_pageheader());
 	}
     } elsif (!defined($found{'body'})) {
Index: loncom/interface/loncommon.pm
diff -u loncom/interface/loncommon.pm:1.915 loncom/interface/loncommon.pm:1.916
--- loncom/interface/loncommon.pm:1.915	Wed Nov 18 11:18:23 2009
+++ loncom/interface/loncommon.pm	Wed Nov 18 20:47:59 2009
@@ -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.916 2009/11/18 20:47:59 droeschl Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -4513,7 +4513,9 @@
 
     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 +4523,23 @@
         #        $titleinfo = &CSTR_pageheader(); #FIXME: Will be removed once all scripts have their own calls
         #    }
 
-        $bodytag .= qq|<div id="LC_nav_bar">$name $role<br />
-            <em>$realm</em> $dc_info</div>| 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/}) {
+             $bodytag .= qq|<div id="LC_nav_bar">$name $role<br />
+                <em>$realm</em> $dc_info</div>|;
             return $bodytag;
         }
 
+        $bodytag .= qq|<div id="LC_nav_bar">$name $role</div>|;
+
         $bodytag .= Apache::lonhtmlcommon::scripttag(
             Apache::lonmenu::utilityfunctions(), 'start');
 
         $bodytag .= Apache::lonmenu::primary_menu();
 
+        $bodytag .= qq|<div id="LC_realm">$realm<br/>$dc_info</div>|;
+
         #don't show menus for public users
         if($env{'user.name'} ne 'public' && $env{'user.domain'} ne 'public'){
             $bodytag .= Apache::lonmenu::secondary_menu();
@@ -4567,11 +4571,10 @@
     # Explicit link to get inline menu
     my $menu= ($no_inline_link?''
 	       :'<a href="/adm/remote?action=collapse" target="_top">'.&mt('Switch to Inline Menu Mode').'</a>');
-    $bodytag .= qq|<div id="LC_nav_bar">$name $role
-            <em>$realm</em> $dc_info </div>
+    $bodytag .= qq|<div id="LC_nav_bar">$name $role</div>
             <ol class="LC_primary_menu LC_right">
                 <li>$menu</li>
-            </ol>| unless $env{'form.inhibitmenu'};
+            </ol><div id="LC_realm">$realm<br/>$dc_info</div>| unless $env{'form.inhibitmenu'};
     #
     return(<<ENDBODY);
 $bodytag
@@ -6003,6 +6006,13 @@
   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;
Index: loncom/publisher/lonpubdir.pm
diff -u loncom/publisher/lonpubdir.pm:1.124 loncom/publisher/lonpubdir.pm:1.125
--- loncom/publisher/lonpubdir.pm:1.124	Fri Nov  6 18:01:44 2009
+++ loncom/publisher/lonpubdir.pm	Wed Nov 18 20:48:06 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Construction Space Directory Lister
 #
-# $Id: lonpubdir.pm,v 1.124 2009/11/06 18:01:44 bisitz Exp $
+# $Id: lonpubdir.pm,v 1.125 2009/11/18 20:48:06 droeschl Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -201,6 +201,14 @@
     $formaction=~s|/+|/|g;
     &Apache::lonhtmlcommon::store_recent('construct',$formaction,$formaction);
 
+    &Apache::lonhtmlcommon::clear_breadcrumbs();
+    &Apache::lonhtmlcommon::add_breadcrumb({
+        'text'  => 'Construction Space',
+        'href'  => &Apache::loncommon::authorspace(),
+    });
+    # breadcrumbs (and tools) will be created 
+    # in start_page->bodytag->innerregister
+
     if ($env{'environment.remote'} eq 'off') {
         $env{'request.noversionuri'}=$currdir.'/';
         $r->print(&Apache::loncommon::start_page('Construction Space',undef));
@@ -209,15 +217,6 @@
                                                  { 'only_body' => 1,}));
     }
 
-    # Breadcrumbs
-    &Apache::lonhtmlcommon::clear_breadcrumbs();
-    &Apache::lonhtmlcommon::add_breadcrumb({
-        'text'  => 'Construction Space',
-        'href'  => &Apache::loncommon::authorspace(),
-    });
-
-    $r->print(&Apache::lonhtmlcommon::breadcrumbs());
-
     $r->print(&Apache::loncommon::head_subbox(
                 &Apache::loncommon::CSTR_pageheader(1)));
 
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.412 loncom/xml/londefdef.pm:1.413
--- loncom/xml/londefdef.pm:1.412	Thu Oct 15 22:39:58 2009
+++ loncom/xml/londefdef.pm	Wed Nov 18 20:48:13 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Tags Default Definition Module 
 #
-# $Id: londefdef.pm,v 1.412 2009/10/15 22:39:58 raeburn Exp $
+# $Id: londefdef.pm,v 1.413 2009/11/18 20:48:13 droeschl Exp $
 # 
 #
 # Copyright Michigan State University Board of Trustees
@@ -549,6 +549,8 @@
             'text'  => 'HTML Editor',
             'href'  => '',
         });
+        # breadcrumbs (and tools) will be created 
+        # in start_page->bodytag->innerregister
     } else {
         # FIXME Where are we?
     }
@@ -561,10 +563,6 @@
 #					    'no_title'       => 1,
 					    'force_register' => 1});
 
-        if ($env{'request.state'} eq 'construct') {
-            $currentstring .= &Apache::lonhtmlcommon::breadcrumbs();
-        }
-
         my $header = '';
         if ($env{'request.state'} ne 'published' &&
             $env{'request.state'} ne 'construct') {