[Rt-commit] rt branch, 4.2/collection-row-callback, created. rt-4.2.12-95-gc93620c

Shawn Moore shawn at bestpractical.com
Mon Jan 11 16:10:43 EST 2016


The branch, 4.2/collection-row-callback has been created
        at  c93620ca042609a7f0036b435791cc5acf15f0a0 (commit)

- Log -----------------------------------------------------------------
commit c93620ca042609a7f0036b435791cc5acf15f0a0
Author: Shawn M Moore <shawn at bestpractical.com>
Date:   Mon Jan 11 21:12:21 2016 +0000

    Add an EachField callback to CollectionAsTable/Row

diff --git a/share/html/Elements/CollectionAsTable/Row b/share/html/Elements/CollectionAsTable/Row
index deaa312..d4fe721 100644
--- a/share/html/Elements/CollectionAsTable/Row
+++ b/share/html/Elements/CollectionAsTable/Row
@@ -77,7 +77,6 @@ foreach my $column (@Format) {
     }
 
     my $class = $column->{class} ? $m->interp->apply_escapes($column->{class}, 'h') : 'collection-as-table';
-    $m->out(qq{<td class="$class" });
 
     my %attrs;
     foreach my $attr (qw(style align)) {
@@ -131,6 +130,20 @@ foreach my $column (@Format) {
         );
     }
 
+    $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{<td class="$class" });
+
     $m->out( $_ .'="'. $m->interp->apply_escapes( $attrs{$_} => 'h' ) .'"' )
         foreach grep $attrs{$_}, qw(align style colspan);
 

-----------------------------------------------------------------------


More information about the rt-commit mailing list