Diff for /loncom/interface/lonmenu.pm between versions 1.397 and 1.400

version 1.397, 2012/12/06 21:43:27 version 1.400, 2012/12/26 23:50:26
Line 487  sub innerregister { Line 487  sub innerregister {
                 }                  }
                 my $trail;                  my $trail;
                 if ($env{'form.folderpath'}) {                  if ($env{'form.folderpath'}) {
                     my $editbutton =                      &prepare_functions($resurl,$forcereg,$group,undef,undef,1);
                         &prepare_functions($resurl,$forcereg,$group,undef,undef,1);  
                     ($trail) =                      ($trail) =
                         &Apache::lonhtmlcommon::docs_breadcrumbs(undef,$crstype,undef,$title,1);                          &Apache::lonhtmlcommon::docs_breadcrumbs(undef,$crstype,undef,$title,1);
                 } else {                  } else {
Line 525  sub innerregister { Line 524  sub innerregister {
         $editbutton = &prepare_functions($resurl,$forcereg,$group);          $editbutton = &prepare_functions($resurl,$forcereg,$group);
     }      }
     if ($editbutton eq '') {      if ($editbutton eq '') {
         &clear(6,1);          $editbutton = &clear(6,1);
     }      }
   
 #  #
Line 754  ENDMENUITEMS Line 753  ENDMENUITEMS
   
 sub get_editbutton {  sub get_editbutton {
     my ($cfile,$home,$switchserver,$forceedit,$forceview,$forcereg) = @_;      my ($cfile,$home,$switchserver,$forceedit,$forceview,$forcereg) = @_;
     my $jscall =       my $jscall;
         &Apache::lonhtmlcommon::jump_to_editres($cfile,$home,$switchserver,      if (($forceview) && ($env{'form.todocs'})) {
           my ($folderpath,$command);
           if ($env{'request.symb'}) {
               $folderpath = &Apache::loncommon::symb_to_docspath($env{'request.symb'});
           } elsif ($env{'form.folderpath'} =~ /^supplemental/) {
               $folderpath = $env{'form.folderpath'};
               $command = '&forcesupplement=1';
           }
           $folderpath = &escape(&HTML::Entities::encode(&escape($folderpath),'<>&"'));
           $jscall = "go('/adm/coursedocs?folderpath=$folderpath$command')";
       } else {
           $jscall = &Apache::lonhtmlcommon::jump_to_editres($cfile,$home,$switchserver,
                                                 $forceedit,$forcereg,$env{'request.symb'},                                                  $forceedit,$forcereg,$env{'request.symb'},
                                                 &escape($env{'form.folderpath'}),                                                  &escape($env{'form.folderpath'}),
                                                 &escape($env{'form.title'}),$env{'form.idx'},                                                  &escape($env{'form.title'}),$env{'form.idx'},
                                                 &escape($env{'form.suppurl'}));                                                  &escape($env{'form.suppurl'},$env{'form.todocs'}));
       }
     if ($jscall) {      if ($jscall) {
         my $icon = 'pcstr.png';          my $icon = 'pcstr.png';
         my $label = 'Edit';          my $label = 'Edit';
Line 848  sub prepare_functions { Line 859  sub prepare_functions {
                                               $forceedit,$forceview,$forcereg,                                                $forceedit,$forceview,$forcereg,
                                               $env{'form.title'},$env{'form.suppurl'});                                                $env{'form.title'},$env{'form.suppurl'});
             }              }
         } elsif ($resurl !~ m{^adm/($match_domain)/($match_username)/aboutme$}) {          } elsif ($resurl !~ m{^/?adm/($match_domain)/($match_username)/aboutme$}) {
             if ($env{'request.filename'}) {              if ($env{'request.filename'}) {
                 my $file=&Apache::lonnet::declutter($env{'request.filename'});                  my $file=&Apache::lonnet::declutter($env{'request.filename'});
                 ($cfile,$home,$switchserver,$forceedit,$forceview) =                  ($cfile,$home,$switchserver,$forceedit,$forceview) =
Line 2011  BEGIN { Line 2022  BEGIN {
                         $category_names{$entries[2]}=$entries[3];                          $category_names{$entries[2]}=$entries[3];
                     } elsif ($configline=~/^prim\:/) {                      } elsif ($configline=~/^prim\:/) {
                         my @entries = (split(/\:/, $configline))[1..5];                          my @entries = (split(/\:/, $configline))[1..5];
                         push @primary_menu, \@entries;                          push(@primary_menu,\@entries);
                     } elsif ($configline=~/^primsub\:/) {                      } elsif ($configline=~/^primsub\:/) {
                         my ($parent,@entries) = (split(/\:/, $configline))[1..4];                          my ($parent,@entries) = (split(/\:/, $configline))[1..4];
                         push (@{$primary_submenu{$parent}},\@entries);                          push(@{$primary_submenu{$parent}},\@entries);
                     } elsif ($configline=~/^scnd\:/) {                      } elsif ($configline=~/^scnd\:/) {
                         my @entries = (split(/\:/, $configline))[1..5];                          my @entries = (split(/\:/, $configline))[1..5];
                         push @secondary_menu, \@entries;                           push(@secondary_menu,\@entries); 
                     } elsif ($configline) {                      } elsif ($configline) {
                         push(@desklines,$configline);                          push(@desklines,$configline);
                     }                      }

Removed from v.1.397  
changed lines
  Added in v.1.400


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>