function template_preprocess_draggableviews_view_draggabletable_form in DraggableViews 7
Same name and namespace in other branches
- 6.3 draggableviews_theme.inc \template_preprocess_draggableviews_view_draggabletable_form()
- 6 draggableviews_theme.inc \template_preprocess_draggableviews_view_draggabletable_form()
- 6.2 draggableviews_theme.inc \template_preprocess_draggableviews_view_draggabletable_form()
File
- ./
draggableviews_theme.inc, line 304 - Theme functions.
Code
function template_preprocess_draggableviews_view_draggabletable_form(&$vars) {
// Get style plugin.
$style_plugin = $vars['form']['#draggableviews_style_plugin'];
// Get structured info array.
$info = $style_plugin->view->draggableviews_info;
// Keep the already created form elements "in mind". They will be rendered by the draggable table theme function.
$style_plugin->view->draggableviews_form_elements =& $vars['form']['draggableviews_form_elements'];
$vars['view'] = theme($style_plugin
->theme_functions(), array(
'view' => $style_plugin->view,
'options' => $style_plugin->options,
'rows' => $style_plugin->view->result,
'title' => '',
));
// Don't render the submit form..
// - if user has no access or
// - if structure is locked.
if (user_access('Allow Reordering') && !$info['locked']) {
$vars['form_elements'] = drupal_render_children($vars['form']);
}
else {
$vars['form_elements'] = '';
}
}