function theme_mee_ressource_manager in Scald: Media Management made easy 6
1 theme call to theme_mee_ressource_manager()
- mee_textarea_process in mee/
mee.module - Process an individual element.
File
- mee/
mee.module, line 584 - Defines a special textarea, with drag and drop media driven by Scald and dnd.module when rich text editing is enabled on the textarea via the WYSIWYG API.
Code
function theme_mee_ressource_manager($form) {
static $count = 0;
$id = 'mee-ressource-manager-' . $count;
drupal_add_tabledrag($id, 'order', 'sibling', 'mee-rm-weight');
$count++;
$header = array(
'',
t('Title'),
t('Required'),
t('Weight'),
);
$rows = array();
foreach (element_children($form) as $key) {
$form[$key]['weight']['#attributes']['class'] = 'mee-rm-weight';
$row = array(
'',
);
$row[] = drupal_render($form[$key]['title']);
$row[] = drupal_render($form[$key]['required']);
$row[] = drupal_render($form[$key]['weight']);
$rows[] = array(
'data' => $row,
'class' => 'draggable',
);
}
$output = theme('table', $header, $rows, array(
'id' => $id,
'class' => 'mee-ressource-manager',
), t('Ressource Manager'));
$output .= drupal_render($form);
return $output;
}