| Versions | |
|---|---|
| 7 | theme_file_formatter_table($variables) |
Returns HTML for a file attachments table.
$variables An associative array containing:
drupal/
<?php
function theme_file_formatter_table($variables) {
$header = array(t('Attachment'), t('Size'));
$rows = array();
foreach ($variables['items'] as $delta => $item) {
$rows[] = array(
theme('file_link', array('file' => (object) $item)),
format_size($item['filesize']),
);
}
return empty($rows) ? '' : theme('table', array('header' => $header, 'rows' => $rows));
}
?>