[Rt-commit] rtir branch, 2.9/sortable-children-lists, created. 3.0.0rc1-49-g7679d52

Kevin Falcone falcone at bestpractical.com
Wed Apr 10 14:09:34 EDT 2013


The branch, 2.9/sortable-children-lists has been created
        at  7679d52fcad68a0819d7b722e52b6d074a17bb7e (commit)

- Log -----------------------------------------------------------------
commit 7679d52fcad68a0819d7b722e52b6d074a17bb7e
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Wed Apr 10 12:43:26 2013 -0400

    Allow sorting on Show Children pages
    
    We have to pass through id, Queue, Statuses and SelectedTickets, so that
    either means hardcoding those 4 in Elements/ShowChildren or passing
    %ARGS around a lot and controlling with PassArguments.

diff --git a/html/RTIR/Elements/ShowChildren b/html/RTIR/Elements/ShowChildren
index d0f6327..7b836a5 100644
--- a/html/RTIR/Elements/ShowChildren
+++ b/html/RTIR/Elements/ShowChildren
@@ -35,6 +35,7 @@
 <i><% loc("Check box to unlink") %></i><br />
 % }
 <& /Elements/TicketList, 
+   %ARGS,
    Collection     => $children,
    DisplayFormat  => ($Delete? "__CheckBox__, $Format": $Format),
    Format         => $Format,
@@ -42,6 +43,8 @@
    ShowHeader     => $ShowHeader,
    OrderBy        => $OrderBy,
    ShowNavigation => 0,
+   AllowSorting   => $AllowSorting,
+   PassArguments  => $PassArguments,
 &>
 % unless( $children->Count ) {
 %   if ( $NoTicketsCaption ) {
@@ -97,4 +100,7 @@ $NoTicketsCaption => undef,
 
 $ShowHeader => 0
 $ShowStatusesSelector => 0
+
+$AllowSorting => undef
+$PassArguments => undef
 </%ARGS>
diff --git a/html/RTIR/Incident/Children/index.html b/html/RTIR/Incident/Children/index.html
index 827edc5..007b901 100644
--- a/html/RTIR/Incident/Children/index.html
+++ b/html/RTIR/Incident/Children/index.html
@@ -38,6 +38,7 @@
 <input type="hidden" name="Queue" value="<% $Queue %>" />
 
 <& /RTIR/Elements/ShowChildren,
+    %ARGS,
     Ticket               => $Incident,
     Queue                => $Queue,
     Statuses             => [@Statuses],
@@ -45,6 +46,8 @@
     Delete               => $delete,
     ShowHeader           => 1,
     ShowStatusesSelector => 1,
+    AllowSorting         => 1,
+    PassArguments        => [qw(Query Format Rows Page Order OrderBy Queue id SelectedTicekts Statuses)],
 &>
 
 <& /Elements/Submit, Name => 'Unlink', Label => loc('Unlink Report') &>

-----------------------------------------------------------------------


More information about the Rt-commit mailing list