[Rt-commit] [svn] r1857 - in rt/branches/PLATANO-EXPERIMENTAL-CSS: . html/Elements html/Elements/CollectionAsTable html/Elements/RT__Ticket html/NoAuth

jesse at pallas.eruditorum.org jesse at pallas.eruditorum.org
Thu Nov 11 03:45:39 EST 2004


Author: jesse
Date: Thu Nov 11 03:45:39 2004
New Revision: 1857

Modified:
   rt/branches/PLATANO-EXPERIMENTAL-CSS/   (props changed)
   rt/branches/PLATANO-EXPERIMENTAL-CSS/html/Elements/CollectionAsTable/Header
   rt/branches/PLATANO-EXPERIMENTAL-CSS/html/Elements/CollectionAsTable/Row
   rt/branches/PLATANO-EXPERIMENTAL-CSS/html/Elements/RT__Ticket/ColumnMap
   rt/branches/PLATANO-EXPERIMENTAL-CSS/html/Elements/TicketList
   rt/branches/PLATANO-EXPERIMENTAL-CSS/html/NoAuth/webrt.css
Log:
 r9119 at tinbook:  jesse | 2004-11-11T04:07:26.321289Z
  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/PLATANO-EXPERIMENTAL-CSS/html/Elements/CollectionAsTable/Header
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL-CSS/html/Elements/CollectionAsTable/Header	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL-CSS/html/Elements/CollectionAsTable/Header	Thu Nov 11 03:45:39 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">&nbsp;</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/PLATANO-EXPERIMENTAL-CSS/html/Elements/CollectionAsTable/Row
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL-CSS/html/Elements/CollectionAsTable/Row	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL-CSS/html/Elements/CollectionAsTable/Row	Thu Nov 11 03:45:39 2004
@@ -37,7 +37,7 @@
 foreach my $column (@Format) {
     if ( $column->{title} eq 'NEWLINE' ) {
 	while ($item < $maxitems) {
-	    $m->out("<td>&nbsp;</td>\n");
+	    $m->out('<td class="collection-as-table">>&nbsp;</td>\n');
 	    $item++;
 	}
 	$item = 0;

Modified: rt/branches/PLATANO-EXPERIMENTAL-CSS/html/Elements/RT__Ticket/ColumnMap
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL-CSS/html/Elements/RT__Ticket/ColumnMap	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL-CSS/html/Elements/RT__Ticket/ColumnMap	Thu Nov 11 03:45:39 2004
@@ -134,10 +134,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/PLATANO-EXPERIMENTAL-CSS/html/Elements/TicketList
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL-CSS/html/Elements/TicketList	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL-CSS/html/Elements/TicketList	Thu Nov 11 03:45:39 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/PLATANO-EXPERIMENTAL-CSS/html/NoAuth/webrt.css
==============================================================================
--- rt/branches/PLATANO-EXPERIMENTAL-CSS/html/NoAuth/webrt.css	(original)
+++ rt/branches/PLATANO-EXPERIMENTAL-CSS/html/NoAuth/webrt.css	Thu Nov 11 03:45:39 2004
@@ -706,10 +706,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