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

raeburn raeburn at source.lon-capa.org
Thu Nov 29 15:05:00 EST 2012


raeburn		Thu Nov 29 20:05:00 2012 EDT

  Modified files:              
    /loncom/interface	lonmenu.pm 
  Log:
  - 'Edit Folder' icon in "Functions" when viewing items in top level of 
    Supplemental Content.
  
  
Index: loncom/interface/lonmenu.pm
diff -u loncom/interface/lonmenu.pm:1.393 loncom/interface/lonmenu.pm:1.394
--- loncom/interface/lonmenu.pm:1.393	Tue Nov 27 23:45:08 2012
+++ loncom/interface/lonmenu.pm	Thu Nov 29 20:05:00 2012
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # Routines to control the menu
 #
-# $Id: lonmenu.pm,v 1.393 2012/11/27 23:45:08 raeburn Exp $
+# $Id: lonmenu.pm,v 1.394 2012/11/29 20:05:00 raeburn Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -485,19 +485,21 @@
                 if ($env{'form.title'}) {
                     $title = $env{'form.title'};
                 }
+                my $trail;
                 if ($env{'form.folderpath'}) {
                     my $editbutton =
                         &prepare_functions($resurl,$forcereg,$group,undef,undef,1);
-                    my ($trail) =
+                    ($trail) =
                         &Apache::lonhtmlcommon::docs_breadcrumbs(undef,$crstype,undef,$title,1);
-                    return $trail;
                 } else {
                     &Apache::lonhtmlcommon::add_breadcrumb(
                     {text  => "Supplemental $crstype Content",
                      href  => "javascript:gopost('/adm/supplemental','')"});
                     $title = &mt('View Resource');
-                    return &Apache::lonhtmlcommon::docs_breadcrumbs(undef,$crstype,undef,$title,1);
+                    ($trail) = 
+                        &Apache::lonhtmlcommon::docs_breadcrumbs(undef,$crstype,undef,$title,1);
                 }
+                return $trail;
             }
             &Apache::lonhtmlcommon::clear_breadcrumbs();
             &Apache::lonhtmlcommon::add_breadcrumb({text => 'View Resource'});
@@ -911,7 +913,7 @@
              ($resurl =~ m{^/uploaded/$cdom/$cnum/supplemental/}) ||
              ($resurl eq '/adm/supplemental'))) {
             my @folders=split('&',$env{'form.folderpath'});
-            if (@folders > 2) {
+            if ((@folders > 2) || ($resurl ne '/adm/supplemental')) {
                 my $esc_path=&escape(&HTML::Entities::encode(&escape($env{'form.folderpath'}),'<>&"'));
                 &switch('','',7,4,'docs-22x22.png','Edit Folder','parms[_2]',
                         "location.href='/adm/coursedocs?command=direct&forcesupplement=1&supppath=$esc_path'",




More information about the LON-CAPA-cvs mailing list