<!-- BEGIN {$smarty.template} -->

<table cellspacing="0">
    <caption><em>{t}Files{/t}</em></caption>
    <thead>
        <tr>
            <th> {t}Preview{/t} </th>
            <th> {t}File{/t} </th>
            <th> {t}Person{/t} </th>
            <th> {t}Actions{/t} </th>
        </tr>
    </thead>
    <tbody>
        {section name=file loop=$files}
        <tr>
            <td{if ((strlen($files[file].file_original_name) > $smarty.const.PHPAGA_SHOWOPDESCLENGHT))} class="tTip" title="{$files[file].file_original_name|phpaga_popup_sanitizestr}"{/if}>

                {if $smarty.const.PHPAGA_FILES_PREVIEW && $files[file].preview}
                <a{if $files[file].is_image} class="cbox_img"{/if} href="download.php?id={$files[file].file_id}">
                    <img class="preview" src="preview.php?id={$files[file].file_id}" alt="{$files[file].file_original_name}" title="{$files[file].file_original_name|wash}">
                </a>
                {/if}

            </td>
            <td>
                <a href="download.php?id={$files[file].file_id}">{$files[file].file_original_name|wash|trnc:$smarty.const.PHPAGA_SHOWOPDESCLENGHT:"...":true}</a>
                <br />
                {$files[file].file_added|date_format:$smarty.const.PHPAGA_DATETIMEFORMAT_SHORT} 
                <br />
                {$files[file].file_mimetype|default:"&nbsp;"} 
            </td>
            <td> <a href="person.php?id={$files[file].pe_id}">{$files[file].pe_person|wash|default:"&nbsp;"}</a> </td>
            <td class="last">
                <a class="ptr" onclick="confirm_delete_file({$files[file].file_id}, '{t}File{/t}: {$files[file].file_original_name|phpaga_jsmessage_sanitizestr}\n{$files[file].file_added|date_format:$smarty.const.PHPAGA_DATETIMEFORMAT_SHORT}');"><img src="img/phpaga/delete.png" height="16" width="16" border="0" alt="{t}Delete{/t}" title="{t}Delete{/t}"></a>
            </td>
        </tr>
        {/section}
    </tbody>
</table>

<!-- END {$smarty.template} -->
