X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Felements%2Fsearch-html.html;h=10cc955396ae53dc5b5ae0428ed9b56150063b26;hb=e9a847b88426bc542b99620cb11d8309175e684e;hp=53167c26e78d8f37b1fad9446fb1350272c2dbd8;hpb=3de7385d0a6ad25fa300f50929473f33998ea858;p=freeside.git diff --git a/httemplate/search/elements/search-html.html b/httemplate/search/elements/search-html.html index 53167c26e..10cc95539 100644 --- a/httemplate/search/elements/search-html.html +++ b/httemplate/search/elements/search-html.html @@ -134,9 +134,9 @@ % and !$opt{'disable_download'} % and $type ne 'html-print' ) { - + - Download full results
+ <% $opt{'download_label'} || 'Download full results' %>
% $cgi->param('_type', "$xlsname.xls" ); as query_string %>">Excel spreadsheet
@@ -253,12 +253,29 @@ % $bgcolor = $bgcolor1; % } - +% my $rowstyle = ''; +% if ( $row eq $opt{'footer_data'} ) { +% $rowstyle = ' STYLE="border-top: dashed 1px black; font-style: italic"'; +% $bgcolor = '#dddddd'; +% } + +% my $trid = ''; +% if ( $opt{'link_field' } ) { +% my $link_field = $opt{'link_field'}; +% if ( ref($link_field) eq 'CODE' ) { +% $trid = &{$link_field}($row); +% } else { +% $trid = $row->$link_field(); +% } +% } + > + % if ( $opt{'fields'} ) { % % my $links = $opt{'links'} ? [ @{$opt{'links'}} ] : ''; % my $onclicks = $opt{'link_onclicks'} ? [ @{$opt{'link_onclicks'}} ] : []; +% my $tooltips = $opt{'tooltips'} ? [ @{$opt{'tooltips'}} ] : []; % my $aligns = $opt{'align'} ? [ @{$opt{'align'}} ] : ''; % my $colors = $opt{'color'} ? [ @{$opt{'color'}} ] : []; % my $sizes = $opt{'size'} ? [ @{$opt{'size'}} ] : []; @@ -337,15 +354,21 @@ % map { % if ( ref($_) eq 'CODE' ) { % &{$_}($row); +% } elsif ( ref($row) eq 'ARRAY' and +% $_ =~ /^\d+$/ ) { +% # for the 'straight SQL' case: specify fields +% # by position +% encode_entities($row->[$_]); % } else { -% $row->$_(); +% encode_entities($row->$_()); % } % } % @{$opt{'fields'}} % % ) { % -% my $class = ( $field =~ /^agentnum ) @@ -368,6 +392,14 @@ % if ref($onclick) eq 'CODE'; % $onclick = qq( onClick="$onclick") if $onclick; % +% $tooltip = &{$tooltip}($row) +% if ref($tooltip) eq 'CODE'; +% $tooltip = qq! id="a$id" !. +% qq! onmouseover="return overlib(!. +% $m->interp->apply_escapes($tooltip, 'h', 'js_string'). +% qq!, FGCLASS, 'tooltip', REF, 'a$id', !. +% qq!REFC, 'LL', REFP, 'UL')"! if $tooltip; +% % if ( $link ) { % my( $url, $method ) = @{$link}; % if ( ref($method) eq 'CODE' ) { @@ -375,11 +407,16 @@ % } else { % $a = $url. $row->$method(); % } -% $a = qq(); +% $a = qq(); % } % elsif ( $onclick ) { % $a = qq(); % } +% elsif ( $tooltip ) { +% $a = qq(); +% } +% $id++; + % } % % } @@ -409,7 +446,7 @@ % $cstyle = qq(STYLE="$cstyle") % if $cstyle; - + % } % @@ -493,4 +530,5 @@ $count_sth->execute my $count_arrayref = $count_sth->fetchrow_arrayref; my $total = $count_arrayref->[0]; +my $id = 0;
<% $cstyle %>><% $font %><% $a %><% $s %><% $field %><% $es %><% $a ? '' : '' %><% $font ? '' : '' %> <% $cstyle %>><% $a %><% $font %><% $s %><% $field %><% $es %><% $font ? '' : '' %><% $a ? '' : '' %>