You are here

function template_preprocess_draggableviews_view_draggabletable_form in DraggableViews 6.3

Same name and namespace in other branches
  1. 6 draggableviews_theme.inc \template_preprocess_draggableviews_view_draggabletable_form()
  2. 6.2 draggableviews_theme.inc \template_preprocess_draggableviews_view_draggabletable_form()
  3. 7 draggableviews_theme.inc \template_preprocess_draggableviews_view_draggabletable_form()
1 string reference to 'template_preprocess_draggableviews_view_draggabletable_form'
draggableviews_theme in ./draggableviews.module
Implement hook_theme().

File

./draggableviews_theme.inc, line 293
Theme functions.

Code

function template_preprocess_draggableviews_view_draggabletable_form(&$vars) {

  // Get style plugin.
  $style_plugin = $vars['form']['#parameters'][2];

  // Get structured info array.
  $info = $style_plugin->view->draggableviews_info;

  // Keep the already created form elements "in mind". We'll need them later when we theme the view.
  $style_plugin->view->form_elements =& $vars['form']['rows'];
  $vars['view'] = theme($style_plugin
    ->theme_functions(), $style_plugin->view, $style_plugin->options, $style_plugin->view->result, '');

  // 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'] = drupal_render($vars['form']);
  }
  else {
    $vars['form'] = '';
  }
}