function filebrowser_form_metadata in Filebrowser 7.3
Same name and namespace in other branches
- 8 filebrowser.pages.inc \filebrowser_form_metadata()
- 6.2 filebrowser.pages.inc \filebrowser_form_metadata()
- 7.4 filebrowser.pages.inc \filebrowser_form_metadata()
- 7.2 filebrowser.pages.inc \filebrowser_form_metadata()
1 string reference to 'filebrowser_form_metadata'
File
- ./
filebrowser.pages.inc, line 119 - Several support functions for filebrowser
Code
function filebrowser_form_metadata($form, &$form_state, $fid) {
$content = _filebrowser_node_content_load($fid);
$node = node_load($content['nid']);
_filebrowser_load_files($node, $fid);
$form['#node'] = $node;
foreach ($node->file_listing as $name => &$file) {
if ($name != '.') {
$form[$file['fid']] = array(
'#type' => 'fieldset',
'#title' => $file['display-name'],
'#tree' => TRUE,
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form[$file['fid']]['thumbnail'] = array(
'#type' => 'markup',
'#value' => _filebrowser_thumbnails_generate($node, $file),
);
foreach (_filebrowser_externals('metadata_info') as $name => $metadata) {
if (isset($metadata['writable']) && $metadata['writable']) {
$form[$file['fid']][$name] = array(
'#type' => 'textarea',
'#title' => $metadata['title'],
'#default_value' => $file[$name],
);
}
}
}
}
$form['submit'] = array(
'#type' => 'submit',
'#value' => t('save'),
);
return $form;
}