You are here

function theme_panels_ipe_pane_wrapper in Panels 6.3

Same name and namespace in other branches
  1. 7.3 panels_ipe/panels_ipe.module \theme_panels_ipe_pane_wrapper()
1 theme call to theme_panels_ipe_pane_wrapper()
panels_renderer_ipe::render_pane in panels_ipe/plugins/display_renderers/panels_renderer_ipe.class.php
Override & call the parent, then pass output through to the dnd wrapper theme function.

File

panels_ipe/panels_ipe.module, line 70

Code

function theme_panels_ipe_pane_wrapper($output, $pane, $display, $renderer) {
  $content_type = ctools_get_content_type($pane->type);
  $subtype = ctools_content_get_subtype($content_type, $pane->subtype);
  $links = array();
  if (ctools_content_editable($content_type, $subtype, $pane->configuration)) {
    $links['edit'] = array(
      'title' => isset($content_type['edit text']) ? $content_type['edit text'] : t('Settings'),
      'href' => $renderer
        ->get_url('edit-pane', $pane->pid),
      'attributes' => array(
        'class' => 'ctools-use-modal',
      ),
    );
  }

  // Deleting is managed entirely in the js; this is just an attachment point
  // for it
  $links['delete'] = array(
    'title' => t('Delete'),
    'href' => '#',
    'attributes' => array(
      'class' => 'pane-delete',
      'id' => "pane-delete-panel-pane-{$pane->pid}",
    ),
  );
  $attr = array(
    'class' => 'panels-ipe-linkbar',
  );
  $links = theme('links', $links, $attr);
  $links .= '<div class="panels-ipe-draghandle">&nbsp;</div>';
  $handlebar = '<div class="panels-ipe-handlebar-wrapper panels-ipe-on clear-block">' . $links . '</div>';
  return $handlebar . $output;
}