X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FElements%2FCollectionAsTable%2FRow;h=172e2c57ae3aa147b9cdcfc574171ca6f50ee868;hp=b83943aa581e667a77c912adb68bea7433e7446e;hb=de9d037528895f7151a9aead6724ce2df95f9586;hpb=919e930aa9279b3c5cd12b593889cd6de79d67bf diff --git a/rt/share/html/Elements/CollectionAsTable/Row b/rt/share/html/Elements/CollectionAsTable/Row index b83943aa5..172e2c57a 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-2015 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2017 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);