X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FElements%2FCollectionAsTable%2FRow;h=469737b1d6158240bba7da2e25e2f8a0574ecc85;hp=9037e5d119e3e814e1fbdb98368aeb3c4b0e5959;hb=44dd00a3ff974a17999e86e64488e996edc71e3c;hpb=0fb307c305e4bc2c9c27dc25a3308beae3a4d33c diff --git a/rt/share/html/Elements/CollectionAsTable/Row b/rt/share/html/Elements/CollectionAsTable/Row index 9037e5d11..469737b1d 100644 --- a/rt/share/html/Elements/CollectionAsTable/Row +++ b/rt/share/html/Elements/CollectionAsTable/Row @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2019 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -57,10 +57,14 @@ $Class => 'RT__Ticket' $Classes => '' <%init> +# it's a hack, but it has to be applied in every ticket search regardless +# of format, so... +if ( $record and $record->isa('RT::Ticket') and $record->IsUnreplied ) { + $Classes .= ' unreplied-ticket'; +} $m->out( '' . "\n" ); -use HTML::Entities; my $item; foreach my $column (@Format) { if ( defined $column->{title} && $column->{title} eq 'NEWLINE' ) { @@ -77,8 +81,7 @@ foreach my $column (@Format) { next; } - my $class = $column->{class} ? encode_entities( $column->{class}, q{'"&<>} ) : 'collection-as-table'; - $m->out(qq{{class} ? $m->interp->apply_escapes($column->{class}, 'h') : 'collection-as-table'; my %attrs; foreach my $attr (qw(style align)) { @@ -131,7 +134,20 @@ foreach my $column (@Format) { Arguments => [$record, $i], ); } - s/\n/
/gs for grep { defined } @out; + + $m->callback( + CallbackName => 'EachField', + Record => $record, + Format => \@Format, + Column => $column, + Classes => \$class, + Align => \$attrs{align}, + Style => \$attrs{style}, + Colspan => \$attrs{colspan}, + Out => \@out, + ); + + $m->out(qq{out( $_ .'="'. $m->interp->apply_escapes( $attrs{$_} => 'h' ) .'"' ) foreach grep $attrs{$_}, qw(align style colspan);