[LON-CAPA-cvs] cvs: loncom /xml londefdef.pm

bisitz bisitz@source.lon-capa.org
Tue, 02 Jun 2009 13:10:29 -0000


bisitz		Tue Jun  2 13:10:29 2009 EDT

  Modified files:              
    /loncom/xml	londefdef.pm 
  Log:
  Changes related to modification of LON-CAPA screen header.
  Ensure that Construction Space breadcrumbs only appear when in Construction Space
  ToDo: other cases
  
  
Index: loncom/xml/londefdef.pm
diff -u loncom/xml/londefdef.pm:1.409 loncom/xml/londefdef.pm:1.410
--- loncom/xml/londefdef.pm:1.409	Thu May 28 17:08:43 2009
+++ loncom/xml/londefdef.pm	Tue Jun  2 13:10:29 2009
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Tags Default Definition Module 
 #
-# $Id: londefdef.pm,v 1.409 2009/05/28 17:08:43 bisitz Exp $
+# $Id: londefdef.pm,v 1.410 2009/06/02 13:10:29 bisitz Exp $
 # 
 #
 # Copyright Michigan State University Board of Trustees
@@ -540,14 +540,18 @@
 
     # Breadcrumbs
     &Apache::lonhtmlcommon::clear_breadcrumbs();
-    &Apache::lonhtmlcommon::add_breadcrumb({
-        'text'  => 'Construction Space',
-        'href'  => &Apache::loncommon::authorspace(),
-    });
-    &Apache::lonhtmlcommon::add_breadcrumb({
-        'text'  => 'HTML Editor',
-        'href'  => '',
-    });    
+    if ($env{'request.state'} eq 'construct') {
+        &Apache::lonhtmlcommon::add_breadcrumb({
+            'text'  => 'Construction Space',
+            'href'  => &Apache::loncommon::authorspace(),
+        });
+        &Apache::lonhtmlcommon::add_breadcrumb({
+            'text'  => 'HTML Editor',
+            'href'  => '',
+        });
+    } else {
+        # FIXME Where are we?
+    }
 
 	$currentstring = 
 	    &Apache::loncommon::start_page($Apache::londefdef::title,
@@ -564,9 +568,11 @@
             $header=&Apache::lonmenu::constspaceform()
                    .&Apache::londefdef::edit_controls();
         }
-        $currentstring.=&Apache::loncommon::head_subbox(
-                            &Apache::loncommon::CSTR_pageheader()
-                           .$header);
+        if ($env{'request.state'} eq 'construct') {
+            $currentstring.=&Apache::loncommon::head_subbox(
+                                &Apache::loncommon::CSTR_pageheader()
+                               .$header);
+        }
         $currentstring.=&Apache::lonxml::message_location();
     } elsif ($target eq 'tex') {
         $currentstring = '';   #  '\begin{document}' is in header.