Diff for /loncom/interface/lonmenu.pm between versions 1.197 and 1.204

version 1.197, 2006/07/18 19:45:15 version 1.204, 2006/08/14 09:28:56
Line 52  use vars qw(@desklines $readdesk); Line 52  use vars qw(@desklines $readdesk);
   
 my @inlineremote;  my @inlineremote;
   
   
   
 # ================================================================ Little texts  # ================================================================ Little texts
   
 sub initlittle {  sub initlittle {
Line 62  sub initlittle { Line 64  sub initlittle {
                                                     'Roles':'Courses'),                                                      'Roles':'Courses'),
                                        'docs' => 'Course Documents',                                         'docs' => 'Course Documents',
                                        'exit' => 'Exit',                                         'exit' => 'Exit',
                                          'login' => 'Log In',
        'launch' => 'Launch Remote Control',         'launch' => 'Launch Remote Control',
                                        'groups' => 'Groups',                                         'groups' => 'Groups',
                                        'gdoc' => 'Group Documents',                                         'gdoc' => 'Group Documents',
Line 90  sub menubuttons { Line 93  sub menubuttons {
     my $escurl=&escape(&Apache::lonenc::check_encrypt($env{'request.noversionuri'}));      my $escurl=&escape(&Apache::lonenc::check_encrypt($env{'request.noversionuri'}));
     my $escsymb=&escape(&Apache::lonenc::check_encrypt($env{'request.symb'}));      my $escsymb=&escape(&Apache::lonenc::check_encrypt($env{'request.symb'}));
   
       my $logo=&Apache::loncommon::lonhttpdurl("/adm/lonIcons/minilogo.gif");
       $logo = '<td class="LC_top_nav_logo"><a href="/adm/about.html"><img src="'.
    $logo.'" alt="LON-CAPA Logo" /></a></td>';
   
     if ($env{'request.state'} eq 'construct') {      if ($env{'request.state'} eq 'construct') {
         if (($env{'request.noversionuri'} eq '') || (!defined($env{'request.noversionuri'}))) {          if (($env{'request.noversionuri'} eq '') || (!defined($env{'request.noversionuri'}))) {
             my $returnurl = $env{'request.filename'};              my $returnurl = $env{'request.filename'};
Line 167  ENDMAINMENU Line 174  ENDMAINMENU
         my $vlink=&Apache::loncommon::designparm($function.'.vlink',$domain);          my $vlink=&Apache::loncommon::designparm($function.'.vlink',$domain);
         my $sidebg=&Apache::loncommon::designparm($function.'.sidebg',$domain);          my $sidebg=&Apache::loncommon::designparm($function.'.sidebg',$domain);
  if ($env{'user.name'} eq 'public' && $env{'user.domain'} eq 'public') {   if ($env{'user.name'} eq 'public' && $env{'user.domain'} eq 'public') {
     my $logo=&Apache::loncommon::lonhttpdurl("/adm/lonIcons/minilogo.gif");  
     return (<<ENDINLINEMENU);      return (<<ENDINLINEMENU);
    <table id="LC_top_nav">     <table id="LC_top_nav">
     <tr>      <tr>
       <td>        $logo
         <a href="/adm/logout" target="_top">$lt{'exit'}</a>        <td></td>
         <td class="LC_top_nav_login">
           <a href="/adm/roles" target="_top">$lt{'login'}</a>
      </td>       </td>
      <td class="LC_top_nav_logo">LON-CAPA<img src="$logo" alt="Logo" /></td>  
     </tr>      </tr>
   </table>    </table>
 </font>  </font>
Line 230  ENDCRELOAD Line 237  ENDCRELOAD
         }          }
         my $form=&serverform();          my $form=&serverform();
  my $utility=&utilityfunctions();   my $utility=&utilityfunctions();
  my $logo=&Apache::loncommon::lonhttpdurl("/adm/lonIcons/minilogo.gif");  
  my $remote;   my $remote;
  if ($env{'user.adv'}) {   if ($env{'user.adv'}) {
     $remote = '<td><a href="/adm/remote?action=launch&amp;url='.$escurl.'" target="_top">'.$lt{'launch'}.'</a></td>'      $remote = '<td><a href="/adm/remote?action=launch&amp;url='.$escurl.'" target="_top">'.$lt{'launch'}.'</a></td>'
  }   }
         my $helptopic='Student_Intro';  
         if ($env{'request.role'}=~/^(ca|au)/) {          my $helplink=&Apache::loncommon::top_nav_help('Help');
     $helptopic='Authoring_Intro';  
  } elsif ($env{'request.role'}=~/^cc/) {  
     $helptopic='Course_Coordination_Intro';  
  }  
         my $helplink=&Apache::loncommon::help_open_topic($helptopic,'Help');  
  return (<<ENDINLINEMENU);   return (<<ENDINLINEMENU);
 <script type="text/javascript">  <script type="text/javascript">
 // BEGIN LON-CAPA Internal  // BEGIN LON-CAPA Internal
Line 251  $utility Line 252  $utility
 </script>  </script>
 <table id="LC_top_nav">  <table id="LC_top_nav">
 <tr>  <tr>
 <td class="LC_top_nav_logo">  $logo
 <a href="/adm/about.html"><img src="$logo" alt="LON-CAPA Logo" align="left" border="0" /></a></td>  
 <td><a href="/adm/menu" target="_top">$lt{'main'}</a></td>  <td><a href="/adm/menu" target="_top">$lt{'main'}</a></td>
 $reloadlink  $reloadlink
 $navmaps  $navmaps
Line 260  $docs Line 260  $docs
 $groups  $groups
 $remote  $remote
 <td><a href="/adm/roles" target="_top">$lt{'roles'}</a></td>  <td><a href="/adm/roles" target="_top">$lt{'roles'}</a></td>
 <td>$helplink</td>  <td class="LC_top_nav_help">$helplink</td>
 <td class="LC_top_logout"><a href="/adm/logout" target="_top">$lt{'exit'}</a></td>  <td class="LC_top_nav_exit"><a href="/adm/logout" target="_top">$lt{'exit'}</a></td>
 </tr>  </tr>
 </table>  </table>
 $form  $form
Line 464  sub innerregister { Line 464  sub innerregister {
                 $is_const_dir = 1;                  $is_const_dir = 1;
             } else {              } else {
                 $currdir =~ s#[^/]+$##;                  $currdir =~ s#[^/]+$##;
    my $cleandisfn = &Apache::loncommon::escape_single($thisdisfn);
                 $menuitems=(<<ENDMENUITEMS);                  $menuitems=(<<ENDMENUITEMS);
 s&6&1&list.gif&list[_1]&dir[_1]&golist('$currdir')&List current directory  s&6&1&list.gif&list[_1]&dir[_1]&golist('$currdir')&List current directory
 s&6&2&rtrv.gif&retrieve[_1]&version[_1]&gocstr('/adm/retrieve','/~$uname/$thisdisfn')&Retrieve old version  s&6&2&rtrv.gif&retrieve[_1]&version[_1]&gocstr('/adm/retrieve','/~$uname/$cleandisfn')&Retrieve old version
 s&6&3&pub.gif&publish[_1]&resource[_1]&gocstr('/adm/publish','/~$uname/$thisdisfn')&Publish this resource  s&6&3&pub.gif&publish[_1]&resource[_1]&gocstr('/adm/publish','/~$uname/$cleandisfn')&Publish this resource
 s&7&1&del.gif&delete[_1]&resource[_2]&gocstr('/adm/cfile?action=delete','/~$uname/$thisdisfn')&Delete this resource  s&7&1&del.gif&delete[_1]&resource[_2]&gocstr('/adm/cfile?action=delete','/~$uname/$cleandisfn')&Delete this resource
 s&7&2&prt.gif&prepare[_1]&printout[_1]&gocstr('/adm/printout','/~$uname/$thisdisfn')&Prepare a printable document  s&7&2&prt.gif&prepare[_1]&printout[_1]&gocstr('/adm/printout','/~$uname/$cleandisfn')&Prepare a printable document
 ENDMENUITEMS  ENDMENUITEMS
             }              }
         } elsif (defined($env{'request.course.id'}) &&           } elsif ( defined($env{'request.course.id'}) && 
  $env{'request.symb'} ne '') {   $env{'request.symb'} ne '' ) {
     $menuitems=(<<ENDMENUITEMS);      $menuitems=(<<ENDMENUITEMS);
 c&3&1  c&3&1
 s&2&1&back.gif&backward[_1]&&gopost('/adm/flip','back:'+currentURL)&Go to the previous resource in the course sequence&1  s&2&1&back.gif&backward[_1]&&gopost('/adm/flip','back:'+currentURL)&Go to the previous resource in the course sequence&1
Line 493  s&8&2&fdbk.gif&feedback[_1]&discuss[_1]& Line 494  s&8&2&fdbk.gif&feedback[_1]&discuss[_1]&
 ENDREALRES  ENDREALRES
     }      }
         }          }
    if ($env{'request.uri'} =~ /^\/res/) {
       $menuitems .= (<<ENDMENUITEMS);
   s&8&3&prt.gif&prepare[_1]&printout[_1]&gopost('/adm/printout',currentURL)&Prepare a printable document
   ENDMENUITEMS
    }
         my $buttons='';          my $buttons='';
         foreach (split(/\n/,$menuitems)) {          foreach (split(/\n/,$menuitems)) {
     my ($command,@rest)=split(/\&/,$_);      my ($command,@rest)=split(/\&/,$_);

Removed from v.1.197  
changed lines
  Added in v.1.204


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