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

raeburn raeburn at source.lon-capa.org
Thu Dec 6 08:38:25 EST 2012


raeburn		Thu Dec  6 13:38:25 2012 EDT

  Modified files:              
    /loncom/interface	lonmenu.pm 
  Log:
  - Pushing "Edit" for published HTML or other text file in course context: 
    - use breadcrumbs defined in lonxml.pm
  
  
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.394 loncom/interface/lonmenu.pm:1.395
--- loncom/interface/lonmenu.pm:1.394	Thu Nov 29 20:05:00 2012
+++ loncom/interface/lonmenu.pm	Thu Dec  6 13:38:25 2012
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.394 2012/11/29 20:05:00 raeburn Exp $
+# $Id: lonmenu.pm,v 1.395 2012/12/06 13:38:25 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -501,8 +501,10 @@
                 }
                 return $trail;
             }
-            &Apache::lonhtmlcommon::clear_breadcrumbs();
-            &Apache::lonhtmlcommon::add_breadcrumb({text => 'View Resource'});
+            unless ($env{'request.state'} eq 'construct') {
+                &Apache::lonhtmlcommon::clear_breadcrumbs();
+                &Apache::lonhtmlcommon::add_breadcrumb({text => 'View Resource'});
+            }
         }
     } elsif (! $const_space){
         #a situation when we're looking at a resource outside of context of a 
@@ -574,7 +576,9 @@
 #
         if (($env{'request.symb'}=~/^uploaded/) && ($perms{'mdc'})) {
             my $text = 'Edit Folder';
-            if ($mapurl =~ /\.page$/) {
+            if (($mapurl =~ /\.page$/) ||
+                ($env{'request.symb'}=~
+                     /^uploaded/$cdom/$cnum/default_\d+\.page$/))  {
                 $text = 'Edit Page';
             }
             &switch('','',7,4,'docs-22x22.png',$text,'parms[_2]',




More information about the LON-CAPA-cvs mailing list