[freeside-commits] freeside/httemplate/search/elements search.html,
1.21, 1.22
Ivan,,,
ivan at wavetail.420.am
Fri Apr 21 17:58:42 PDT 2006
- Previous message: [freeside-commits] freeside/httemplate/elements select-table.html,
NONE, 1.1 select-agent.html, 1.1, 1.2 select-pkg_class.html,
NONE, 1.1 tr-select-pkg_class.html, NONE, 1.1
- Next message: [freeside-commits] freeside/FS/FS part_pkg.pm,1.46,1.47
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/cvsroot/freeside/httemplate/search/elements
In directory wavetail:/tmp/cvs-serv26322/httemplate/search/elements
Modified Files:
search.html
Log Message:
start of package class web UI (add/edit package classes, package class selection in package def edit)
Index: search.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/elements/search.html,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- search.html 12 Apr 2006 12:36:39 -0000 1.21
+++ search.html 22 Apr 2006 00:58:40 -0000 1.22
@@ -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.<BR>
+ <% unless ( $opt{'disable_nonefound'} ) { %>
+ No matching <%= $opt{'name'} %> found.<BR>
+ <% } %>
<% } else { %>
<TABLE>
<TR>
<TD VALIGN="bottom">
- <%= $total %> total <%= $opt{'name'} %><BR>
+ <%= $total %> total <%= $opt{'name'} %>
+ <%= defined($opt{'html_posttotal'})
+ ? ( ref($opt{'html_posttotal'})
+ ? &{$opt{'html_posttotal'}}()
+ : $opt{'html_posttotal'}
+ )
+ : ''
+ %>
+ <BR>
<% if ( $opt{'count_addl'} ) { %>
<% my $n=0; foreach my $count ( @{$opt{'count_addl'}} ) { %>
<%= sprintf( $count, $count_arrayref->[++$n] ) %><BR>
<% } %>
<% } %>
</TD>
- <TD ALIGN="right">
- <% $cgi->param('_type', "$xlsname.xls" ); %>
- Download full results<BR>
- as <A HREF="<%= $cgi->self_url %>">Excel spreadsheet</A><BR>
- <% $cgi->param('_type', 'csv'); %>
- as <A HREF="<%= $cgi->self_url %>">CSV file</A>
- </TD>
+ <% unless ( $opt{'disable_download'} ) { %>
+ <TD ALIGN="right">
+ <% $cgi->param('_type', "$xlsname.xls" ); %>
+ Download full results<BR>
+ as <A HREF="<%= $cgi->self_url %>">Excel spreadsheet</A><BR>
+ <% $cgi->param('_type', 'csv'); %>
+ as <A HREF="<%= $cgi->self_url %>">CSV file</A>
+ </TD>
+ <% } %>
</TR>
<TR>
<TD COLSPAN=2>
@@ -471,6 +497,13 @@
</TABLE>
<% } %>
+ <%= defined($opt{'html_foot'})
+ ? ( ref($opt{'html_foot'})
+ ? &{$opt{'html_foot'}}()
+ : $opt{'html_foot'}
+ )
+ : ''
+ %>
<%= include( '/elements/footer.html' ) %>
<% } %>
<% } %>
- Previous message: [freeside-commits] freeside/httemplate/elements select-table.html,
NONE, 1.1 select-agent.html, 1.1, 1.2 select-pkg_class.html,
NONE, 1.1 tr-select-pkg_class.html, NONE, 1.1
- Next message: [freeside-commits] freeside/FS/FS part_pkg.pm,1.46,1.47
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the freeside-commits
mailing list