diff options
Diffstat (limited to 'rt/share/html/Search/Elements/DisplayOptions')
-rw-r--r-- | rt/share/html/Search/Elements/DisplayOptions | 87 |
1 files changed, 2 insertions, 85 deletions
diff --git a/rt/share/html/Search/Elements/DisplayOptions b/rt/share/html/Search/Elements/DisplayOptions index c83035884..fbd497eb8 100644 --- a/rt/share/html/Search/Elements/DisplayOptions +++ b/rt/share/html/Search/Elements/DisplayOptions @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2011 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC %# <sales@bestpractical.com> %# %# (Except where explicitly superseded by other copyright notices) @@ -46,91 +46,8 @@ %# %# END BPS TAGGED BLOCK }}} <&| /Widgets/TitleBox, title => loc("Sorting"), id => 'sorting' &> -<table valign="top"> - -% for my $o (0..3) { -% $Order[$o] ||= ''; $OrderBy[$o] ||= ''; -<tr> -<td class="label"> -% if ($o == 0) { -<&|/l&>Order by</&>: -% } -</td> -<td class="value"> -<select name="OrderBy"> -% if ($o > 0) { -<option value=""><&|/l&>~[none~]</&></option> -% } -% foreach my $field (sort keys %fields) { -% next unless $field; -<option value="<%$field%>" -% if (defined $OrderBy[$o] and $field eq $OrderBy[$o]) { -selected="selected" -% } -><% loc($field) %></option> -% } -</select> -<select name="Order"> -<option value="ASC" -% unless ( ($Order[$o]||'') eq "DESC" ) { -selected="selected" -% } -><&|/l&>Asc</&></option> -<option value="DESC" -% if ( ($Order[$o]||'') eq "DESC" ) { -selected="selected" -% } -><&|/l&>Desc</&></option> -</select> -</td> -</tr> -% } -<tr> -<td class="label"> -<&|/l&>Rows per page</&>: -</td><td class="value"> -<& /Elements/SelectResultsPerPage, - Name => "RowsPerPage", - Default => $RowsPerPage &> -</td> -</tr> -</table> +<& EditSort, %ARGS &> </&> <&| /Widgets/TitleBox, title => loc("Display Columns"), id => 'columns' &> <& EditFormat, %ARGS &> </&> - -<%INIT> -my $tickets = new RT::Tickets($session{'CurrentUser'}); -my %fields = %{$tickets->FIELDS}; -map { $fields{$_}->[0] =~ /^(?:ENUM|INT|DATE|STRING|ID)$/ || delete $fields{$_} } keys %fields; -delete $fields{'EffectiveId'}; -$fields{'Owner'} = 1; -$fields{ $_ . '.EmailAddress' } = 1 foreach( qw(Requestor Cc AdminCc) ); - -# Add all available CustomFields to the list of sortable columns. -my @cfs = grep /^CustomField/, @{$ARGS{AvailableColumns}}; -$fields{$_}=1 for @cfs; - -# Add PAW sort -$fields{'Custom.Ownership'} = 1; - -$fields{"Customer.$_"} = 1 foreach qw( Number Name ); #Freeside - -my @Order = split /\|/, $Order; -my @OrderBy = split /\|/, $OrderBy; -if ($Order =~ /\|/) { - @Order = split /\|/, $Order; -} else { - @Order = ( $Order ); -} - -</%INIT> - -<%ARGS> -$Order => undef -$OrderBy => undef -$RowsPerPage => undef -$Format => undef -$GroupBy => 'id' -</%ARGS> |