X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fsearch%2Felements%2Fsearch.html;h=6cf574164d9ef519175548306e23e44d2fce8f7a;hp=7f72435882ca3ea12404a549ac200c19188a7253;hb=1a033848671cad2cbe7687b37fc718b3b2a68b83;hpb=303cb4ce4b6ce634e108e3b7a0b43086a5e4f184
diff --git a/httemplate/search/elements/search.html b/httemplate/search/elements/search.html
index 7f7243588..6cf574164 100644
--- a/httemplate/search/elements/search.html
+++ b/httemplate/search/elements/search.html
@@ -8,8 +8,12 @@
# 'name' => 'items', #name for the records returned
#
# # some HTML callbacks...
- # 'menubar' => '', #menubar arrayref
- # 'html_init' => '', #after the header/menubar and before the pager
+ # 'menubar' => '', #menubar arrayref
+ # 'html_init' => '', #after the header/menubar and before the pager
+ # 'html_foot' => '', #at the bottom
+ # 'html_posttotal' => '', #at the bottom
+ # # (these three can be strings or coderefs)
+ #
#
# #literal SQL query string or qsearch hashref, required
# 'query' => {
@@ -39,6 +43,10 @@
# # (if not specified the database column names will be used)
# 'header' => [ '#', 'Item' ],
#
+ # 'disable_download' => '', # set true to hide the CSV/Excel download links
+ # 'disable_nonefound' => '', # set true to disable the "No matching Xs found"
+ # # message
+ #
# #listref - each item is a literal column name (or method) or coderef
# #if not specified all columns will be shown
# 'fields' => [
@@ -286,7 +294,13 @@
include( '/elements/menubar.html', @menubar )
)
%>
- <%= defined($opt{'html_init'}) ? $opt{'html_init'} : '' %>
+ <%= defined($opt{'html_init'})
+ ? ( ref($opt{'html_init'})
+ ? &{$opt{'html_init'}}()
+ : $opt{'html_init'}
+ )
+ : ''
+ %>
<% my $pager = include ( '/elements/pager.html',
'offset' => $offset,
'num_rows' => scalar(@$rows),
@@ -295,26 +309,38 @@
);
%>
<% unless ( $total ) { %>
- No matching <%= $opt{'name'} %> found.
+ <% unless ( $opt{'disable_nonefound'} ) { %>
+ No matching <%= $opt{'name'} %> found.
+ <% } %>
<% } else { %>
- <%= $total %> total <%= $opt{'name'} %> + <%= $total %> total <%= $opt{'name'} %> + <%= defined($opt{'html_posttotal'}) + ? ( ref($opt{'html_posttotal'}) + ? &{$opt{'html_posttotal'}}() + : $opt{'html_posttotal'} + ) + : '' + %> + <% if ( $opt{'count_addl'} ) { %> <% my $n=0; foreach my $count ( @{$opt{'count_addl'}} ) { %> <%= sprintf( $count, $count_arrayref->[++$n] ) %> <% } %> <% } %> |
-
- <% $cgi->param('_type', "$xlsname.xls" ); %>
- Download full results - as Excel spreadsheet - <% $cgi->param('_type', 'csv'); %> - as CSV file - |
+ <% unless ( $opt{'disable_download'} ) { %>
+
+ <% $cgi->param('_type', "$xlsname.xls" ); %>
+ Download full results + as Excel spreadsheet + <% $cgi->param('_type', 'csv'); %> + as CSV file + |
+ <% } %>
@@ -471,6 +497,13 @@ |