version 1.200, 2004/01/01 20:13:17
|
version 1.201, 2004/01/02 16:34:03
|
Line 485 $bodytag
|
Line 485 $bodytag
|
ENDDOCUMENT |
ENDDOCUMENT |
if (&Apache::lonnet::allowed('bre',$ENV{'request.role.domain'})) { |
if (&Apache::lonnet::allowed('bre',$ENV{'request.role.domain'})) { |
my $CatalogSearch=&mt('Catalog Search'); |
my $CatalogSearch=&mt('Catalog Search'); |
my $Statement=&mt('Enter terms or phrases separated by AND, OR, or NOT then press SEARCH below'); |
my $Statement=&searchhelp(); |
$scrout.=(<<ENDDOCUMENT); |
$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"> |
Line 602 $closebutton
|
Line 602 $closebutton
|
<input type="button" value="$lt{'help'}" onClick="openhelp()" /> |
<input type="button" value="$lt{'help'}" onClick="openhelp()" /> |
</p> |
</p> |
END |
END |
if (!defined($ENV{'form.viewselect'})) { |
|
$ENV{'form.viewselect'} ="Detailed Citation View"; |
|
} |
|
my $bodytag=&Apache::loncommon::bodytag('Advanced Catalog Search'); |
my $bodytag=&Apache::loncommon::bodytag('Advanced Catalog Search'); |
|
my $searchhelp=&searchhelp(); |
my $scrout=<<"ENDHEADER"; |
my $scrout=<<"ENDHEADER"; |
<html> |
<html> |
<head> |
<head> |
Line 619 END
|
Line 617 END
|
</script> |
</script> |
</head> |
</head> |
$bodytag |
$bodytag |
Enter terms or phrases separated by search operators |
$searchhelp |
such as AND, OR, or NOT.<br /> |
|
<form method="post" action="/adm/searchcat" name="advsearch"> |
<form method="post" action="/adm/searchcat" name="advsearch"> |
$advanced_buttons |
$advanced_buttons |
$hidden_fields |
$hidden_fields |
Line 628 $hidden_fields
|
Line 625 $hidden_fields
|
ENDHEADER |
ENDHEADER |
$scrout.=&viewoptions(); |
$scrout.=&viewoptions(); |
my %fields=&Apache::lonmeta::fieldnames(); |
my %fields=&Apache::lonmeta::fieldnames(); |
# set undefined to "any" |
|
$ENV{'form.language'}='any' unless length($ENV{'form.language'}); |
|
$ENV{'form.domains'} = 'any' if (! exists($ENV{'form.domains'})); |
|
$ENV{'form.category'}='any' if (! defined($ENV{'form.category'})); |
|
|
|
|
|
$scrout.='<table>'; |
$scrout.='<table>'; |
$scrout.="<tr><th>".&mt('Field').'</th><th>'.&mt('Value').'</th><th>' |
$scrout.="<tr><th>".&mt('Field').'</th><th>'.&mt('Value').'</th><th>' |
.&mt('Related').'<br />'.&mt('Words')."</td></tr>\n"; |
.&mt('Related').'<br />'.&mt('Words')."</td></tr>\n"; |
foreach ('title','author','keywords','notes','abstract','standards', |
foreach ('title','author','keywords','notes','abstract','standards', |
'lowestgradelevel','highestgradelevel','mime') { |
'lowestgradelevel','highestgradelevel','mime') { |
$scrout.='<tr><td>'.&titlefield($fields{$_}).'</td><td>'. |
$scrout.='<tr bgcolor="#FFFFBB"><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>'; |
} |
} |
|
my %dates=&Apache::lonlocal::texthash('creationdatestart' => 'Creation Date After', |
|
'creationdateend' => 'Creation Date Before', |
|
'lastrevisiondatestart' => 'Last Revision Date After', |
|
'lastrevisiondateend' => 'Last Revision Date Before'); |
|
foreach (sort keys %dates) { |
|
$scrout.='<tr><td>'.&titlefield($dates{$_}).'</td><td>'. |
|
&Apache::lonhtmlcommon::date_setter('advsearch',$_,0,'',1). |
|
'</td><td> </td></td></tr>'; |
|
} |
|
|
|
|
|
|
# Hack - an empty table row. |
# Hack - an empty table row. |
$scrout.="<tr><td> </td><td> </td><td> </td></tr>\n"; |
$scrout.="<tr><td> </td><td> </td><td> </td></tr>\n"; |
# $scrout.=&searchphrasefield('file<br />extension','extension', |
# $scrout.=&searchphrasefield('file<br />extension','extension', |
Line 789 sub viewoptions {
|
Line 793 sub viewoptions {
|
} |
} |
|
|
###################################################################### |
###################################################################### |
|
|
|
=pod |
|
|
|
=item searchhelp |
|
|
|
Inputs: none |
|
|
|
Outputs: return little blurb on how to enter searches |
|
|
|
=cut |
|
|
|
###################################################################### |
|
###################################################################### |
|
|
|
sub searchhelp { |
|
return &mt('Enter terms or phrases separated by AND, OR, or NOT'); |
|
} |
|
|
|
###################################################################### |
###################################################################### |
###################################################################### |
|
|
=pod |
=pod |