summaryrefslogtreecommitdiff
path: root/httemplate/search/elements
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2013-06-19 14:56:25 -0700
committerMark Wells <mark@freeside.biz>2013-06-19 14:56:25 -0700
commit03dfd875f74410d283060a4e54eaedf845bfcd39 (patch)
treeb798f5bf4de51be5f7a32bf869d54c20d198ec89 /httemplate/search/elements
parent67e981bedc57f0834bdb43069366e6026c058705 (diff)
improve accuracy of historical package counts, #8461
Diffstat (limited to 'httemplate/search/elements')
-rw-r--r--httemplate/search/elements/search-html.html8
-rw-r--r--httemplate/search/elements/search-xls.html5
-rw-r--r--httemplate/search/elements/search.html2
3 files changed, 13 insertions, 2 deletions
diff --git a/httemplate/search/elements/search-html.html b/httemplate/search/elements/search-html.html
index e760bc546..bee33cfe8 100644
--- a/httemplate/search/elements/search-html.html
+++ b/httemplate/search/elements/search-html.html
@@ -253,6 +253,12 @@
% $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'};
@@ -262,7 +268,7 @@
% $trid = $row->$link_field();
% }
% }
- <TR ID="<%$trid |h%>">
+ <TR ID="<%$trid |h%>"<%$rowstyle%>>
% if ( $opt{'fields'} ) {
diff --git a/httemplate/search/elements/search-xls.html b/httemplate/search/elements/search-xls.html
index bc844a579..8334497d2 100644
--- a/httemplate/search/elements/search-xls.html
+++ b/httemplate/search/elements/search-xls.html
@@ -32,7 +32,10 @@ my $XLS = new IO::Scalar \$data;
my $workbook = $format->{class}->new($XLS)
or die "Error opening Excel file: $!";
-my $worksheet = $workbook->add_worksheet(substr($opt{'title'},0,31));
+my $title = $opt{'title'};
+$title =~ s/[\[\]\:\*\?\/\/]//g;
+$title = substr($title, 0, 31);
+my $worksheet = $workbook->add_worksheet($title);
$worksheet->protect();
diff --git a/httemplate/search/elements/search.html b/httemplate/search/elements/search.html
index d44b45465..8f6272030 100644
--- a/httemplate/search/elements/search.html
+++ b/httemplate/search/elements/search.html
@@ -453,4 +453,6 @@ if ( ref($opt{query}) ) {
$header ||= $sth->{NAME};
}
+push @$rows, $opt{'footer_data'} if $opt{'footer_data'};
+
</%init>