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

<table class="stdtable" cellspacing="0">
  <caption><em>{t}Files{/t}</em></caption>
  <tr>
    <th> {t}Name{/t} </th>
    <th> {t}Date{/t} </th>
    <th> {t}Person{/t} </th>
    <th> {t}Type{/t} </th>
    <th> {t}Actions{/t} </th>
  </tr>

  {section name=file loop=$files}
  <tr class="{cycle values="odd,even"}">
    <td{if ((strlen($files[file].file_original_name) > $smarty.const.PHPAGA_SHOWOPDESCLENGHT))} onmouseover="return escape('{$files[file].file_original_name|phpaga_popup_sanitizestr}')"{/if}>
      <a href="download.php?id={$files[file].file_id}">{$files[file].file_original_name|wash|trnc:$smarty.const.PHPAGA_SHOWOPDESCLENGHT:"...":true}</a>

      {if $smarty.const.PHPAGA_FILES_PREVIEW && $files[file].preview}
      <br />
      <a 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> {$files[file].file_added|date_format:$smarty.const.PHPAGA_DATETIMEFORMAT_LONG} </td>
    <td> <a href="person.php?id={$files[file].pe_id}">{$files[file].pe_person|wash|default:"&nbsp;"}</a> </td>
    <td> {$files[file].file_mimetype|default:"&nbsp;"} </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}
</table>

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