You are here

function theme_disable_breadcrumbs_checked_nodes in Disable breadcrumbs 7

Same name and namespace in other branches
  1. 6 disable_breadcrumbs.admin.inc \theme_disable_breadcrumbs_checked_nodes()

Produce sortable table of currently checked nodes

1 theme call to theme_disable_breadcrumbs_checked_nodes()
disable_breadcrumbs_settings_form in ./disable_breadcrumbs.admin.inc
Settings/configuration form.

File

./disable_breadcrumbs.admin.inc, line 126
Admin settings page and checked nodes summary table.

Code

function theme_disable_breadcrumbs_checked_nodes() {
  $header = array(
    array(
      'data' => 'Node (nid)',
      'field' => 'n.nid',
      'sort' => 'desc',
    ),
    array(
      'data' => 'Type',
      'field' => 'n.type',
    ),
    array(
      'data' => 'Title',
      'field' => 'n.title',
    ),
    'Operations',
  );
  $result = _disable_breadcrumbs_get_all_checked_nodes($header);
  $rows = array();
  foreach ($result as $row) {
    $rows[$row->nid] = array(
      $row->nid,
      $row->type,
      l($row->title, 'node/' . $row->nid),
      l(t('Edit'), "node/{$row->nid}/edit", array(
        'query' => array(
          'destination' => current_path(),
        ),
      )),
    );
  }
  $table = array(
    'header' => $header,
    'rows' => $rows,
    'empty' => '<p>' . t('There are currently no checked nodes.') . '</p>',
  );
  $output = theme('table', $table);
  $output .= theme('pager');
  return $output;
}