Diff for /loncom/interface/lonsearchcat.pm between versions 1.318 and 1.323

version 1.318, 2009/10/23 16:55:15 version 1.323, 2010/05/04 17:16:34
Line 118  sub handler { Line 118  sub handler {
                       # This is set and used in &handler() and is also used in                         # This is set and used in &handler() and is also used in 
                       # &output_results().                        # &output_results().
   
     my $loaderror=&Apache::lonnet::overloaderror($r);  
     if ($loaderror) { return $loaderror; }  
     #      #
     my $closebutton;  # button that closes the search window       my $closebutton;  # button that closes the search window 
                       # This button is different for the RAT compared to                        # This button is different for the RAT compared to
Line 324  END Line 322  END
         &Apache::lonhtmlcommon::add_breadcrumb          &Apache::lonhtmlcommon::add_breadcrumb
             ({href=>'/adm/searchcat?'.&Apache::loncommon::inhibit_menu_check().              ({href=>'/adm/searchcat?'.&Apache::loncommon::inhibit_menu_check().
                   '&phase=disp_adv'.                    '&phase=disp_adv'.
                   'catalogmode='.$env{'form.catalogmode'}.                    '&catalogmode='.$env{'form.catalogmode'}.
                   '&launch='.$env{'form.launch'}.                    '&launch='.$env{'form.launch'}.
                   '&mode='.$env{'form.mode'},                    '&mode='.$env{'form.mode'},
                   text=>"Course Search",                    text=>"Course Search",
Line 492  sub course_search { Line 490  sub course_search {
     &Apache::lonhtmlcommon::add_breadcrumb      &Apache::lonhtmlcommon::add_breadcrumb
         ({href=>'/adm/searchcat?'.&Apache::loncommon::inhibit_menu_check().          ({href=>'/adm/searchcat?'.&Apache::loncommon::inhibit_menu_check().
               '&phase=disp_adv'.                '&phase=disp_adv'.
               'catalogmode='.$env{'form.catalogmode'}.                '&catalogmode='.$env{'form.catalogmode'}.
               '&launch='.$env{'form.launch'}.                '&launch='.$env{'form.launch'}.
               '&mode='.$env{'form.mode'},                '&mode='.$env{'form.mode'},
               text=>"Course Search",                text=>"Course Search",
Line 1735  sub parse_domain_restrictions { Line 1733  sub parse_domain_restrictions {
         foreach (sort @allowed_domains) {          foreach (sort @allowed_domains) {
             $pretty_domains_string .= "<b>".$_."</b> ";              $pretty_domains_string .= "<b>".$_."</b> ";
         }          }
  my %servers = &Apache::lonnet::get_servers(\@allowed_domains,   my %servers = &Apache::lonnet::get_unique_servers(\@allowed_domains,
    'library');     'library');
  $libraries_to_query = [keys(%servers)];   $libraries_to_query = [keys(%servers)];
     }      }
Line 2298  sub print_sort_form { Line 2296  sub print_sort_form {
 // <![CDATA[  // <![CDATA[
     function change_sort() {      function change_sort() {
         var newloc = "/adm/searchcat?phase=results";          var newloc = "/adm/searchcat?phase=results";
         newloc += "&amp;persistent_db_id=$env{'form.persistent_db_id'}";          newloc += "&persistent_db_id=$env{'form.persistent_db_id'}";
         newloc += "&amp;sortby=";          newloc += "&sortby=";
         newloc += document.forms.statusform.elements.sortby.value;          newloc += document.forms.statusform.elements.sortby.value;
         parent.resultsframe.location= newloc;          parent.resultsframe.location= newloc;
     }      }
Line 2593  END Line 2591  END
             @Servers_to_contact = ($serverlist);              @Servers_to_contact = ($serverlist);
         }          }
     } else {      } else {
  my %all_library_servers = &Apache::lonnet::all_library();   my %all_library_servers = &Apache::lonnet::unique_library();
         @Servers_to_contact = sort(keys(%all_library_servers));          @Servers_to_contact = sort(keys(%all_library_servers));
     }      }
     my %Server_status;      my %Server_status;
Line 3359  SCRIPT Line 3357  SCRIPT
     }      }
     function select_group() {      function select_group() {
  parent.window.location=   parent.window.location=
     "/adm/groupsort?mode=$env{'form.mode'}&amp;catalogmode=import$inhibit_menu&amp;acts="+      "/adm/groupsort?mode=$env{'form.mode'}&catalogmode=import$inhibit_menu&acts="+
     parent.statusframe.document.forms.statusform.elements.acts.value;      parent.statusframe.document.forms.statusform.elements.acts.value;
     }      }
 // ]]>  // ]]>
Line 3553  sub detailed_citation_view { Line 3551  sub detailed_citation_view {
             $result .= '<b>'.&mt($field->{'translate'}).'</b>';              $result .= '<b>'.&mt($field->{'translate'}).'</b>';
             foreach my $item (split(',',$values{$field->{'name'}})){              foreach my $item (split(',',$values{$field->{'name'}})){
                 $item = &Apache::lonnet::clutter($item);                  $item = &Apache::lonnet::clutter($item);
                 $result .= &display_url($item,[2,0,1]);                  $result .= '<br />'.&display_url($item,1).'<br />';
             }              }
         } elsif (exists($field->{'format'}) && $field->{'format'} ne ''){          } elsif (exists($field->{'format'}) && $field->{'format'} ne ''){
             $result.= &mt($field->{'translate'},              $result.= &mt($field->{'translate'},
Line 3561  sub detailed_citation_view { Line 3559  sub detailed_citation_view {
                                   $values{$field->{'name'}}))."<br />\n";                                    $values{$field->{'name'}}))."<br />\n";
         } else {          } else {
             if ($field->{'special'} eq 'url link') {              if ($field->{'special'} eq 'url link') {
                 $result .= &display_url($jumpurl,[3,0,1]);                  $result .= '<br />'.&display_url($jumpurl,1).'<br />';
             } else {              } else {
                 $result.= &mt($field->{'translate'},                  $result.= &mt($field->{'translate'},
                               $values{$field->{'name'}});                                $values{$field->{'name'}});
Line 3615  sub summary_view { Line 3613  sub summary_view {
     }      }
     my $jumpurl=$values{'url'};      my $jumpurl=$values{'url'};
     $jumpurl=~s|^/ext/|http://|;      $jumpurl=~s|^/ext/|http://|;
     my $link = &display_url($jumpurl,[2,0,1]);      my $link = '<br />'.&display_url($jumpurl,1).'<br />';
   
     $result.=<<END;      $result.=<<END;
 <a href="$jumpurl?inhibitmenu=yes"   <a href="$jumpurl?inhibitmenu=yes" 
Line 3651  sub compact_view { Line 3649  sub compact_view {
     my $jumpurl=$values{'url'};      my $jumpurl=$values{'url'};
     $jumpurl=~s|^/ext/|http://|;      $jumpurl=~s|^/ext/|http://|;
   
     my $link = &display_url($jumpurl,[1,1,1]);      my $link = &display_url($jumpurl,1);
           
     my $result =       my $result = 
         $prefix.'<img src="'.&Apache::loncommon::icon($values{'url'}).'" alt="" />';          $prefix.'<img src="'.&Apache::loncommon::icon($values{'url'}).'" alt="" />';
Line 3670  sub compact_view { Line 3668  sub compact_view {
 }  }
   
 sub display_url {  sub display_url {
     my ($url,$crumb_args) = @_;      my ($url,$skiplast) = @_;
     my $link;      my $link;
     if ($url=~m|^/ext/|) {      if ($url=~m|^/ext/|) {
  $url=~s|^/ext/|http://|;   $url=~s|^/ext/|http://|;
Line 3678  sub display_url { Line 3676  sub display_url {
     } elsif ($url=~m{^(http://|/uploaded/)}) {      } elsif ($url=~m{^(http://|/uploaded/)}) {
  $link='<span class="LC_filename">'.$url.'</span>';   $link='<span class="LC_filename">'.$url.'</span>';
     } else {      } else {
         $link=&Apache::lonhtmlcommon::crumbs($url,          $link=&Apache::lonhtmlcommon::crumbs(
   'preview',                    $url,
   '',                    'preview',
   (($env{'form.catalogmode'} eq 'import')?'parent.statusframe.document.forms.statusform':''),@{$crumb_args}).' ';                    '',
                     (($env{'form.catalogmode'} eq 'import')?'parent.statusframe.document.forms.statusform':''),
                     $skiplast).' ';
     }      }
     return $link;      return $link;
 }  }

Removed from v.1.318  
changed lines
  Added in v.1.323


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