<%INIT>

# Lifted from RT core Tabs template. Needed because the Feeds submenu
# can appear on the search results page or in a submenu of Search if
# there is a previous search.

if ( $Has_Query && $Path =~ m{^/Search/} && PageMenu()->child('more') ) {
    PageMenu()->child('more')->child(
        'ms_excel',
        title       => loc('Microsoft Excel'),
        description => loc("Export search as a Microsoft Excel XLSX file"),
        path        => "/Search/Results.xlsx$Search_Args",
        attributes  => {
            'hx-boost' => 'false',
        },
    );
}

</%INIT>
<%ARGS>
$Path
# These require a patch to RT 4.2.12 and earlier
$Search_Args => ''
$Has_Query => ''
</%ARGS>
