{include file='r/hidden.tpl' name="report_templates_foldername" default=$foldername}
<div id="inforight">
    <table class="col2btn">
        <tr>
            <td>{$i.masterdatamanagement_directory}</td>
            <td>
                {if $foldername_trans}
                    {$foldername_trans}
                {/if}
                <small>{$foldername}</small>
                <span style="float:right; padding-right:5px; transform: scale(0.85); min-width:50px; text-align:right;">
                    {filelink type='folder' value="`$reportsxpath`/`$foldername`"}
                </span>    
            </td>
        </tr>
        {if $filename}
            <tr>
                <td>{$i.masterdatamanagement_file}</td>
                <td>
                    {$filename}
                    <span style="float:right; padding-right:5px; transform: scale(0.85); min-width:50px; text-align:right;">
                        {filelink type='filefrstbtn' value="`$reportsxpath`/`$foldername`/`$filename`"}

                        <span class="dialog_make_btn16 delete smallbtns ui-corner-all"
                            onclick="master_data_report_templates.delete_file('{$foldername}', '{$filename}');"
                        title="{$i.basic_delete}"></span>
                    </span>                      
                </td>
            </tr>
        {else}
            {if isset($presets) && is_array($presets) && count($presets) > 0}
                <tr>
                    <td>{$i.masterdatamanagement_restore_preset_file}</td>
                    <td>
                        {foreach from=$presets item='preset'}
                            <a style="white-space:nowrap" class="dialog_make_text_btn ui-corner-all" onclick="master_data_report_templates.restore_preset('{$foldername}', '{$preset}');">
                                <span class="dialog_make_btn16 update ui-corner-all"></span>
                                {$preset}
                            </a> <br/>                        
                        {/foreach}
                    </td>
                </tr>
            {/if}
            <td>{$i.masterdatamanagement_file}</td>
            <td>
                {include file='r/file-only.tpl' name="report_templates_file_upload" targettype="files" targetdata="temp_reportsx"}
            </td>        
        {/if}
    </table>
</div>