--- loncom/interface/lonsearchcat.pm 2004/01/01 20:13:17 1.200 +++ loncom/interface/lonsearchcat.pm 2004/01/02 16:34:03 1.201 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Search Catalog # -# $Id: lonsearchcat.pm,v 1.200 2004/01/01 20:13:17 www Exp $ +# $Id: lonsearchcat.pm,v 1.201 2004/01/02 16:34:03 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -485,7 +485,7 @@ $bodytag ENDDOCUMENT if (&Apache::lonnet::allowed('bre',$ENV{'request.role.domain'})) { 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.=(<$CatalogSearch
@@ -602,10 +602,8 @@ $closebutton

END - if (!defined($ENV{'form.viewselect'})) { - $ENV{'form.viewselect'} ="Detailed Citation View"; - } my $bodytag=&Apache::loncommon::bodytag('Advanced Catalog Search'); + my $searchhelp=&searchhelp(); my $scrout=<<"ENDHEADER"; @@ -619,8 +617,7 @@ END $bodytag -Enter terms or phrases separated by search operators -such as AND, OR, or NOT.
+$searchhelp $advanced_buttons $hidden_fields @@ -628,22 +625,29 @@ $hidden_fields ENDHEADER $scrout.=&viewoptions(); 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.=''; $scrout.="\n"; foreach ('title','author','keywords','notes','abstract','standards', 'lowestgradelevel','highestgradelevel','mime') { - $scrout.=''; } + 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.=''; + } + + + # Hack - an empty table row. $scrout.="\n"; # $scrout.=&searchphrasefield('file
extension','extension', @@ -789,6 +793,25 @@ 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
".&mt('Field').''.&mt('Value').'' .&mt('Related').'
'.&mt('Words')."
'.&titlefield($fields{$_}).''. + $scrout.='
'.&titlefield($fields{$_}).''. &Apache::lonmeta::prettyinput($_,$ENV{'form.'.$_},$_,'advsearch', 1,'',$ENV{'form.'.$_.'_related'}). '
'.&titlefield($dates{$_}).''. + &Apache::lonhtmlcommon::date_setter('advsearch',$_,0,'',1). + '