projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix urls
[freeside.git]
/
httemplate
/
search
/
elements
/
search-html.html
diff --git
a/httemplate/search/elements/search-html.html
b/httemplate/search/elements/search-html.html
index
297774d
..
75b0e9a
100644
(file)
--- a/
httemplate/search/elements/search-html.html
+++ b/
httemplate/search/elements/search-html.html
@@
-32,11
+32,17
@@
%
% if ( $type eq 'html-print' ) {
%
% if ( $type eq 'html-print' ) {
- <% include( '/elements/header-popup.html', $opt{'title'} ) %>
+ <% $opt{nohtmlheader}
+ ? ''
+ : include( '/elements/header-popup.html', $opt{'title'} )
+ %>
% } elsif ( $type eq 'select' ) {
% } elsif ( $type eq 'select' ) {
- <% include( '/elements/header-popup.html', $opt{'title'} ) %>
+ <% $opt{nohtmlheader}
+ ? ''
+ : include( '/elements/header-popup.html', $opt{'title'} )
+ %>
<% defined($opt{'html_init'})
? ( ref($opt{'html_init'})
? &{$opt{'html_init'}}()
<% defined($opt{'html_init'})
? ( ref($opt{'html_init'})
? &{$opt{'html_init'}}()
@@
-54,9
+60,11
@@
% # @menubar = ( 'Main menu' => $p );
% }
% # @menubar = ( 'Main menu' => $p );
% }
- <% include( '/elements/header.html', $opt{'title'},
- include( '/elements/menubar.html', @menubar )
- )
+ <% $opt{nohtmlheader}
+ ? ''
+ : include( '/elements/header.html', $opt{'title'},
+ include( '/elements/menubar.html', @menubar )
+ )
%>
<% defined($opt{'html_init'})
%>
<% defined($opt{'html_init'})
@@
-95,7
+103,7
@@
% $cgi->delete('maxrecords');
% $cgi->param('_dummy', 1);
% $cgi->delete('maxrecords');
% $cgi->param('_dummy', 1);
- ( show <SELECT NAME="maxrecords" onChange="window.location = '<%
$cgi->self_url
%>;maxrecords=' + this.options[this.selectedIndex].value;">
+ ( show <SELECT NAME="maxrecords" onChange="window.location = '<%
"$self_url?". $cgi->query_string
%>;maxrecords=' + this.options[this.selectedIndex].value;">
% foreach my $max ( map { $_ * $confmax } qw( 1 5 10 25 ) ) {
<OPTION VALUE="<% $max %>" <% ( $maxrecords == $max ) ? 'SELECTED' : '' %>><% $max %></OPTION>
% foreach my $max ( map { $_ * $confmax } qw( 1 5 10 25 ) ) {
<OPTION VALUE="<% $max %>" <% ( $maxrecords == $max ) ? 'SELECTED' : '' %>><% $max %></OPTION>
@@
-136,18
+144,18
@@
Download full results<BR>
% $cgi->param('_type', "$xlsname.xls" );
Download full results<BR>
% $cgi->param('_type', "$xlsname.xls" );
- as <A HREF="<%
$cgi->self_url
%>">Excel spreadsheet</A><BR>
+ as <A HREF="<%
"$self_url?". $cgi->query_string
%>">Excel spreadsheet</A><BR>
% $cgi->param('_type', 'csv');
% $cgi->param('_type', 'csv');
- as <A HREF="<%
$cgi->self_url
%>">CSV file</A><BR>
+ as <A HREF="<%
"$self_url?". $cgi->query_string
%>">CSV file</A><BR>
-% $cgi->param('_type', 'html-print');
- as <A HREF="<% $cgi->self_url %>">printable copy</A>
+% if ( defined($opt{xml_elements}) ) {
+% $cgi->param('_type', 'xml');
+ as <A HREF="<% "$self_url?". $cgi->query_string %>">XML file</A><BR>
+% }
- <% $opt{'extra_choices_callback'}
- ? &{$opt{'extra_choices_callback'}}($cgi->query_string)
- : ''
- %>
+% $cgi->param('_type', 'html-print');
+ as <A HREF="<% "$self_url?". $cgi->query_string %>">printable copy</A>
</TD>
% $cgi->param('_type', "html" );
</TD>
% $cgi->param('_type', "html" );
@@
-182,8
+190,13
@@
<TR>
% my $h2 = 0;
<TR>
% my $h2 = 0;
+% my $colspan = 0;
% foreach my $header ( @{ $opt{header} } ) {
% foreach my $header ( @{ $opt{header} } ) {
+% $colspan-- if $colspan > 0;
+% next if $colspan;
+%
% my $label = ref($header) ? $header->{label} : $header;
% my $label = ref($header) ? $header->{label} : $header;
+% $colspan = ref($header) ? $header->{colspan} : 0;
% my $rowspan = 1;
% my $style = '';
% if ( $opt{header2} ) {
% my $rowspan = 1;
% my $style = '';
% if ( $opt{header2} ) {
@@
-198,6
+211,7
@@
<TH CLASS = "grid"
BGCOLOR = "#cccccc"
ROWSPAN = "<% $rowspan %>"
<TH CLASS = "grid"
BGCOLOR = "#cccccc"
ROWSPAN = "<% $rowspan %>"
+ <% $colspan ? 'COLSPAN = "'.$colspan.'"' : '' %>
<% $style %>
>
<% $style %>
>
@@
-346,7
+360,9
@@
% }
% $a = qq(<A HREF="$a"$onclick>);
% }
% }
% $a = qq(<A HREF="$a"$onclick>);
% }
-%
+% elsif ( $onclick ) {
+% $a = qq(<A HREF="javascript:void(0);"$onclick>);
+% }
% }
%
% }
% }
%
% }
@@
-413,9
+429,11
@@
% }
% if ( $type eq 'html-print' ) {
% }
% if ( $type eq 'html-print' ) {
+% unless ( $opt{nohtmlheader} ) {
</BODY></HTML>
</BODY></HTML>
+% }
% } else {
<% defined($opt{'html_foot'})
% } else {
<% defined($opt{'html_foot'})
@@
-426,7
+444,10
@@
: ''
%>
: ''
%>
- <% include( '/elements/footer.html' ) %>
+ <% $opt{nohtmlheader}
+ ? ''
+ : include( '/elements/footer.html' )
+ %>
% }
% }
@@
-443,6
+464,7
@@
my $confmax = $args{'confmax'};
my $maxrecords = $args{'maxrecords'};
my $offset = $args{'offset'};
my %opt = %{ $args{'opt'} };
my $maxrecords = $args{'maxrecords'};
my $offset = $args{'offset'};
my %opt = %{ $args{'opt'} };
+my $self_url = $opt{'url'} || $cgi->url('-path_info' => 1, '-full' =>1);
my $count_sth = dbh->prepare($opt{'count_query'})
or die "Error preparing $opt{'count_query'}: ". dbh->errstr;
my $count_sth = dbh->prepare($opt{'count_query'})
or die "Error preparing $opt{'count_query'}: ". dbh->errstr;