[Rt-commit] [svn] r1741 - in rt/branches/3.3-TESTING: .
html/Elements html/Elements/CollectionAsTable
html/Elements/RT__Ticket html/NoAuth
jesse at pallas.eruditorum.org
jesse at pallas.eruditorum.org
Sun Nov 7 10:09:15 EST 2004
Author: jesse
Date: Sun Nov 7 10:09:14 2004
New Revision: 1741
Modified:
rt/branches/3.3-TESTING/ (props changed)
rt/branches/3.3-TESTING/html/Elements/CollectionAsTable/Header
rt/branches/3.3-TESTING/html/Elements/CollectionAsTable/Row
rt/branches/3.3-TESTING/html/Elements/RT__Ticket/ColumnMap
rt/branches/3.3-TESTING/html/Elements/TicketList
rt/branches/3.3-TESTING/html/NoAuth/webrt.css
Log:
r6201 at tinbook: jesse | 2004-11-07T05:35:22.316024Z
Refactoring and restyling the Ticket List to present prettier tables with more human-readable names
Modified: rt/branches/3.3-TESTING/html/Elements/CollectionAsTable/Header
==============================================================================
--- rt/branches/3.3-TESTING/html/Elements/CollectionAsTable/Header (original)
+++ rt/branches/3.3-TESTING/html/Elements/CollectionAsTable/Header Sun Nov 7 10:09:14 2004
@@ -38,47 +38,57 @@
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' ) {
+ while ( $item < $maxitems ) {
+ $m->out(qq{<th class="collection-as-table"> </th>\n});
+ $item++;
+ }
+
+ $item = 0;
$m->out(qq{</TR>\n<TR class="collection-as-table">});
- $item = 0;
}
else {
$m->out('<TH class="collection-as-table">');
my $title = $col->{title};
$title =~ s/^__(.*)__$/$1/o;
- $title = ( $m->comp('/Elements/RT__Ticket/ColumnMap',
- Name => $title,
- Attr => 'title'
- )
- || $title
- );
- if ( $AllowSorting
+ $title = (
+ $m->comp(
+ '/Elements/RT__Ticket/ColumnMap',
+ Name => $title,
+ Attr => 'title'
+ )
+ || $title
+ );
+ if (
+ $AllowSorting
&& $col->{'attribute'}
- && $m->comp('/Elements/RT__Ticket/ColumnMap',
- Name => $col->{'attribute'},
- Attr => 'attribute' )
- )
+ && $m->comp(
+ '/Elements/RT__Ticket/ColumnMap',
+ Name => $col->{'attribute'},
+ Attr => 'attribute'
+ )
+ )
{
$m->out(
- '<a href="' . $BaseURL
+ '<a href="' . $BaseURL
. $m->comp(
'/Elements/QueryString',
%generic_query_args,
OrderBy => (
- $m->comp('/Elements/RT__Ticket/ColumnMap',
- Name => $col->{'attribute'},
- Attr => 'attribute'
- )
+ $m->comp(
+ '/Elements/RT__Ticket/ColumnMap',
+ Name => $col->{'attribute'},
+ Attr => 'attribute'
+ )
|| $col->{'attribute'}
),
Order => ( $ARGS{'Order'} eq 'ASC' ? 'DESC' : 'ASC' )
- ).
- '">' . loc($title) . '</a>'
+ )
+ . '">'
+ . loc($title) . '</a>'
);
}
else {
Modified: rt/branches/3.3-TESTING/html/Elements/CollectionAsTable/Row
==============================================================================
--- rt/branches/3.3-TESTING/html/Elements/CollectionAsTable/Row (original)
+++ rt/branches/3.3-TESTING/html/Elements/CollectionAsTable/Row Sun Nov 7 10:09:14 2004
@@ -37,7 +37,7 @@
foreach my $column (@Format) {
if ( $column->{title} eq 'NEWLINE' ) {
while ($item < $maxitems) {
- $m->out("<td> </td>\n");
+ $m->out('<td class="collection-as-table">> </td>\n');
$item++;
}
$item = 0;
Modified: rt/branches/3.3-TESTING/html/Elements/RT__Ticket/ColumnMap
==============================================================================
--- rt/branches/3.3-TESTING/html/Elements/RT__Ticket/ColumnMap (original)
+++ rt/branches/3.3-TESTING/html/Elements/RT__Ticket/ColumnMap Sun Nov 7 10:09:14 2004
@@ -143,10 +143,12 @@
},
InitialPriority => {
attribute => 'InitialPriority',
+ name => 'Initial Priority',
value => sub { return $_[0]->InitialPriority }
},
FinalPriority => {
attribute => 'FinalPriority',
+ name => 'Final Priority',
value => sub { return $_[0]->FinalPriority }
},
EffectiveId => {
Modified: rt/branches/3.3-TESTING/html/Elements/TicketList
==============================================================================
--- rt/branches/3.3-TESTING/html/Elements/TicketList (original)
+++ rt/branches/3.3-TESTING/html/Elements/TicketList Sun Nov 7 10:09:14 2004
@@ -34,7 +34,7 @@
Page => $Page,
OrderBy => $OrderBy ,
BaseURL => $BaseURL,
- maxitems => \$maxitems &>
+ maxitems => $maxitems &>
% }
% my $i;
@@ -91,6 +91,19 @@
my (@Format) = $m->comp('/Elements/CollectionAsTable/ParseFormat', Format => $Format);
+# Find the maximum number of items in any row, so we can pad the table.
+my $item = 0;
+foreach my $col (@Format) {
+ $item++;
+ if ( $col->{title} eq 'NEWLINE' ) {
+ $item = 0;
+ }
+ else {
+ $maxitems = $item if $item > $maxitems;
+ }
+}
+
+
$Collection->OrderBy(FIELD => $OrderBy, ORDER => $Order);
$Collection->RowsPerPage($Rows) if ($Rows);
$Collection->GotoPage($Page-1); # SB uses page 0 as the first page
Modified: rt/branches/3.3-TESTING/html/NoAuth/webrt.css
==============================================================================
--- rt/branches/3.3-TESTING/html/NoAuth/webrt.css (original)
+++ rt/branches/3.3-TESTING/html/NoAuth/webrt.css Sun Nov 7 10:09:14 2004
@@ -548,7 +548,6 @@
BLOCKQUOTE {
font-style: italic;
- /* color: #990; */
}
.emphasized {
@@ -588,10 +587,8 @@
padding-left: .5em;
padding-right: .5em;
color: #333333;
- background-color: #999999;
+ background-color: #cccccc;
white-space: nowrap;
- border-collapse: collapse;
- border-bottom: solid #999999 1px;
}
TD.collection-as-table { text-align: left;
More information about the Rt-commit
mailing list