X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FSearch%2FElements%2FDisplayOptions;h=fbd497eb886a3777a54aad40fdce2b32dfa14051;hb=33beebf4cb42eba3e1dd868ad5e0af102de961da;hp=c83035884ea1e3dd6ffbf5c472cfacb79a5a3e3b;hpb=7ac86daf67b0a95153b736d5811f9050363f6553;p=freeside.git 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 %# %# %# (Except where explicitly superseded by other copyright notices) @@ -46,91 +46,8 @@ %# %# END BPS TAGGED BLOCK }}} <&| /Widgets/TitleBox, title => loc("Sorting"), id => 'sorting' &> - - -% for my $o (0..3) { -% $Order[$o] ||= ''; $OrderBy[$o] ||= ''; - - - - -% } - - - -
-% if ($o == 0) { -<&|/l&>Order by: -% } - - - -
-<&|/l&>Rows per page: - -<& /Elements/SelectResultsPerPage, - Name => "RowsPerPage", - Default => $RowsPerPage &> -
+<& 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 ); -} - - - -<%ARGS> -$Order => undef -$OrderBy => undef -$RowsPerPage => undef -$Format => undef -$GroupBy => 'id' -