Diff for /loncom/interface/lonsearchcat.pm between versions 1.206 and 1.207

version 1.206, 2004/04/14 18:29:32 version 1.207, 2004/04/19 13:51:36
Line 454  sub untiehash { Line 454  sub untiehash {
   
 } # End of course search scoping  } # End of course search scoping
   
   sub search_html_header {
       my $Str = <<ENDHEADER;
   <html>
   <head>
   <title>The LearningOnline Network with CAPA</title>
   <script type="text/javascript">
       function openhelp(val) {
    openhelpwin=open('/adm/help/searchcat.html','helpscreen',
        'scrollbars=1,width=600,height=300');
    openhelpwin.focus();
       }
   </script>
   </head>
   ENDHEADER
       return $Str;
   }
   
 ######################################################################  ######################################################################
 ######################################################################  ######################################################################
   
Line 472  sub print_basic_search_form { Line 489  sub print_basic_search_form {
     my $bodytag=&Apache::loncommon::bodytag('Search').      my $bodytag=&Apache::loncommon::bodytag('Search').
  &Apache::loncommon::help_open_topic('Finding_Resources').   &Apache::loncommon::help_open_topic('Finding_Resources').
  &Apache::loncommon::help_open_bug('Searching');   &Apache::loncommon::help_open_bug('Searching');
     my $scrout=<<"ENDDOCUMENT";      my $scrout = &search_html_header().$bodytag;
 <html>      if (&Apache::lonnet::allowed('bre',$ENV{'request.role.domain'})) {
 <head>          my $CatalogSearch=&mt('Catalog Search');
 <title>The LearningOnline Network with CAPA</title>          my $Statement=&searchhelp();
 <script type="text/javascript">          $scrout.=(<<ENDDOCUMENT);
     function openhelp(val) {  
  openhelpwin=open('/adm/help/searchcat.html','helpscreen',  
      'scrollbars=1,width=600,height=300');  
  openhelpwin.focus();  
     }  
 </script>  
 </head>  
 $bodytag  
 ENDDOCUMENT  
 if (&Apache::lonnet::allowed('bre',$ENV{'request.role.domain'})) {  
     my $CatalogSearch=&mt('Catalog Search');  
     my $Statement=&searchhelp();  
     $scrout.=(<<ENDDOCUMENT);  
 <h1>$CatalogSearch</h1>  <h1>$CatalogSearch</h1>
 <form name="loncapa_search" method="post" action="/adm/searchcat">  <form name="loncapa_search" method="post" action="/adm/searchcat">
 <input type="hidden" name="phase" value="basic_search" />  <input type="hidden" name="phase" value="basic_search" />
Line 501  $Statement. Line 505  $Statement.
 <table>  <table>
 <tr><td>  <tr><td>
 ENDDOCUMENT  ENDDOCUMENT
     $scrout.='&nbsp;'.&Apache::lonhtmlcommon::textbox('basicexp',          $scrout.='&nbsp;'.
                                             $ENV{'form.basicexp'},40).          &Apache::lonhtmlcommon::textbox('basicexp',
         '&nbsp;';                                          $ENV{'form.basicexp'},40).
     my $relatedcheckbox = &Apache::lonhtmlcommon::checkbox('related',                                          '&nbsp;';
  $ENV{'form.related'});          my $relatedcheckbox = 
     my $domain = $r->dir_config('lonDefDomain');              &Apache::lonhtmlcommon::checkbox('related',
     my $domaincheckbox = &Apache::lonhtmlcommon::checkbox('domains',                                               $ENV{'form.related'});
  $ENV{'form.domains'});          my $domain = $r->dir_config('lonDefDomain');
     my $srch=&mt('Search');          my $domaincheckbox = 
     my $header=&mt('Advanced Search');              &Apache::lonhtmlcommon::checkbox('domains',
     my $userelatedwords=&mt('use related words');                                               $ENV{'form.domains'});
     my $onlysearchdomain=&mt('only search domain');          my $srch=&mt('Search');
     my $view=&viewoptions();          my $header=&mt('Advanced Search');
     $scrout.=<<END;          my $userelatedwords=&mt('use related words');
           my $onlysearchdomain=&mt('only search domain');
           my $view=&viewoptions();
           $scrout.=<<END;
 </td><td><a  </td><td><a
 href="/adm/searchcat?phase=disp_adv&catalogmode=$ENV{'form.catalogmode'}&launch=$ENV{'form.launch'}&mode=$ENV{'form.mode'}"  href="/adm/searchcat?phase=disp_adv&catalogmode=$ENV{'form.catalogmode'}&launch=$ENV{'form.launch'}&mode=$ENV{'form.mode'}"
 >$header</a></td></tr>  >$header</a></td></tr>
Line 606  $closebutton Line 613  $closebutton
 END  END
     my $bodytag=&Apache::loncommon::bodytag('Advanced Catalog Search');      my $bodytag=&Apache::loncommon::bodytag('Advanced Catalog Search');
     my $searchhelp=&searchhelp();      my $searchhelp=&searchhelp();
     my $scrout=<<"ENDHEADER";      my $scrout=&search_html_header();
 <html>      $scrout .= <<"ENDHEADER";
 <head>  
 <title>The LearningOnline Network with CAPA</title>  
 <script type="text/javascript">  
     function openhelp(val) {  
  openhelpwin=open('/adm/help/searchcat.html','helpscreen',  
      'scrollbars=1,width=600,height=300');  
  openhelpwin.focus();  
     }  
 </script>  
 </head>  
 $bodytag  $bodytag
 $searchhelp  $searchhelp
 <form method="post" action="/adm/searchcat" name="advsearch">  <form method="post" action="/adm/searchcat" name="advsearch">
Line 634  ENDHEADER Line 631  ENDHEADER
     foreach ('title','author','owner','authorspace','modifyinguser',      foreach ('title','author','owner','authorspace','modifyinguser',
      'keywords','notes','abstract','standards',       'keywords','notes','abstract','standards',
      'lowestgradelevel','highestgradelevel','mime') {       'lowestgradelevel','highestgradelevel','mime') {
  $scrout.='<tr bgcolor="#FFFFBB"><td>'.&titlefield($fields{$_}).'</td><td>'.   $scrout.='<tr><td>'.&titlefield($fields{$_}).'</td><td>'.
     &Apache::lonmeta::prettyinput($_,$ENV{'form.'.$_},$_,'advsearch',      &Apache::lonmeta::prettyinput($_,$ENV{'form.'.$_},$_,'advsearch',
   1,'</td><td>',$ENV{'form.'.$_.'_related'}).    1,'</td><td>',$ENV{'form.'.$_.'_related'}).
     '</td></tr>';      '</td></tr>';
     }      }
     $scrout.='<tr bgcolor="#FFFFBB"><td>'.      $scrout.='<tr><td>'.
  &titlefield(&mt('MIME Type Category')).'</td><td>'.    &titlefield(&mt('MIME Type Category')).'</td><td>'. 
     &Apache::loncommon::filecategoryselect('category',      &Apache::loncommon::filecategoryselect('category',
    $ENV{'form.category'}).     $ENV{'form.category'}).
     '</td><td>&nbsp;</td></td></tr>';      '</td><td>&nbsp;</td></td></tr>';
     $scrout.='<tr bgcolor="#FFFFBB"><td>'.      $scrout.='<tr><td>'.
  &titlefield(&mt('Limit Search to Domains')).'</td><td>'.    &titlefield(&mt('Limit Search to Domains')).'</td><td>'. 
     &Apache::loncommon::domain_select('domains',      &Apache::loncommon::domain_select('domains',
    $ENV{'form.domains'},1).     $ENV{'form.domains'},1).
Line 655  ENDHEADER Line 652  ENDHEADER
          'lastrevisiondatestart' => 'Last Revision Date After',           'lastrevisiondatestart' => 'Last Revision Date After',
          'lastrevisiondateend'   => 'Last Revision Date Before');           'lastrevisiondateend'   => 'Last Revision Date Before');
     foreach (sort keys %dates) {      foreach (sort keys %dates) {
  $scrout.='<tr bgcolor="#FFFFBB">'.   $scrout.='<tr>'.
             '<td>'.&titlefield($dates{$_}).'</td><td>'.               '<td>'.&titlefield($dates{$_}).'</td><td>'. 
     &Apache::lonhtmlcommon::date_setter('advsearch',$_,0,'',1).      &Apache::lonhtmlcommon::date_setter('advsearch',$_,0,'',1).
     '</td><td>&nbsp;</td></td>'.      '</td><td>&nbsp;</td></td>'.
Line 735  Outputs: text for box with view options Line 732  Outputs: text for box with view options
 ######################################################################  ######################################################################
 ######################################################################  ######################################################################
 sub viewoptions {  sub viewoptions {
     my $scrout="\n\n".'<table bgcolor="#FFFFBB">'.      my $scrout="\n\n".'<table>'.
         '<tr><th>'.&mt('View Options').'</th><th>'.          '<tr><th>'.&mt('View Options').'</th><th>'.
  &mt('Records per Page').'</th></tr><tr><td>';   &mt('Records per Page').'</th></tr><tr><td>';
     unless ($ENV{'form.viewselect'}) { $ENV{'form.viewselect'}='detailed'; }      unless ($ENV{'form.viewselect'}) { $ENV{'form.viewselect'}='detailed'; }

Removed from v.1.206  
changed lines
  Added in v.1.207


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