[Rt-commit] rt branch, 4.2/users-collection-header, created. rt-4.2.3-169-g4853349
Wallace Reis
wreis at bestpractical.com
Tue Apr 29 14:24:42 EDT 2014
The branch, 4.2/users-collection-header has been created
at 48533498b0a9d69626844f57cb41786c7a05e5fe (commit)
- Log -----------------------------------------------------------------
commit 48533498b0a9d69626844f57cb41786c7a05e5fe
Author: Wallace Reis <wreis at bestpractical.com>
Date: Tue Apr 29 15:18:11 2014 -0300
Collections - Align the attr label with row data
Respect the "align" attribute, but to also fall back to the "align"
value provided by the columnmap in cases where the format does not
explicitly define one.
This fixes especially the user collection listing page, but the other
types searches will reap the benefits of the fix.
diff --git a/share/html/Elements/CollectionAsTable/Header b/share/html/Elements/CollectionAsTable/Header
index d311002..1a0c955 100644
--- a/share/html/Elements/CollectionAsTable/Header
+++ b/share/html/Elements/CollectionAsTable/Header
@@ -71,6 +71,8 @@ $generic_query_args->{'Format'} = $FormatString if grep $_ eq 'Format', @PassArg
my $item = 0;
foreach my $col ( @Format ) {
+ my $attr = $col->{'attribute'} || $col->{'last_attribute'};
+
my $title = $col->{'title'} || '';
if ( $title eq 'NEWLINE' ) {
while ( $item < $maxitems ) {
@@ -93,13 +95,22 @@ foreach my $col ( @Format ) {
$m->out('<th class="collection-as-table"');
$m->out(' colspan="' . $m->interp->apply_escapes($span => 'h') . '"')
if $span;
+
+ my $align = $col->{'align'} || do {
+ my $tmp_columnmap = $m->comp( '/Elements/ColumnMap',
+ Class => $Class,
+ Name => $attr,
+ Attr => 'align',
+ );
+ ProcessColumnMapValue( $tmp_columnmap, Arguments => [ $attr ] );
+ };
+ $m->out(qq{ style="text-align: $align"}) if $align;
$m->out('>');
my $loc_title;
# if title is not defined then use defined attribute or last
# one we saw in the format
unless ( defined $col->{'title'} ) {
- my $attr = $col->{'attribute'} || $col->{'last_attribute'};
my $tmp = $m->comp( '/Elements/ColumnMap',
Class => $Class,
Name => $attr,
-----------------------------------------------------------------------
More information about the rt-commit
mailing list