--- loncom/interface/lonsearchcat.pm 2003/10/07 20:30:13 1.190 +++ loncom/interface/lonsearchcat.pm 2003/12/08 18:43:10 1.193 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Search Catalog # -# $Id: lonsearchcat.pm,v 1.190 2003/10/07 20:30:13 matthew Exp $ +# $Id: lonsearchcat.pm,v 1.193 2003/12/08 18:43:10 sakharuk Exp $ # # Copyright Michigan State University Board of Trustees # @@ -200,7 +200,7 @@ sub handler { &Apache::loncommon::get_unprocessed_cgi($ENV{'QUERY_STRING'}, ['catalogmode','launch','acts','mode','form','element','pause', 'phase','persistent_db_id','table','start','show', - 'cleargroupsort']); + 'cleargroupsort','titleelement']); ## ## The following is a trick - we wait a few seconds if asked to so ## the daemon running the search can get ahead of the daemon @@ -282,6 +282,10 @@ END $hidden_fields .= ''."\n"; } + if (exists($ENV{'form.titleelement'})) { + $hidden_fields .= ''."\n"; + } if (exists($ENV{'form.mode'})) { $hidden_fields .= ''."\n"; @@ -541,14 +545,15 @@ sub print_basic_search_form{ $bodytag ENDDOCUMENT if (&Apache::lonnet::allowed('bre',$ENV{'request.role.domain'})) { + my $CatalogSearch=&mt('Catalog Search'); + my $Statement=&mt('Enter terms or phrases separated by AND, OR, or NOT then press SEARCH below'); $scrout.=(<Catalog Search +

$CatalogSearch

$hidden_fields

-Enter terms or phrases separated by AND, OR, or NOT -then press SEARCH below. +$Statement.

@@ -561,12 +566,14 @@ ENDDOCUMENT my $domaincheckbox = &simplecheckbox('domains',$domain); my $srch=&mt('Search'); my $header=&mt('Advanced Search'); + my $userelatedwords=&mt('use related words'); + my $onlysearchdomain=&mt('only search domain'); $scrout.=< - - + +
$header
$relatedcheckbox use related words$domaincheckbox only search domain $domain
$relatedcheckbox $userelatedwords$domaincheckbox $onlysearchdomain $domain

@@ -2688,8 +2695,16 @@ Checked for existance & 'edit' mode. =item 'form.form' +Contains the name of the form that has the input fields to set + =item 'form.element' +the name of the input field to put the URL into + +=item 'form.titleelement' + +the name of the input field to put the title into + =back =cut @@ -2726,14 +2741,31 @@ SCRIPT } elsif ($ENV{'form.mode'} eq 'edit') { my $form = $ENV{'form.form'}; my $element = $ENV{'form.element'}; + my $titleelement = $ENV{'form.titleelement'}; + my $changetitle; + if (!$titleelement) { + $changetitle='function changeTitle(val) {}'; + } else { + $changetitle=< function select_data(title,url) { changeURL(url); + changeTitle(title); parent.close(); } -function changeTitle(val) { -} +$changetitle function changeURL(val) { if (parent.targetwin.document) { parent.targetwin.document.forms["$form"].elements["$element"].value=val; @@ -2851,8 +2883,9 @@ extra custom metadata to show. ###################################################################### sub detailed_citation_view { my ($prefix,%values) = @_; + my $icon=&Apache::loncommon::icon($values{'url'}); my $result=<$prefix$prefix$values{'title'}

$values{'author'}, $values{'owner'}
@@ -2885,8 +2918,9 @@ END ###################################################################### sub summary_view { my ($prefix,%values) = @_; + my $icon=&Apache::loncommon::icon($values{'url'}); my $result=<$values{'author'}
$values{'title'}
$values{'owner'} -- $values{'lastrevisiondate'}
@@ -2911,8 +2945,9 @@ END ###################################################################### sub compact_view { my ($prefix,%values) = @_; + my $icon=&Apache::loncommon::icon($values{'url'}); my $result=< +$prefix $values{'title'} $values{'author'}
END @@ -2933,8 +2968,9 @@ END ###################################################################### sub fielded_format_view { my ($prefix,%values) = @_; + my $icon=&Apache::loncommon::icon($values{'url'}); my $result=< URL: $values{'url'}