Diff for /loncom/interface/lonindexer.pm between versions 1.200 and 1.204

version 1.200, 2009/09/25 15:37:32 version 1.204, 2010/03/29 22:42:58
Line 518  END Line 518  END
         $select_file_categories{''} = &mt('All file types');          $select_file_categories{''} = &mt('All file types');
         foreach my $cat (@file_categories) {          foreach my $cat (@file_categories) {
     my $types = join(",",&Apache::loncommon::filecategorytypes($cat));      my $types = join(",",&Apache::loncommon::filecategorytypes($cat));
     $select_file_categories{$types} = $cat;      $select_file_categories{$types} = &mt($cat);
     push(@select_form_order,$types);      push(@select_form_order,$types);
  }   }
         $select_file_categories{'select_form_order'} = \@select_form_order;          $select_file_categories{'select_form_order'} = \@select_form_order;
         my $type_element=          my $type_element=
     &Apache::loncommon::select_form($typeselect,'only',              &Apache::loncommon::select_form(
     %select_file_categories);                  $typeselect,
                   'only',
                   %select_file_categories);
         $type_element = '<label>'.&mt('File Type Displayed: [_1]',          $type_element = '<label>'.&mt('File Type Displayed: [_1]',
       $type_element).'</label>';        $type_element).'</label>';
         $r->print($type_element          $r->print($type_element
Line 541  END Line 543  END
  $storeuri='/'.(split(/\.(page|sequence)\/\//,$uri))[-1];   $storeuri='/'.(split(/\.(page|sequence)\/\//,$uri))[-1];
  $storeuri=~s/\/+/\//g;   $storeuri=~s/\/+/\//g;
 # ---------------------------------------------------------------- Bread crumbs  # ---------------------------------------------------------------- Bread crumbs
         $r->print(&Apache::lonhtmlcommon::crumbs($storeuri,'','',          $r->print(
  (($env{'form.catalogmode'} eq 'import')?              '<p>'
  'document.forms.fileattr':'')).             .&Apache::lonhtmlcommon::crumbs(
   &Apache::lonhtmlcommon::select_recent('residx','resrecent',                  $storeuri,
 'window.status=this.form.resrecent.options[this.form.resrecent.selectedIndex].value;this.form.action=this.form.resrecent.options[this.form.resrecent.selectedIndex].value;this.form.submit();'));                  '',
                   '',
                   (($env{'form.catalogmode'} eq 'import')?
                                    'document.forms.fileattr':''))
              .'<br />'
              .&Apache::lonhtmlcommon::select_recent(
                   'residx',
                   'resrecent',
                   'window.status=this.form.resrecent.options[this.form.resrecent.selectedIndex].value;this.form.action=this.form.resrecent.options[this.form.resrecent.selectedIndex].value;this.form.submit();')
              .'</p>'
           );
 # -------------------------------------------------------- Resource Home Button  # -------------------------------------------------------- Resource Home Button
  my $reshome=$env{'course.'.$env{'request.course.id'}.'.reshome'};   my $reshome=$env{'course.'.$env{'request.course.id'}.'.reshome'};
  if ($reshome) {   if ($reshome) {
Line 563  END Line 575  END
  &Apache::lonhtmlcommon::store_recent('residx',$storeuri,$storeuri);   &Apache::lonhtmlcommon::store_recent('residx',$storeuri,$storeuri);
 # -------------------------------------------------- Check All and Uncheck all  # -------------------------------------------------- Check All and Uncheck all
  if ($env{'form.catalogmode'} eq 'import') {   if ($env{'form.catalogmode'} eq 'import') {
     $r->print('<br /><input type="button" value="'.&mt("Check All").'" id="checkallbutton" onclick="javascript:checkAll()" />');      $r->print('<p><input type="button" value="'.&mt("Check All").'" id="checkallbutton" onclick="javascript:checkAll()" />');
     $r->print('<input type="button" value="'.&mt("Uncheck All").'" id="uncheckallbutton" onclick="javascript:uncheckAll()" />');      $r->print('<input type="button" value="'.&mt("Uncheck All").'" id="uncheckallbutton" onclick="javascript:uncheckAll()" /></p>');
  }   }
 # ----------------- output starting row to the indexed file/directory hierarchy  # ----------------- output starting row to the indexed file/directory hierarchy
         #$r->print(&initdebug());          #$r->print(&initdebug());
         #$r->print(&writedebug("Omit:@Omit")) if (@Omit);          #$r->print(&writedebug("Omit:@Omit")) if (@Omit);
         #$r->print(&writedebug("Only:@Only")) if (@Only);          #$r->print(&writedebug("Only:@Only")) if (@Only);
         $r->print('<br /><br />');  
         $r->print(&Apache::loncommon::start_data_table("LC_tableBrowseRes")          $r->print(&Apache::loncommon::start_data_table("LC_tableBrowseRes")
                  .&Apache::loncommon::start_data_table_header_row());                   .&Apache::loncommon::start_data_table_header_row());
  $r->print("<th $colspan>".&mt('Name')."</th>\n");   $r->print("<th $colspan>".&mt('Name')."</th>\n");
Line 913  sub display_line { Line 924  sub display_line {
  return OK;   return OK;
     }      }
 # Do we have permission to look at this?  # Do we have permission to look at this?
       if($filecom[15] ne '1') { return OK if ((!&Apache::lonnet::allowed('bre',$pathprefix.$filecom[0])) && (!&Apache::lonnet::allowed('bro',$pathprefix.$filecom[0]))); }
     if($filecom[15] ne '1') { return OK if (!&Apache::lonnet::allowed('bre',$pathprefix.$filecom[0])); }  
   
 # make absolute links appear on different background  # make absolute links appear on different background
 #SB    if ($absolute) { $fileclr='#ccdd99'; }  #SB    if ($absolute) { $fileclr='#ccdd99'; }
Line 1213  $r->print ('<input type="hidden" name="a Line 1223  $r->print ('<input type="hidden" name="a
                   
         my $location = &Apache::loncommon::lonhttpdurl("/adm/lonIcons");          my $location = &Apache::loncommon::lonhttpdurl("/adm/lonIcons");
  my $icon = "navmap.folder.".($nowOpen ? "open":"closed").'.gif';   my $icon = "navmap.folder.".($nowOpen ? "open":"closed").'.gif';
         $r->print ('<a href="javascript:gothere(\''          $r->print ('<a href="javascript:gothere('
    .$quotable_curdir.'\')"">'                    ."'$quotable_curdir'".');">'
    .'<img class="LC_fileicon" alt="'.&mt('Open Folder').'" src="'.                    .'<img class="LC_fileicon" alt="'.&mt('Open Folder').'" src="'
                    $location."/".$icon.'" />'.                    .$location.'/'.$icon.'" />'
                    "\n");                    ."\n");
  $r->print ("$listname</a></form></td>\n");   $r->print ("$listname</a></form></td>\n");
 # Attributes  # Attributes
  my $filelink = $startdir.$filecom[0].'/default';   my $filelink = $startdir.$filecom[0].'/default';

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


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