1 views_ui.theme.inc | theme_views_ui_build_group_filter_form($variables) |
Theme the build group filter form.
File
- core/
modules/ views_ui/ views_ui.theme.inc, line 195 - Theme functions for the Views UI module.
Code
function theme_views_ui_build_group_filter_form($variables) {
$form = $variables['form'];
$more = backdrop_render($form['more']);
$output = backdrop_render($form['form_description']);
$output .= backdrop_render($form['expose_button']);
$output .= backdrop_render($form['group_button']);
if (isset($form['required'])) {
$output .= backdrop_render($form['required']);
}
$output .= backdrop_render($form['operator']);
$output .= backdrop_render($form['value']);
$output .= '<div class="views-left-40">';
$output .= backdrop_render($form['optional']);
$output .= backdrop_render($form['remember']);
$output .= '</div>';
$output .= '<div class="views-right-60">';
$output .= backdrop_render($form['widget']);
$output .= backdrop_render($form['label']);
$output .= backdrop_render($form['description']);
$output .= '</div>';
$header = array(
t('Default'),
t('Weight'),
t('Label'),
t('Operator'),
t('Value'),
t('Operations'),
);
$form['default_group'] = form_process_radios($form['default_group']);
$form['default_group_multiple'] = form_process_checkboxes($form['default_group_multiple']);
$form['default_group']['All']['#title'] = '';
backdrop_render($form['default_group_multiple']['All']); // Don't render
$rows[] = array(
backdrop_render($form['default_group']['All']),
'',
array(
'data' => config_get('views.settings', 'exposed_filter_any_label') == 'old_any' ? t('<Any>') : t('- Any -'),
'colspan' => 4,
'class' => array('class' => 'any-default-radios-row'),
),
);
foreach (element_children($form['group_items']) as $group_id) {
$form['group_items'][$group_id]['value']['#title'] = '';
$data = array(
'default' => backdrop_render($form['default_group'][$group_id]) . backdrop_render($form['default_group_multiple'][$group_id]),
'weight' => backdrop_render($form['group_items'][$group_id]['weight']),
'title' => backdrop_render($form['group_items'][$group_id]['title']),
'operator' => backdrop_render($form['group_items'][$group_id]['operator']),
'value' => backdrop_render($form['group_items'][$group_id]['value']),
'remove' => backdrop_render($form['group_items'][$group_id]['remove']) . l('<span>' . t('Remove') . '</span>', 'javascript:void()', array('attributes' => array('id' => 'views-remove-link-' . $group_id, 'class' => array('views-hidden', 'views-button-remove', 'views-groups-remove-link', 'views-remove-link'), 'alt' => t('Remove this item'), 'title' => t('Remove this item')), 'html' => true)),
);
$rows[] = array('data' => $data, 'id' => 'views-row-' . $group_id, 'class' => array('draggable'));
}
$table = theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('class' => array('views-filter-groups'), 'id' => 'views-filter-groups'))) . backdrop_render($form['add_group']);
backdrop_add_tabledrag('views-filter-groups', 'order', 'sibling', 'weight');
$render_form = backdrop_render_children($form);
return $output . $render_form . $table . $more;
}