16 |
|
|
17 |
=head1 VERSION |
=head1 VERSION |
18 |
|
|
19 |
Version 0.05 |
Version 0.06 |
20 |
|
|
21 |
=cut |
=cut |
22 |
|
|
23 |
our $VERSION = '0.05'; |
our $VERSION = '0.06'; |
24 |
|
|
25 |
=head1 SYNOPSIS |
=head1 SYNOPSIS |
26 |
|
|
145 |
|
|
146 |
filter to return links to search, usage in TT: |
filter to return links to search, usage in TT: |
147 |
|
|
148 |
[% search('FieldToDisplay','FieldToSearch','optional delimiter') %] |
[% search('FieldToDisplay','FieldToSearch','optional delimiter', 'optional_template.tt') %] |
149 |
|
|
150 |
=cut |
=cut |
151 |
|
|
157 |
|
|
158 |
return sub { |
return sub { |
159 |
|
|
160 |
my ($display,$search,$delimiter) = @_; |
my ($display,$search,$delimiter,$template) = @_; |
161 |
|
|
162 |
# default delimiter |
# default delimiter |
163 |
$delimiter ||= '¶<br/>', |
$delimiter ||= '¶<br/>', |
202 |
|
|
203 |
my $d = $item->{'display'}->[$i] || die "can't find value $i for type display in field $display"; |
my $d = $item->{'display'}->[$i] || die "can't find value $i for type display in field $display"; |
204 |
|
|
205 |
push @html, <<__JS_LINK_SEARCH__ |
push @html, qq{<a href="#" onclick="return search_via_link('$search','$s','$template')">$d</a>}; |
|
<a href="#" onclick="new WebPAC.Updater( 'results', '/search/results?$search=$s', { asynchronous: 1,onLoading: function(request){show_searching();},onLoaded: function(request){hide_searching();} } ) ; return false">$d</a> |
|
|
__JS_LINK_SEARCH__ |
|
206 |
} |
} |
207 |
|
|
208 |
return join($delimiter, @html); |
return join($delimiter, @html); |