Skip to content

Commit

Permalink
Allow sorting on Show Children pages
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jibsheet authored and sunnavy committed Oct 20, 2015
1 parent b10018f commit 9c90ec5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions html/RTIR/Elements/ShowChildren
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,16 @@
<i><% loc("Check box to unlink") %></i><br />
% }
<& /Elements/CollectionList,
%ARGS,
Collection => $children,
DisplayFormat => ($Delete? "__CheckBox__, $Format": $Format),
Format => $Format,
Rows => $Rows,
ShowHeader => $ShowHeader,
OrderBy => $OrderBy,
ShowNavigation => 0,
AllowSorting => $AllowSorting,
PassArguments => $PassArguments,
&>
% unless( $children->Count ) {
% if ( $NoTicketsCaption ) {
Expand Down Expand Up @@ -114,4 +117,7 @@ $NoTicketsCaption => undef,

$ShowHeader => 0
$ShowStatusesSelector => 0

$AllowSorting => undef
$PassArguments => undef
</%ARGS>
3 changes: 3 additions & 0 deletions html/RTIR/Incident/Children/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,16 @@ <h2><% loc('Total [_1]: [_2]([_3])', RT::IR::TicketType(Lifecycle => $Lifecycle)
<input type="hidden" name="Lifecycle" value="<% $Lifecycle %>" />

<& /RTIR/Elements/ShowChildren,
%ARGS,
Ticket => $Incident,
Lifecycle => $Lifecycle,
Statuses => [@Statuses],
FullList => RT::IR->HREFTo("Incident/Children/?Lifecycle=$Lifecycle&id=$id"),
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') &>
Expand Down

0 comments on commit 9c90ec5

Please sign in to comment.