function theme_file_entity_file_display_order in File Entity (fieldable files) 7.2
Same name and namespace in other branches
- 7.3 file_entity.admin.inc \theme_file_entity_file_display_order()
- 7 file_entity.admin.inc \theme_file_entity_file_display_order()
Returns HTML for a file display's display order table.
2 theme calls to theme_file_entity_file_display_order()
- file_entity_file_display_content_type_edit_form in plugins/
content_types/ file_display.inc - Edit form for this plugin.
- file_entity_file_display_form in ./
file_entity.admin.inc - Form callback; presents file display settings for a given view mode.
File
- ./
file_entity.admin.inc, line 808
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;
}