--- loncom/interface/lonsearchcat.pm 2009/07/31 10:58:57 1.312 +++ loncom/interface/lonsearchcat.pm 2009/10/06 10:31:41 1.315 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Search Catalog # -# $Id: lonsearchcat.pm,v 1.312 2009/07/31 10:58:57 bisitz Exp $ +# $Id: lonsearchcat.pm,v 1.315 2009/10/06 10:31:41 bisitz Exp $ # # Copyright Michigan State University Board of Trustees # @@ -266,25 +266,25 @@ sub handler { ## Configure dynamic components of interface ## if ($env{'form.catalogmode'} eq 'interactive') { - $closebutton=" +onclick='javascript:select_group()' /> END } else { $closebutton = ''; @@ -798,7 +798,7 @@ sub setup_basic_search { $scrout .= ''; } # - $scrout .= '
' + .&viewoptions() + .'
' + .'' + .'' + .' ' + .$closebutton + .'
'; # - $scrout .= '$closebutton +
END my $srchtype = 'Catalog'; my $jscript; if ($env{'form.area'} eq 'portfolio') { $srchtype = 'Portfolio'; $jscript = ''; } my $scrout= &Apache::loncommon::start_page("Advanced $srchtype Search", $jscript); - $scrout .= <<"ENDHEADER"; -$bread_crumb -'; + $scrout .= &Apache::loncommon::end_page(); $r->print($scrout); return; @@ -1172,21 +1198,23 @@ Outputs: text for box with view options ###################################################################### ###################################################################### sub viewoptions { - my $scrout = ''; + my $scrout; if (! defined($env{'form.viewselect'})) { $env{'form.viewselect'}='detailed'; } - $scrout.=&Apache::lonmeta::selectbox('viewselect', - $env{'form.viewselect'}, - \&viewoptiontext, - sort(keys(%Views))); - $scrout.= ' '; + $scrout .= '' + .&mt('Type:').' ' + .&Apache::lonmeta::selectbox('viewselect', + $env{'form.viewselect'}, + \&viewoptiontext, + sort(keys(%Views))) + .''; my $countselect = &Apache::lonmeta::selectbox('show', $env{'form.show'}, undef, (10,20,50,100,1000,10000)); - $scrout .= (' 'x2) - .&mt('[_1] Records per Page',$countselect) + $scrout .= ' ' + .&mt('Records per Page:').' '.$countselect .''.$/; return $scrout; } @@ -2167,9 +2195,13 @@ sub ensure_db_and_table { ## Sanity check the table id. ## if (! defined($table) || $table eq '' || $table =~ /\D/ ) { - $r->print("Unable to retrieve search results. ". - "Unable to determine the table results were saved in. ". - &Apache::loncommon::end_page()); + $r->print(&Apache::loncommon::start_page(&mt('Error')) +. 'table: |'.$table.'|
' # SB + .''
+ .&mt('Unable to retrieve search results. '
+ .'Unable to determine the table results were saved in.')
+ .&Apache::loncommon::end_page()
+ );
return undef;
}
##
@@ -2251,6 +2283,7 @@ sub print_sort_form {
}
my $js =<
'. - ''.$sortform.''. - ' | '. - &prev_next_buttons($min,$env{'form.show'},$total_results). - ' | '. - &viewoptions().' |
'.&mt('There are currently no results').'.
'. + ''.&mt('There are currently no results.').'
'. "". &Apache::loncommon::end_page()); return; @@ -2995,15 +3049,13 @@ sub display_results { .&mt('There were no results matching your query.') .''); } else { - $r->print - (''.$closebutton.'
$errormsg
$end_page ENDPAGE @@ -3875,7 +3944,7 @@ $start_page