--- loncom/interface/lonsearchcat.pm 2003/12/28 20:12:59 1.199 +++ loncom/interface/lonsearchcat.pm 2004/01/01 20:13:17 1.200 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Search Catalog # -# $Id: lonsearchcat.pm,v 1.199 2003/12/28 20:12:59 www Exp $ +# $Id: lonsearchcat.pm,v 1.200 2004/01/01 20:13:17 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -70,6 +70,8 @@ use Text::Query; use GDBM_File; use Apache::loncommon(); use Apache::lonmysql(); +use Apache::lonmeta; +use Apache::lonhtmlcommon; use Apache::lonlocal; ###################################################################### @@ -83,16 +85,14 @@ my %groupsearch_db; # Database hash use # groupsearch RAT interface. my %persistent_db; # gdbm hash which holds data which is supposed to # persist across calls to lonsearchcat.pm -## %Views: -## Hash which associates an output view description with the function -## that produces it. -# View Description/Name Function Pointer -my %Views = ("Detailed Citation View" => \&detailed_citation_view, - "Summary View" => \&summary_view, - "Fielded Format" => \&fielded_format_view, - "XML/SGML" => \&xml_sgml_view, - "Compact View" => \&compact_view); +# The different view modes and associated functions + +my %Views = ("detailed" => \&detailed_citation_view, + "summary" => \&summary_view, + "fielded" => \&fielded_format_view, + "xml" => \&xml_sgml_view, + "compact" => \&compact_view); ###################################################################### ###################################################################### @@ -366,9 +366,9 @@ sub course_search { if ($ENV{'form.crsrelated'}) { ($search_string,@New_Words) = &related_version($ENV{'form.courseexp'}); if (@New_Words) { - $pretty_search_string .= " with related words: @New_Words."; + $pretty_search_string .= ' '.&mt("with related words").": @New_Words."; } else { - $pretty_search_string .= " with no related words."; + $pretty_search_string .= ' '.&mt('with no related words')."."; } } my $fulltext=$ENV{'form.crsfulltext'}; @@ -498,15 +498,19 @@ $Statement.
@@ -589,12 +591,15 @@ Returns a scalar which holds html for th sub print_advanced_search_form{ my ($r,$closebutton,$hidden_fields) = @_; + my %lt=&Apache::lonlocal::texthash('srch' => 'Search', + 'reset' => 'Reset', + 'help' => 'Help'); my $advanced_buttons = <<"END";
- - + + $closebutton - +
END if (!defined($ENV{'form.viewselect'})) { @@ -616,59 +621,46 @@ END $bodytag Enter terms or phrases separated by search operators such as AND, OR, or NOT.