[Rt-commit] r13091 - in rt/branches/3.8-TESTING: . share/html/Elements share/html/Search share/html/SelfService/Elements

kyoki at bestpractical.com kyoki at bestpractical.com
Mon Jun 9 18:30:18 EDT 2008


Author: kyoki
Date: Mon Jun  9 18:30:18 2008
New Revision: 13091

Modified:
   rt/branches/3.8-TESTING/   (props changed)
   rt/branches/3.8-TESTING/share/html/Elements/CollectionAsTable/Header
   rt/branches/3.8-TESTING/share/html/Elements/CollectionList
   rt/branches/3.8-TESTING/share/html/Elements/ShowSearch
   rt/branches/3.8-TESTING/share/html/Search/Bulk.html
   rt/branches/3.8-TESTING/share/html/Search/Results.html
   rt/branches/3.8-TESTING/share/html/SelfService/Elements/MyRequests

Log:
 r22678 at nyx:  kyoki | 2008-06-09 17:28:20 -0400
 fixed problem with queues only being shown one at a time
 r22679 at nyx:  kyoki | 2008-06-09 17:28:44 -0400
 replaced all calls to TicketList with calls to CollectionList
 r22680 at nyx:  kyoki | 2008-06-09 18:27:36 -0400
 RT-Ticket: 8407
 RT-Status: Resolved
 RT-Update: Correspond
 Applied patch to make sortable result pages with CollectionList. Thanks Nicholas Clark (nick at ccl4.org)


Modified: rt/branches/3.8-TESTING/share/html/Elements/CollectionAsTable/Header
==============================================================================
--- rt/branches/3.8-TESTING/share/html/Elements/CollectionAsTable/Header	(original)
+++ rt/branches/3.8-TESTING/share/html/Elements/CollectionAsTable/Header	Mon Jun  9 18:30:18 2008
@@ -55,7 +55,7 @@
 $Query        => undef
 $Rows         => undef
 $Page         => undef
-
+$GenericQueryArgs => undef
 $maxitems     => undef
 
 $AllowSorting  => undef
@@ -65,9 +65,9 @@
 <tr class="collection-as-table">
 <%PERL>
 
-my %generic_query_args = map { $_ => $ARGS{$_} } @PassArguments;
+my $generic_query_args = $GenericQueryArgs || {map { $_ => $ARGS{$_} } @PassArguments};
 # backward compatibility workaround
-$generic_query_args{'Format'} = $FormatString if grep $_ eq 'Format', @PassArguments;
+$generic_query_args->{'Format'} = $FormatString if grep $_ eq 'Format', @PassArguments;
 
 my $item = 0;
 foreach my $col ( @Format ) {
@@ -132,7 +132,7 @@
         $m->out(
             '<a href="' . $BaseURL
             . $m->comp( '/Elements/QueryString',
-                %generic_query_args,
+                %$generic_query_args,
                 OrderBy => $attr, Order => $new_order
             )
             . '">'. $title .'</a>'

Modified: rt/branches/3.8-TESTING/share/html/Elements/CollectionList
==============================================================================
--- rt/branches/3.8-TESTING/share/html/Elements/CollectionList	(original)
+++ rt/branches/3.8-TESTING/share/html/Elements/CollectionList	Mon Jun  9 18:30:18 2008
@@ -66,8 +66,7 @@
 }
 
 $Collection->RowsPerPage( $Rows ) if $Rows;
-$Page = 1
-  unless $Page && $Page > 0;    # workaround problems with Page = '' or undef
+$Page = 1 unless $Page && $Page > 0;    # workaround problems with $Page = '' or undef
 $Collection->GotoPage( $Page - 1 ); # SB uses page 0 as the first page
 
 # DisplayFormat lets us use a "temporary" format for display, while 
@@ -114,6 +113,7 @@
 	   Page         => $Page,
 	   AllowSorting => $AllowSorting, 
 	   BaseURL      => $BaseURL,
+	   GenericQueryArgs => $GenericQueryArgs,
 	   maxitems     => $maxitems,
 	   );
 }
@@ -161,7 +161,7 @@
 $DisplayFormat => undef
 @Order         => ()
 @OrderBy       => ()
-
+$GenericQueryArgs => undef
 $Rows          => undef
 $Page          => 1
 $Title         => loc('Ticket Search')
@@ -172,6 +172,5 @@
 $ShowNavigation => 1
 $ShowHeader     => 1
 $ShowEmpty      => 0
-$IsTicket => 0
 $Query => 0
 </%ARGS>

