You are here

function panelizer_panelizer_task_admin_summary in Panelizer 7

Same name and namespace in other branches
  1. 6 plugins/task_handlers/panelizer_node.inc \panelizer_panelizer_task_admin_summary()
  2. 7.3 plugins/task_handlers/panelizer_node.inc \panelizer_panelizer_task_admin_summary()
  3. 7.2 plugins/task_handlers/panelizer_node.inc \panelizer_panelizer_task_admin_summary()

Callback to provide administrative summary of the task handler.

1 string reference to 'panelizer_panelizer_task_admin_summary'
panelizer_node.inc in plugins/task_handlers/panelizer_node.inc
This is the task handler plugin to handle node_view.

File

plugins/task_handlers/panelizer_node.inc, line 27
This is the task handler plugin to handle node_view.

Code

function panelizer_panelizer_task_admin_summary($handler, $task, $subtask, $page, $show_title = TRUE) {
  $output = '';
  $output .= '<div class="clear-block">';
  if ($show_title) {

    // Get the operations
    $operations = page_manager_get_operations($page);

    // Get operations for just this handler.
    $operations = $operations['handlers']['children'][$handler->name]['children']['actions']['children'];
    $args = array(
      'handlers',
      $handler->name,
      'actions',
    );
    $rendered_operations = page_manager_render_operations($page, $operations, array(), array(
      'class' => array(
        'actions',
      ),
    ), 'actions', $args);
    $output .= '<div class="handler-title clear-block">';
    $output .= '<div class="actions handler-actions">' . $rendered_operations['actions'] . '</div>';
    $output .= '<span class="title-label">' . t('Panelizer') . '</span>';
    $output .= '</div>';
  }
  $access = t('This variant will be selected if the node being viewed is panelized. This variant must be enabled and selected for panelizer to work!');
  $rows[] = array(
    array(
      'class' => array(
        'page-summary-label',
      ),
      'data' => t('Selection rule'),
    ),
    array(
      'class' => array(
        'page-summary-data',
      ),
      'data' => $access,
    ),
    array(
      'class' => array(
        'page-summary-operation',
      ),
      '',
    ),
  );
  $output .= theme('table', array(
    'header' => array(),
    'rows' => $rows,
    'attributes' => array(
      'class' => array(
        'page-manager-handler-summary',
      ),
    ),
  ));
  $output .= '</div>';
  return $output;
}