function theme_node_import_file_select in Node import 6
Theme the file selection list.
2 theme calls to theme_node_import_file_select()
- node_import_add_form in ./
node_import.admin.inc - Creates a new import task by letting the user fill in a wizard.
- node_import_list_files_form in ./
node_import.admin.inc
File
- ./
node_import.admin.inc, line 1107
Code
function theme_node_import_file_select($form) {
$header = array(
'',
t('Filename'),
t('Uploaded on'),
t('Uploaded by'),
);
$rows = array();
foreach (element_children($form) as $child) {
if (is_numeric($child)) {
$element = $form[$child];
$file = array(
'#type' => 'item',
'#value' => $element['filename']['#value'],
'#description' => $element['filepath']['#value'] . ' (' . $element['filesize']['#value'] . ')',
);
unset($form['fid'][$child]['#title']);
$rows[] = array(
drupal_render($form['fid'][$child]),
drupal_render($file),
drupal_render($form[$child]['timestamp']),
drupal_render($form[$child]['uid']),
);
unset($form[$child]);
}
}
if (empty($rows)) {
$rows[] = array(
'data' => array(
array(
'data' => t('No files available.'),
'colspan' => count($header),
),
),
);
unset($form['fid']);
}
return theme('table', $header, $rows) . drupal_render($form);
}