Diff for /loncom/interface/lonindexer.pm between versions 1.55 and 1.59

version 1.55, 2003/01/14 18:47:50 version 1.59, 2003/02/03 18:03:52
Line 34 Line 34
 # 05/9-05/19/2001 H. K. Ng  # 05/9-05/19/2001 H. K. Ng
 # 05/21/2001 H. K. Ng  # 05/21/2001 H. K. Ng
 # 05/23/2001 H. K. Ng  # 05/23/2001 H. K. Ng
 # 5/31,6/1,6/2,6/15 Scott Harrison  
 # 6/26,7/8 H. K. Ng  # 6/26,7/8 H. K. Ng
 # 8/6,8/7,8/10 Scott Harrison  
 # 8/14 H. K. Ng  # 8/14 H. K. Ng
 # 8/28,10/15,11/28,11/29 Scott Harrison  
 # 11/30 Matthew Hall  # 11/30 Matthew Hall
 # 12/11,12/13 Scott Harrison  
 # YEAR=2002  # YEAR=2002
 # 1/17 Scott Harrison  
 # 6/29/2002 H. K. Ng  # 6/29/2002 H. K. Ng
 #  #
 ###  ###
Line 373  $r->print(&Apache::loncommon::bodytag('B Line 368  $r->print(&Apache::loncommon::bodytag('B
   
 # ---------------------------------- get state of file attributes to be showing  # ---------------------------------- get state of file attributes to be showing
  if ($ENV{'form.attrs'} ne '') {   if ($ENV{'form.attrs'} ne '') {
     for (my $i=0; $i<=7; $i++) {      for (my $i=0; $i<=8; $i++) {
  delete $hash{'display_attrs_'.$i};   delete $hash{'display_attrs_'.$i};
  if ($ENV{'form.attr'.$i} == 1) {   if ($ENV{'form.attr'.$i} == 1) {
     $attrchk[$i] = 'checked';      $attrchk[$i] = 'checked';
Line 381  $r->print(&Apache::loncommon::bodytag('B Line 376  $r->print(&Apache::loncommon::bodytag('B
  }   }
     }      }
  } else {   } else {
     for (my $i=0; $i<=7; $i++) {      for (my $i=0; $i<=8; $i++) {
  $attrchk[$i] = 'checked' if $hash{'display_attrs_'.$i} == 1;   $attrchk[$i] = 'checked' if $hash{'display_attrs_'.$i} == 1;
     }      }
  }   }
Line 395  $r->print(&Apache::loncommon::bodytag('B Line 390  $r->print(&Apache::loncommon::bodytag('B
 <td><input type="checkbox" name="attr1" value="1" $attrchk[1] /> Size</td>  <td><input type="checkbox" name="attr1" value="1" $attrchk[1] /> Size</td>
 <td><input type="checkbox" name="attr2" value="1" $attrchk[2] /> Last access</td>  <td><input type="checkbox" name="attr2" value="1" $attrchk[2] /> Last access</td>
 <td><input type="checkbox" name="attr3" value="1" $attrchk[3] /> Last modified</td>  <td><input type="checkbox" name="attr3" value="1" $attrchk[3] /> Last modified</td>
 </tr><tr>  <td rowspan="2"><input type="checkbox" name="attr8" value="1" $attrchk[8] /> Show Resource</td></tr><tr>
 <td><input type="checkbox" name="attr4" value="1" $attrchk[4] /> Author</td>  <td><input type="checkbox" name="attr4" value="1" $attrchk[4] /> Author</td>
 <td><input type="checkbox" name="attr5" value="1" $attrchk[5] /> Keywords</td>  <td><input type="checkbox" name="attr5" value="1" $attrchk[5] /> Keywords</td>
 <td><input type="checkbox" name="attr6" value="1" $attrchk[6] /> Language</td>  <td><input type="checkbox" name="attr6" value="1" $attrchk[6] /> Language</td>
Line 432  END Line 427  END
     if ($hash{'display_attrs_5'} == 1);      if ($hash{'display_attrs_5'} == 1);
  $r->print("<td><b>Language</b></td>\n")   $r->print("<td><b>Language</b></td>\n")
     if ($hash{'display_attrs_6'} == 1);      if ($hash{'display_attrs_6'} == 1);
    $r->print("<td><b>Resource</b></td>\n")
       if ($hash{'display_attrs_8'} == 1);
  $r->print('</tr>');   $r->print('</tr>');
   
 # ----------------- read in what directories have previously been set to "open"  # ----------------- read in what directories have previously been set to "open"
Line 834  sub display_line { Line 831  sub display_line {
     $r->print('<td valign=bottom> '.($lang eq '' ? '&nbsp;' : $lang).      $r->print('<td valign=bottom> '.($lang eq '' ? '&nbsp;' : $lang).
       " </td>\n");        " </td>\n");
  }   }
           if ($hash{'display_attrs_8'} == 1) {
               my $output='';
               my $embstyle=&Apache::loncommon::fileembstyle($curfext);
       if ($embstyle eq 'ssi') {
          $output=&Apache::lonnet::ssi($filelink);
                  $output=~s/^.*\<body[^\>]*\>//si;
                  $output=~s/\<\/body\s*\>.*$//si;
                  $output='<font size="-2">'.$output.'</font>';
      } elsif ($embstyle eq 'img') {
                  $output='<img src="'.$filelink.'" />';
              } elsif ($filelink=~/^\/res\/(\w+)\/(\w+)\//) {
                  $output='<img src="http://'.
    $Apache::lonnet::hostname{&Apache::lonnet::homeserver($2,$1)}.
                    '/cgi-bin/thumbnail.gif?url='.$filelink.'" />';
              }
      $r->print('<td valign=bottom> '.($output eq '' ? '&nbsp;':$output).
         " </td>\n");
           }
  $r->print("</tr>\n");   $r->print("</tr>\n");
     }      }
   

Removed from v.1.55  
changed lines
  Added in v.1.59


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