--- loncom/interface/lonsearchcat.pm 2007/07/11 20:32:15 1.288
+++ loncom/interface/lonsearchcat.pm 2008/08/08 08:51:39 1.298
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# Search Catalog
#
-# $Id: lonsearchcat.pm,v 1.288 2007/07/11 20:32:15 albertel Exp $
+# $Id: lonsearchcat.pm,v 1.298 2008/08/08 08:51:39 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -266,7 +266,7 @@ sub handler {
## Configure dynamic components of interface
##
if ($env{'form.catalogmode'} eq 'interactive') {
- $closebutton="
END
} else {
@@ -759,11 +760,6 @@ sub setup_basic_search {
$r->dir_config('lonDefDomain')),
$r->dir_config('lonDefDomain')).
'';
- if ($area eq 'res') {
- $inclext= '';
- }
$adv_search_link = '';
my %fields=&Apache::lonmeta::fieldnames();
#
- $scrout .= '
'.&mt('Standard [_1] Metadata',$srchtype).'
';
+ $scrout .= ''.&mt("Standard $srchtype Metadata").'
';
$scrout .= "\n";
$scrout .= ' | '.
(' 'x2).&searchhelp()." |
\n";
@@ -899,7 +895,7 @@ ENDHEADER
$env{'form.'.$field.'_related'},
50);
if ($related_word_search{$field}) {
- $scrout .= 'related words';
+ $scrout .= &mt('related words');
} else {
$scrout .= ' ';
}
@@ -926,11 +922,6 @@ ENDHEADER
&Apache::loncommon::domain_select('domains',
$env{'form.domains'},1).
' '
- }
$scrout .= ' | '.$/;
#
# Misc metadata
@@ -1044,6 +1035,7 @@ ENDHEADER
# Creation/Modification date limits
$scrout .= ''.&mt('Creation and Modification dates').'
';
$scrout .= "\n\n";
+ $scrout .= " | ".&mt('Month[_1]Day[_2]Year',' 'x14,' 'x6)." |
\n";
my $cafter =
&Apache::lonhtmlcommon::date_setter('advsearch', # formname
'creationdate1', # fieldname
@@ -1062,10 +1054,10 @@ ENDHEADER
'', # state
1, # no_hh_mm_ss
);
- $scrout .= &mt('Created between | '.
- '[_1] |
'.
- 'and | '.
- '[_2] |
',$cafter,$cbefore);
+ $scrout .= ''.&mt('Created between').' | '
+ .''.$cafter.' |
'
+ .''.&mt('and').' | '
+ .''.$cbefore.' |
';
my $lafter =
&Apache::lonhtmlcommon::date_setter('advsearch',
'revisiondate1',
@@ -1084,10 +1076,10 @@ ENDHEADER
'', # state
1, # no_hh_mm_ss
);
- $scrout .= &mt('Last modified between | '.
- '[_1] |
'.
- 'and | '.
- '[_2] |
',$lafter,$lbefore);
+ $scrout .= ''.&mt('Last modified between').' | '
+ .''.$lafter.' |
'
+ .''.&mt('and').' | '
+ .''.$lbefore.' |
';
$scrout.="
\n";
$scrout.=<{'copyright'} eq 'custom') {
+ return &Apache::lonnet::customaccess('bre',$Metadata->{'url'});
+ }
return 1;
}
@@ -2272,14 +2268,11 @@ END
# }
# $result.="\n";
my $revise = &revise_button();
- $result.=<
-There are $total_results matches to your query. $revise
-
-Search: $pretty_query_string
-
-
-END
+ $result.=''
+ .&mt('There are [_1] matches to your query.',$total_results)
+ .' '.$revise.'
'
+ .''.&mt('Search: ').$pretty_query_string
+ .'
';
$r->print($result.&Apache::loncommon::end_page());
return;
}
@@ -2451,13 +2444,14 @@ Returns: html string for a 'revise searc
######################################################################
######################################################################
sub revise_button {
+ my $revisetext = &mt('Revise search');
my $revise_phase = 'disp_basic';
$revise_phase = 'disp_adv' if ($env{'form.searchmode'} eq 'advanced');
my $newloc = '/adm/searchcat'.
'?persistent_db_id='.$env{'form.persistent_db_id'}.
'&cleargroupsort=1'.
'&phase='.$revise_phase;
- my $result = qq{ };
return $result;
}
@@ -2507,7 +2501,7 @@ END
pop(@Lines);
}
if (@Lines > 2) {
- $pretty_string = join '
',(@Lines[0..2],'....
');
+ $pretty_string = join '
',(@Lines[0..2],'...
');
}
$r->print(&mt("Search: [_1]",$pretty_string));
$r->rflush();
@@ -2562,18 +2556,22 @@ END
my $server;
my $status;
my $revise = &revise_button();
- $r->print(<
-Status | Total Matches | Time Remaining | |
-
- |
- |
- |
-$revise |
-
-
-
-END
+ $r->print(&Apache::loncommon::start_data_table());
+ $r->print(&Apache::loncommon::start_data_table_header_row()
+ .''.&mt('Status').' | '
+ .''.&mt('Total Matches').' | '
+ .''.&mt('Time Remaining').' | '
+# .' | '
+ .&Apache::loncommon::end_data_table_header_row());
+ $r->print(&Apache::loncommon::start_data_table_row()
+ .' | '
+ .' | '
+ .' | '
+# ."$revise | "
+ .&Apache::loncommon::end_data_table_row());
+ $r->print(&Apache::loncommon::start_data_table());
+ $r->print($revise
+ .'');
$r->rflush();
&reset_timing();
&update_seconds($r);
@@ -2645,8 +2643,6 @@ END
my %Fields = &parse_raw_result($result,$server,$tabletype);
$Fields{'hostname'} = $server;
#
- # Skip if external and we did not want that
- next if ((! $env{'form.inclext'}) && ($Fields{'url'}=~/^\/ext\//));
# Skip based on copyright
next if (! ©right_check(\%Fields));