function theme_current_search_sort_settings_table in Facet API 7.2
Same name and namespace in other branches
- 6.3 contrib/current_search/plugins/export_ui/current_search_export_ui.class.php \theme_current_search_sort_settings_table()
- 7 contrib/current_search/current_search.theme.inc \theme_current_search_sort_settings_table()
Returns the sort table.
Parameters
$variables: An associative array containing:
- element: A render element representing the form.
1 theme call to theme_current_search_sort_settings_table()
- current_search_settings_form in contrib/
current_search/ plugins/ export_ui/ current_search_export_ui.class.php - Define the preset add/edit form.
File
- contrib/
current_search/ current_search.theme.inc, line 155 - Theme functions for the Current Search Blocks module.
Code
function theme_current_search_sort_settings_table($variables) {
$output = '';
// Builds table rows.
$rows = array();
foreach ($variables['element']['#current_search']['items'] as $name => $settings) {
$rows[$name] = array(
'class' => array(
'draggable',
),
'data' => array(
drupal_render($variables['element'][$name]['item']),
drupal_render($variables['element'][$name]['weight']),
array(
'data' => drupal_render($variables['element'][$name]['remove']),
'class' => 'current-search-remove-link',
),
),
);
}
// Builds table with draggable rows, returns output.
$table_id = 'current-search-sort-settings';
drupal_add_tabledrag($table_id, 'order', 'sibling', 'current-search-sort-weight');
$output .= drupal_render_children($variables['element']);
$output .= theme('table', array(
'rows' => $rows,
'attributes' => array(
'id' => $table_id,
),
));
return $output;
}