X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FElements%2FCollectionAsTable%2FRow;h=3b04072a5344b04e23ded975671827eb3d8e2f96;hp=f91520952de594f4a7a9eab17d1b3d898fb56a57;hb=187086c479a09629b7d180eec513fb7657f4e291;hpb=85e677b86fc37c54e6de2b06340351a28f5a5916 diff --git a/rt/share/html/Elements/CollectionAsTable/Row b/rt/share/html/Elements/CollectionAsTable/Row index f91520952..3b04072a5 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-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2018 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -57,6 +57,11 @@ $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" ); @@ -77,7 +82,6 @@ foreach my $column (@Format) { } my $class = $column->{class} ? $m->interp->apply_escapes($column->{class}, 'h') : 'collection-as-table'; - $m->out(qq{ [$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);