chiark
/
gitweb
/
~yarrgweb
/
ypp-sc-tools.db-live.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
More commodity orders in source-info.txt
[ypp-sc-tools.db-live.git]
/
yarrg
/
CommodsWeb.pm
diff --git
a/yarrg/CommodsWeb.pm
b/yarrg/CommodsWeb.pm
index 37bbfe7dcbcc2d878eb5a2d7016458b616358e35..ab2a4a30a322e002135422a558eb1ecaff0b4c3e 100644
(file)
--- a/
yarrg/CommodsWeb.pm
+++ b/
yarrg/CommodsWeb.pm
@@
-50,8
+50,9
@@
BEGIN {
@ISA = qw(Exporter);
@EXPORT = qw(&dbw_connect &dbw_filename &ocean_list &sourcebasedir
&to_json_shim &to_json_protecttags
@ISA = qw(Exporter);
@EXPORT = qw(&dbw_connect &dbw_filename &ocean_list &sourcebasedir
&to_json_shim &to_json_protecttags
- &set_ctype_utf8 &webdatadir
&printable
+ &set_ctype_utf8 &webdatadir
&expected_error &dbw_lookup_string
&expected_error &dbw_lookup_string
+ &printable &tr_datarow
&prettyprint_age &meta_prettyprint_age);
%EXPORT_TAGS = ( );
&prettyprint_age &meta_prettyprint_age);
%EXPORT_TAGS = ( );
@@
-203,12
+204,24
@@
sub expected_error ($) {
sub printable ($) { # printable($m) where $m is the Mason request object
my ($m) = @_;
my $a= scalar $m->caller_args(-1);
sub printable ($) { # printable($m) where $m is the Mason request object
my ($m) = @_;
my $a= scalar $m->caller_args(-1);
- foreach my $t (qw(pdf ps html)) {
+ foreach my $t (qw(pdf ps html
pdf2 ps2
)) {
return $t if $a->{"printable_$t"};
}
return 0;
}
return $t if $a->{"printable_$t"};
}
return 0;
}
+sub tr_datarow ($$) {
+ my ($m, $lineno) = @_;
+ $lineno &= 1;
+ if (!printable($m)) {
+ $m->print("<tr class=\"datarow$lineno\">");
+ } else {
+ $m->print("<tr bgcolor=\"".
+ ($lineno ? "#ffffff" : "#e3e3e3" ).
+ "\">");
+ }
+}
+
package CommodsWeb::ExpectedError;
sub emsg ($) {
package CommodsWeb::ExpectedError;
sub emsg ($) {