version 1.207, 2004/04/19 13:51:36
|
version 1.208, 2004/04/19 14:42:24
|
Line 506 $Statement.
|
Line 506 $Statement.
|
<tr><td> |
<tr><td> |
ENDDOCUMENT |
ENDDOCUMENT |
$scrout.=' '. |
$scrout.=' '. |
&Apache::lonhtmlcommon::textbox('basicexp', |
&Apache::lonhtmlcommon::textbox('basicexp', |
$ENV{'form.basicexp'},40). |
$ENV{'form.basicexp'},40). |
' '; |
' '; |
my $relatedcheckbox = |
my $relatedcheckbox = |
Line 609 sub print_advanced_search_form{
|
Line 609 sub print_advanced_search_form{
|
<input type="reset" name="reset" value='$lt{"reset"}' /> |
<input type="reset" name="reset" value='$lt{"reset"}' /> |
$closebutton |
$closebutton |
<input type="button" value="$lt{'help'}" onClick="openhelp()" /> |
<input type="button" value="$lt{'help'}" onClick="openhelp()" /> |
</p> |
|
END |
END |
my $bodytag=&Apache::loncommon::bodytag('Advanced Catalog Search'); |
my $bodytag=&Apache::loncommon::bodytag('Advanced Catalog Search'); |
my $searchhelp=&searchhelp(); |
my $searchhelp=&searchhelp(); |
my $scrout=&search_html_header(); |
my $scrout=&search_html_header(); |
$scrout .= <<"ENDHEADER"; |
$scrout .= <<"ENDHEADER"; |
$bodytag |
$bodytag |
$searchhelp |
|
<form method="post" action="/adm/searchcat" name="advsearch"> |
<form method="post" action="/adm/searchcat" name="advsearch"> |
$advanced_buttons |
$advanced_buttons |
$hidden_fields |
|
<input type="hidden" name="phase" value="adv_search" /> |
|
ENDHEADER |
ENDHEADER |
$scrout.=&viewoptions(); |
$scrout.=(' 'x2).&viewoptions().'</p>'.$hidden_fields. |
|
'<input type="hidden" name="phase" value="adv_search" />'; |
my %fields=&Apache::lonmeta::fieldnames(); |
my %fields=&Apache::lonmeta::fieldnames(); |
|
# |
$scrout.='<table>'; |
$scrout.= '<p>'.$searchhelp.'</p>'. |
$scrout.="<tr><th>".&mt('Field').'</th><th>'.&mt('Value').'</th><th>' |
"<table>\n"; |
.&mt('Related').'<br />'.&mt('Words')."</td></tr>\n"; |
my %related_word_search = |
foreach ('title','author','owner','authorspace','modifyinguser', |
('title'=>1, |
'keywords','notes','abstract','standards', |
'author'=>0, |
'lowestgradelevel','highestgradelevel','mime') { |
'owner'=>0, |
$scrout.='<tr><td>'.&titlefield($fields{$_}).'</td><td>'. |
'authorspace'=>0, |
&Apache::lonmeta::prettyinput($_,$ENV{'form.'.$_},$_,'advsearch', |
'modifyinguser'=>0, |
1,'</td><td>',$ENV{'form.'.$_.'_related'}). |
'keywords'=>1, |
'</td></tr>'; |
'notes'=>1, |
|
'abstract'=>1, |
|
'standards'=>1, |
|
'mime'=>1, |
|
); |
|
|
|
foreach my $field ('title','author','owner','authorspace','modifyinguser', |
|
'keywords','notes','abstract','standards','mime') { |
|
$scrout.='<tr><td align="right">'.&titlefield($fields{$field}).'</td><td>'. |
|
&Apache::lonmeta::prettyinput($field, |
|
$ENV{'form.'.$field}, |
|
$field, |
|
'advsearch', |
|
$related_word_search{$field}, |
|
'</td><td align="left">', |
|
$ENV{'form.'.$field.'_related'}, |
|
50); |
|
if ($related_word_search{$field}) { |
|
$scrout .= 'related words'; |
|
} else { |
|
$scrout .= '</td><td> '; |
|
} |
|
$scrout .= '</td></tr>'.$/; |
} |
} |
$scrout.='<tr><td>'. |
foreach my $field ('lowestgradelevel','highestgradelevel') { |
&titlefield(&mt('MIME Type Category')).'</td><td>'. |
$scrout.='<tr>'. |
|
'<td align="right">'.&titlefield($fields{$field}).'</td>'. |
|
'<td colspan="2">'. |
|
&Apache::lonmeta::prettyinput($field, |
|
$ENV{'form.'.$field}, |
|
$field, |
|
'advsearch', |
|
0). |
|
'</td></tr>'.$/; |
|
} |
|
$scrout.='<tr><td align="right">'. |
|
&titlefield(&mt('MIME Type Category')).'</td><td colspan="2">'. |
&Apache::loncommon::filecategoryselect('category', |
&Apache::loncommon::filecategoryselect('category', |
$ENV{'form.category'}). |
$ENV{'form.category'}). |
'</td><td> </td></td></tr>'; |
'</td></tr>'.$/; |
$scrout.='<tr><td>'. |
$scrout.='<tr><td align="right" valign="top">'. |
&titlefield(&mt('Limit Search to Domains')).'</td><td>'. |
&titlefield(&mt('Domains')).'</td><td colspan="2">'. |
&Apache::loncommon::domain_select('domains', |
&Apache::loncommon::domain_select('domains', |
$ENV{'form.domains'},1). |
$ENV{'form.domains'},1). |
'</td><td> </td></td></tr>'; |
'</td></tr>'.$/; |
|
$scrout .= "</table>\n<br />\n<table>\n"; |
my %dates=&Apache::lonlocal::texthash |
my %dates=&Apache::lonlocal::texthash |
('creationdatestart' => 'Creation Date After', |
('creationdatestart' => 'Creation Date After', |
'creationdateend' => 'Creation Date Before', |
'creationdateend' => 'Creation Date Before', |
'lastrevisiondatestart' => 'Last Revision Date After', |
'lastrevisiondatestart' => 'Last Revision Date After', |
'lastrevisiondateend' => 'Last Revision Date Before'); |
'lastrevisiondateend' => 'Last Revision Date Before'); |
foreach (sort keys %dates) { |
foreach my $field (sort keys %dates) { |
$scrout.='<tr>'. |
$scrout.='<tr>'. |
'<td>'.&titlefield($dates{$_}).'</td><td>'. |
'<td align="right">'.&titlefield($dates{$field}).'</td><td>'. |
&Apache::lonhtmlcommon::date_setter('advsearch',$_,0,'',1). |
&Apache::lonhtmlcommon::date_setter('advsearch',$field,0,'',1). |
'</td><td> </td></td>'. |
'</td></tr>'.$/; |
'</tr>'; |
|
} |
} |
|
|
$scrout.="</table>\n"; |
$scrout.="</table>\n"; |
$scrout.=<<ENDDOCUMENT; |
$scrout.=<<ENDDOCUMENT; |
$advanced_buttons |
$advanced_buttons |
Line 687 Outputs: titletext with font wrapper
|
Line 716 Outputs: titletext with font wrapper
|
###################################################################### |
###################################################################### |
sub titlefield { |
sub titlefield { |
my $title=shift; |
my $title=shift; |
return '<font face="arial" color="#800000">'.$title.'</font>'; |
return $title; |
} |
} |
|
|
###################################################################### |
###################################################################### |
Line 732 Outputs: text for box with view options
|
Line 761 Outputs: text for box with view options
|
###################################################################### |
###################################################################### |
###################################################################### |
###################################################################### |
sub viewoptions { |
sub viewoptions { |
my $scrout="\n\n".'<table>'. |
my $scrout="\n".'<nobr>'; |
'<tr><th>'.&mt('View Options').'</th><th>'. |
if (! defined($ENV{'form.viewselect'})) { |
&mt('Records per Page').'</th></tr><tr><td>'; |
$ENV{'form.viewselect'}='detailed'; |
unless ($ENV{'form.viewselect'}) { $ENV{'form.viewselect'}='detailed'; } |
} |
$scrout.=&Apache::lonmeta::selectbox('viewselect', |
$scrout.=&Apache::lonmeta::selectbox('viewselect', |
$ENV{'form.viewselect'}, |
$ENV{'form.viewselect'}, |
\&viewoptiontext, |
\&viewoptiontext, |
sort(keys(%Views))); |
sort(keys(%Views))); |
$scrout.='</td><td>'; |
$scrout.= ' '; |
$scrout.=&Apache::lonmeta::selectbox('show', |
$scrout.=&Apache::lonmeta::selectbox('show', |
$ENV{'form.show'}, |
$ENV{'form.show'}, |
undef, |
undef, |
(10,20,50,100,1000,10000)); |
(10,20,50,100,1000,10000)); |
$scrout.="</td></tr></table>\n\n"; |
$scrout .= (' 'x2).&mt('Records per Page').'</nobr>'.$/; |
return $scrout; |
return $scrout; |
} |
} |
|
|