--- loncom/interface/lonsearchcat.pm 2006/06/08 07:20:41 1.266 +++ loncom/interface/lonsearchcat.pm 2006/06/08 13:56:31 1.267 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Search Catalog # -# $Id: lonsearchcat.pm,v 1.266 2006/06/08 07:20:41 www Exp $ +# $Id: lonsearchcat.pm,v 1.267 2006/06/08 13:56:31 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -215,7 +215,7 @@ sub handler { untie %groupsearch_db if (tied(%groupsearch_db)); if (($env{'form.cleargroupsort'} eq '1') || (($env{'form.launch'} eq '1') && - ($env{'form.catalogmode'} eq 'groupsearch'))) { + ($env{'form.catalogmode'} eq 'import'))) { if (tie(%groupsearch_db,'GDBM_File',$diropendb,&GDBM_WRCREAT(),0640)) { &start_fresh_session(); untie %groupsearch_db; @@ -260,7 +260,7 @@ sub handler { $closebutton .="onClick='self.close()'"; } $closebutton .=">\n"; - } elsif ($env{'form.catalogmode'} eq 'groupsearch') { + } elsif ($env{'form.catalogmode'} eq 'import') { $closebutton=" 'Search', 'reset' => 'Reset', 'help' => 'Help'); @@ -2107,12 +2107,12 @@ END {'only_body' => 1}); my $breadcrumbs= &Apache::lonhtmlcommon::breadcrumbs('Searching','Searching', - $env{'form.catalogmode'} ne 'groupsearch'); + $env{'form.catalogmode'} ne 'import'); my $result = < +
END @@ -2337,7 +2337,7 @@ sub run_search { {'only_body' => 1}); my $breadcrumbs = &Apache::lonhtmlcommon::breadcrumbs('Searching','Searching', - $env{'form.catalogmode'} ne 'groupsearch'); + $env{'form.catalogmode'} ne 'import'); $r->print(<print(&Apache::loncommon::end_page()); -# if ($env{'form.catalogmode'} ne 'groupsearch') { +# if ($env{'form.catalogmode'} ne 'import') { $r->print(" @@ -3086,8 +3086,7 @@ SCRIPT {'only_body' =>1}); my $result=< - + $importbutton END return $result; @@ -3211,7 +3210,7 @@ sub detailed_citation_view { my $jumpurl=$values{'url'}; $jumpurl=~s/^\/ext\//http\:\/\//; $result .= ''.$prefix. - ''.' '. + ''.' '. ''.$values{'title'}."\n"; $result .= "

\n"; @@ -3277,25 +3276,25 @@ sub detailed_citation_view { next if (! exists($values{$field->{'name'}}) || $values{$field->{'name'}} eq ''); if (exists($field->{'type'}) && $field->{'type'} eq 'list') { - $result .= ''.&mt($field->{'translate'}).'

    '; + $result .= ''.&mt($field->{'translate'}).''; foreach my $item (split(',',$values{$field->{'name'}})){ - $result .= '
  • '. - ''.$item.'
  • '; + $result .= + &Apache::lonhtmlcommon::crumbs($item, + (($env{'form.catalogmode'} eq 'import')?'_top':'preview'), + '/res', + (($env{'form.catalogmode'} eq 'import')?'parent.statusframe.document.forms.statusform':''),1); } - $result .= '
'; } elsif (exists($field->{'format'}) && $field->{'format'} ne ''){ $result.= &mt($field->{'translate'}, sprintf($field->{'format'}, $values{$field->{'name'}}))."
\n"; } else { if ($field->{'special'} eq 'url link') { - $result.= - &mt($field->{'translate'}, - ''. - $values{$field->{'name'}}. - ''); + $result.= + &Apache::lonhtmlcommon::crumbs($jumpurl, + (($env{'form.catalogmode'} eq 'import')?'_top':'preview'), + '', + (($env{'form.catalogmode'} eq 'import')?'parent.statusframe.document.forms.statusform':''),1); } else { $result.= &mt($field->{'translate'}, $values{$field->{'name'}}); @@ -3352,10 +3351,14 @@ sub summary_view { } my $jumpurl=$values{'url'}; $jumpurl=~s/^\/ext\//http\:\/\//; + my $link=&Apache::lonhtmlcommon::crumbs($jumpurl, + (($env{'form.catalogmode'} eq 'import')?'_top':'preview'), + '', + (($env{'form.catalogmode'} eq 'import')?'parent.statusframe.document.forms.statusform':''),1); $result.=<$values{'title'}
+ target='search_preview'>$values{'title'}$link $values{'author'}, $values{'owner'} -- $values{'lastrevisiondate'}
$values{'copyrighttag'}
$values{'extrashow'} @@ -3389,7 +3392,10 @@ sub compact_view { my ($prefix,%values) = @_; my $jumpurl=$values{'url'}; $jumpurl=~s/^\/ext\//http\:\/\//; - + my $link=&Apache::lonhtmlcommon::crumbs($jumpurl, + (($env{'form.catalogmode'} eq 'import')?'_top':'preview'), + '', + (($env{'form.catalogmode'} eq 'import')?'parent.statusframe.document.forms.statusform':''),1); my $result = $prefix.''; if (exists($env{'form.sortfield'}) && @@ -3399,7 +3405,7 @@ sub compact_view { $result .= ' '.$tmp.' '; } $result.=' '. - $values{'title'}.''.(' 'x2). + $values{'title'}.''.(' 'x2).$link. ''.$values{'author'}.' ('.$values{'domain'}.')
'; return $result; }