function theme_file_entity_file_display_order in D7 Media 7
Returns HTML for a file display's display order table.
1 theme call to theme_file_entity_file_display_order()
- file_entity_file_display_form in file_entity/
file_entity.admin.inc - Form callback; presents file display settings for a given view mode.
File
- file_entity/
file_entity.admin.inc, line 166 - Administrative interface for file type configuration.
Code
function theme_file_entity_file_display_order($variables) {
$element = $variables['element'];
$rows = array();
foreach (element_children($element, TRUE) as $name) {
$element[$name]['weight']['#attributes']['class'][] = 'file-display-order-weight';
$rows[] = array(
'data' => array(
drupal_render($element[$name]['label']),
drupal_render($element[$name]['weight']),
),
'class' => array(
'draggable',
),
);
}
$output = drupal_render_children($element);
$output .= theme('table', array(
'rows' => $rows,
'attributes' => array(
'id' => 'file-displays-order',
),
));
drupal_add_tabledrag('file-displays-order', 'order', 'sibling', 'file-display-order-weight', NULL, NULL, TRUE);
return $output;
}