<div id="reports_buttons_tabs" class="reports_buttons_tabs">
    <select onclick="jQuery('#report_result_object').attr('src',''); jQuery('.ui-report-buttons.actions').hide(); jQuery('#reports_bt_'+jQuery(this).val()).show();"
            class="report_output_select">
        {foreach from=$reports_resultinfo->get_outputtypes() item=group name='curgrp'}
            <option value="{$group->get_output_template()}">{$group->get_title()}</option>
        {/foreach}
    </select>


    <span>
        {portlet file='report_designs_list' as_form=false}
    </span>

    {foreach from=$reports_resultinfo->get_outputtypes() item=group name='curgrp'}
        <span id="reports_bt_{$group->get_output_template()}" class="ui-report-buttons actions"
              style="{if $smarty.foreach.curgrp.iteration neq 1}display:none{/if}">
            {if !isset($special_report) || !$special_report}
                {$buttons = $group->get_buttons($reports_report_id)}
                {if $buttons[0]->get_view() === 'tab-html' || $buttons[0]->get_view() === 'tabtree-html' || $buttons[0]->get_view() === 'tab-smarty' || $buttons[0]->get_view() === 'tab-smartytree'}
                    <a onclick="{$reports_resultinfo->get_action()}('{$reports_my_id}', '{$reports_report_id}', '{$buttons[0]->get_view()}', '{$group->get_output_template()}', '{$buttons[0]->get_target()}', {$selected_ids});"
                        class="dialog_make_text_btn ui-corner-all">
                        {$i.basic_preview}
                    </a>
                    {assign var="buttons" value=$buttons|@array_slice:1}
                {/if}

                <select onchange="{$reports_resultinfo->get_action()}('{$reports_my_id}', '{$reports_report_id}', jQuery(this).val(), '{$group->get_output_template()}', jQuery(this).find('option:selected').data('target') {if !empty($selected_ids)}, {$selected_ids}{/if}); jQuery(this).val(0);"
                    class="primary export">
                    <option disabled selected hidden value="0">{$i.basic_export}</option>
                    {foreach from=$buttons item=button}
                        <option value="{$button->get_view()}"
                                data-target="{$button->get_target()}">{$button->get_title()}</option>
                    {/foreach}
                </select>
            {/if}
            </span>
    {/foreach}

    <span class="ui-report-buttons edit">
        {if $reports_has_design_right && $reports_resultinfo->get_can_edit()}
            <form class="report_output_edit">
                <span onclick="evaluation.report_output.open('{$reports_report_id}');"
                      title="{$i.reporting_report_output_edit}"
                      class="dialog_make_btn16 tableconfig mobile_big smallbtns ui-corner-all"></span>
            </form>
        {/if}
    </span>
</div>
{if !isset($special_report) || !$special_report}
    {include file="Reports/result_object.tpl"}
{/if}