Modified: rt/branches/3.8-TESTING/share/html/Elements/ShowSearch
==============================================================================
--- rt/branches/3.8-TESTING/share/html/Elements/ShowSearch	(original)
+++ rt/branches/3.8-TESTING/share/html/Elements/ShowSearch	Mon Jun  9 18:30:18 2008
@@ -50,14 +50,14 @@
     title_href => $query_link_url.$QueryString,
     titleright => $customize ? loc('Edit') : '',
     titleright_href => $customize &>
-<& $query_display_component, %$ProcessedSearchArg, ShowNavigation => 0 &>
+<& $query_display_component, %$ProcessedSearchArg, ShowNavigation => 0, Class => 'RT::Tickets' &>
 </&>
 <%init>
 my $search;
 my $user = $session{'CurrentUser'}->UserObj;
 my $SearchArg;
 my $customize;
-my $query_display_component = '/Elements/TicketList';
+my $query_display_component = '/Elements/CollectionList';
 my $query_link_url = 'Search/Results.html';
 
 if ($SavedSearch) {

Modified: rt/branches/3.8-TESTING/share/html/Search/Bulk.html
==============================================================================
--- rt/branches/3.8-TESTING/share/html/Search/Bulk.html	(original)
+++ rt/branches/3.8-TESTING/share/html/Search/Bulk.html	Mon Jun  9 18:30:18 2008
@@ -60,7 +60,7 @@
 % foreach my $var qw(Query Format OrderBy Order Rows Page) {
 <input type="hidden" class="hidden" name="<%$var%>" value="<%$ARGS{$var} || ''%>" />
 %}
-<& /Elements/TicketList, Query => $Query,
+<& /Elements/CollectionList, Query => $Query,
     DisplayFormat => $Format,
     Format => $ARGS{'Format'},
     Verbatim => 1,
@@ -69,7 +69,8 @@
     Order => $Order,
     Rows => $Rows,
     Page => $Page,
-    BaseURL => RT->Config->Get('WebPath')."/Search/Bulk.html?"
+    BaseURL => RT->Config->Get('WebPath')."/Search/Bulk.html?",
+    Class => 'RT::Tickets'
    &>
 
 % $m->callback(CallbackName => 'AfterTicketList', ARGSRef => \%ARGS);

Modified: rt/branches/3.8-TESTING/share/html/Search/Results.html
==============================================================================
--- rt/branches/3.8-TESTING/share/html/Search/Results.html	(original)
+++ rt/branches/3.8-TESTING/share/html/Search/Results.html	Mon Jun  9 18:30:18 2008
@@ -56,7 +56,7 @@
     Rows => $Rows,
     OrderBy => $OrderBy,
     Order => $Order &>
-<& /Elements/TicketList, 
+<& /Elements/CollectionList, 
     Query => $Query,
     AllowSorting => 1,
     OrderBy => $OrderBy,
@@ -64,6 +64,7 @@
     Rows => $Rows,
     Page => $Page,
     Format => $Format,
+    Class => 'RT::Tickets',
     BaseURL => $BaseURL
 
    &>

Modified: rt/branches/3.8-TESTING/share/html/SelfService/Elements/MyRequests
==============================================================================
--- rt/branches/3.8-TESTING/share/html/SelfService/Elements/MyRequests	(original)
+++ rt/branches/3.8-TESTING/share/html/SelfService/Elements/MyRequests	Mon Jun  9 18:30:18 2008
@@ -46,12 +46,15 @@
 %# 
 %# END BPS TAGGED BLOCK }}}
 <&| /Widgets/TitleBox, title =>  $title &>
-<& /Elements/TicketList, Title   => $title,
+<& /Elements/CollectionList, Title   => $title,
 			 Format  => $Format, 
 			 Query   => $Query, 
 			 Order   => $Order, 
 			 OrderBy => $OrderBy,
 			 BaseURL => $BaseURL,
+			 GenericQueryArgs => $GenericQueryArgs,
+			 AllowSorting => $AllowSorting,
+			 Class   => 'RT::Tickets',
 			 Page    => $Page &>
 </&>
 
@@ -65,8 +68,6 @@
         . join( ' OR ', map "Status = '$_'", @status )
         . " )";
 }
-my $Order = "ASC";
-my $OrderBy = "Created";
 my $Format = qq{
    '<B><A HREF="}. RT->Config->Get('WebPath') .qq{/SelfService/Display.html?id=__id__">__id__</a></B>/TITLE:#',
    '<B><A HREF="}. RT->Config->Get('WebPath') .qq{/SelfService/Display.html?id=__id__">__Subject__</a></B>/TITLE:Subject',
@@ -81,4 +82,8 @@
 @status => ('open', 'new', 'stalled')
 $BaseURL => undef
 $Page => 1
+$GenericQueryArgs => undef
+$AllowSorting => undef
+$Order => "ASC"
+$OrderBy => "Created"
 </%ARGS>


More information about the Rt-commit mailing list