function theme_cdn_synced_files_list in CDN 5
Render the list of synchronized files.
Parameters
$files_synced: Array of files that are already synchronized to the CDN.
Return value
The rendered HTML.
1 theme call to theme_cdn_synced_files_list()
- cdn_admin_settings_form in ./
cdn.module - Form definition: CDN admin settings form.
File
- ./
cdn.module, line 465
Code
function theme_cdn_synced_files_list($files_synced) {
$output = '';
if (!count($files_synced)) {
$output .= '<p>' . t('No files synchronized yet.') . '</p>';
}
else {
$header = array(
array(
'data' => t('Local file (links to the remote file)'),
),
array(
'data' => t('Size'),
),
);
$rows = array();
foreach ($files_synced as $local_file => $remote_file) {
$rows[] = array(
'data' => array(
l($local_file, $remote_file),
number_format(filesize($local_file) / 1024, 2) . ' KB',
),
);
}
$output .= theme('table', $header, $rows);
}
return $output;
}