--- loncom/interface/lonsearchcat.pm 2004/05/05 14:14:10 1.222
+++ loncom/interface/lonsearchcat.pm 2004/05/05 17:29:06 1.223
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Search Catalog
#
-# $Id: lonsearchcat.pm,v 1.222 2004/05/05 14:14:10 matthew Exp $
+# $Id: lonsearchcat.pm,v 1.223 2004/05/05 17:29:06 matthew Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -231,24 +231,19 @@ END
$hidden_fields = ''."\n";
if (exists($ENV{'form.catalogmode'})) {
- $hidden_fields .= ''."\n";
+ $hidden_fields .= &hidden_field('catalogmode');
}
if (exists($ENV{'form.form'})) {
- $hidden_fields .= ''."\n";
+ $hidden_fields .= &hidden_field('form');
}
if (exists($ENV{'form.element'})) {
- $hidden_fields .= ''."\n";
+ $hidden_fields .= &hidden_field('element');
}
if (exists($ENV{'form.titleelement'})) {
- $hidden_fields .= ''."\n";
+ $hidden_fields .= &hidden_field('titleelement');
}
if (exists($ENV{'form.mode'})) {
- $hidden_fields .= ''."\n";
+ $hidden_fields .= &hidden_field('mode');
}
##
## Configure dynamic components of interface
@@ -422,6 +417,14 @@ sub clean_up_environment {
}
}
+sub hidden_field {
+ my ($name,$value) = @_;
+ if (! defined($value)) {
+ $value = $ENV{'form.'.$name};
+ }
+ return ''.$/;
+}
+
######################################################################
######################################################################
##
@@ -616,7 +619,8 @@ sub print_basic_search_form {
''.
''.
- (' 'x2).$closebutton.(' 'x2).&viewoptions().
+ (' 'x2).$closebutton.(' 'x2).
+ &viewoptions().
''.
''.$/;
$scrout .= ''.$/.''.'';
@@ -959,7 +963,7 @@ Outputs: text for box with view options
######################################################################
######################################################################
sub viewoptions {
- my $scrout="\n".'
'
);
if ($total_results == 0) {
$r->print(''.
@@ -2753,7 +2753,7 @@ SCRIPT
$result.=<'.
+ &prev_next_buttons($min,$ENV{'form.show'},$total_results).
+ ' '.
+ &viewoptions().'
'.$values{'shortabstract'}.'
'; $result .= '