+
+ if ($DECODED_ARGS->{QueryString}) {
+ $args = '?' . $DECODED_ARGS->{QueryString};
+ }
+ else {
+ my %final_query_args = ();
+ # key => callback to avoid unnecessary work
+
+ for my $param (keys %fallback_query_args) {
+ $final_query_args{$param} = defined($DECODED_ARGS->{QueryArgs}->{$param})
+ ? $DECODED_ARGS->{QueryArgs}->{$param}
+ : $fallback_query_args{$param};
+ }
+
+ for my $field (qw(Order OrderBy)) {
+ if ( ref( $final_query_args{$field} ) eq 'ARRAY' ) {
+ $final_query_args{$field} = join( "|", @{ $final_query_args{$field} } );
+ } elsif (not defined $final_query_args{$field}) {
+ delete $final_query_args{$field};
+ }
+ else {
+ $final_query_args{$field} ||= '';
+ }
+ }
+
+ $args = '?' . $query_string->(%final_query_args);
+ }
+
+ my $current_search_menu;
+ if ( $request_path =~ m{^/Ticket} ) {
+ $current_search_menu = $search->child( 'current_search' );
+ } else {
+ $current_search_menu = PageMenu();
+ }
+ if ( $has_query ) {
+ my $more = $current_search_menu->child( 'more' );
+
+ $more->child(
+ 'xls' => title => loc('ODS'),
+ path => '/Search/Results.ods?' . $args
+ );
+ }