[Rt-commit] [svn] r1113 - rt/branches/rt-3.1/html/Elements
leira at pallas.eruditorum.org
leira at pallas.eruditorum.org
Fri Jun 18 12:22:38 EDT 2004
Author: leira
Date: Fri Jun 18 12:22:37 2004
New Revision: 1113
Modified:
rt/branches/rt-3.1/html/Elements/TicketList
Log:
RT-Ticket: 5478
RT-Status: resolved
RT-Update: correspond
We now pay attention to the longest row when parsing the header, and pad the rows for the entries if necessary, so that the shadings continues all the way across.
Modified: rt/branches/rt-3.1/html/Elements/TicketList
==============================================================================
--- rt/branches/rt-3.1/html/Elements/TicketList (original)
+++ rt/branches/rt-3.1/html/Elements/TicketList Fri Jun 18 12:22:37 2004
@@ -31,11 +31,13 @@
Rows => $Rows,
Page => $Page,
OrderBy => $OrderBy ,
- BaseURL => $BaseURL &>
+ BaseURL => $BaseURL,
+ maxitems => \$maxitems &>
+
% my $i;
% while (my $record = $Collection->Next) {
% $i++;
-<& .Row, Format => \@Format, i => $i, record => $record &>
+<& .Row, Format => \@Format, i => $i, record => $record, maxitems => $maxitems &>
% }
</TABLE>
% if ($ShowNavigation) {
@@ -60,6 +62,7 @@
% }
% }
<%INIT>
+my $maxitems;
use vars qw($COLUMN_MAP $CUSTOM_FIELD_MAP);
@@ -440,6 +443,7 @@
$Query => undef
$Rows => undef
$Page => undef
+$maxitems => undef
</%ARGS>
<TR>
<%perl>
@@ -448,9 +452,14 @@
my %generic_query_args = ( Query => $Query, Rows => $Rows, Page => $Page );
+my $item = 0;
+$$maxitems = 0;
foreach my $col (@Format) {
+ $item++;
+ $$maxitems = $item if $item > $$maxitems;
if ( $col->{title} eq 'NEWLINE' ) {
$m->out('</TR> <TR>');
+ $item = 0;
}
else {
$m->out('<TH align="center">');
@@ -492,15 +501,23 @@
$i => undef
@Format => undef
$record => undef
+$maxitems => undef
</%ARGS>
<%PERL>
$m->out( '<TR class="' . ( $i % 2 ? 'oddline' : 'evenline' ) . '" >' );
+my $item;
foreach my $column (@Format) {
if ( $column->{title} eq 'NEWLINE' ) {
+ while ($item < $maxitems) {
+ $m->out("<td> </td>\n");
+ $item++;
+ }
+ $item = 0;
$m->out('</TR>');
$m->out( '<TR class="' . ( $i % 2 ? 'oddline' : 'evenline' ) . '" >' );
next;
}
+ $item++;
$m->out('<td align="left">');
foreach my $subcol ( @{ $column->{output} } ) {
if ( $subcol =~ /^__(.*?)__$/o ) {
More information about the Rt-commit
mailing list