#####################################################
# S P R E A D S H E E T F O R M A T D I S P L A Y
#
# written by JPDeni
#
# Written 13 Jul 2000
#####################################################
#
# This is a non-autogenerated way to display search results in a
# spreadsheet format, with all fields in one table and each record in a row on the table.
# This is for use with a short/long display mod.
#####################################################
# Replace sub html_record with the following:
sub html_record {
# --------------------------------------------------------
# How a record will be displayed. This is used primarily in returning search results and how it is formatted. The record to
# be displayed will be in the %rec hash. This is the "short display" -- the list of records that are returned from a search.
my (%rec) = @_;
# create link to full display
$record_number = ((($nh - 1) * $db_max_hits) + $rec_count);
$long_url = $ENV{'QUERY_STRING'};
$long_url =~ s/\&nh=\d+//;
$long_url =~ s/\&mh=\d+//;
$long_url = "$db_script_url?$long_url&nh=$record_number&mh=1";
print qq|
$rec{'Field'} |
$rec{'Field'} |
$rec{'Field'} |
$rec{'Field'} | |;
# Add or remove columns as needed. Be sure you add the $long_url link to one of your fields
# <-- End of short display formatting -- >
}
#####################################################
# In sub html_view_success, change
for (0 .. $numhits - 1) {
print "";
&html_record (&array_to_hash($_, @hits));
}
# to
print qq|
| FieldName | FieldName | FieldName | FieldName |
\n|;
for (0 .. $numhits - 1) {
print "";
&html_record (&array_to_hash($_, @hits));
print "
\n";
}
print "
";
#####################################################
# In sub html_delete_form, change
for (0 .. $numhits - 1) {
%tmp = &array_to_hash($_, @hits);
print qq|\n|;
}
# to
print qq|
";
#####################################################
# In sub html_modify_form, change
for (0 .. $numhits - 1) {
%tmp = &array_to_hash($_, @hits);
print qq|\n|;
}
# to
print qq|
";