You are here

function theme_heartbeat_comments_admin_overview in Heartbeat 6.4

Theme the comment admin form.

Parameters

$form: An associative array containing the structure of the form.

File

modules/heartbeat_comments/heartbeat_comments.admin.inc, line 113
Admin page callbacks for the heartbeat comments module.

Code

function theme_heartbeat_comments_admin_overview($form) {
  $output = drupal_render($form['options']);
  if (isset($form['subject']) && is_array($form['subject'])) {
    foreach (element_children($form['subject']) as $key) {
      $row = array();
      $row[] = drupal_render($form['comments'][$key]);
      $row[] = drupal_render($form['subject'][$key]);
      $row[] = drupal_render($form['username'][$key]);
      $row[] = drupal_render($form['heartbeat_title'][$key]);
      $row[] = drupal_render($form['timestamp'][$key]);
      $rows[] = $row;
    }
  }
  else {
    $rows[] = array(
      array(
        'data' => t('No comments available.'),
        'colspan' => '6',
      ),
    );
  }
  $output .= theme('table', $form['header']['#value'], $rows);
  if ($form['pager']['#value']) {
    $output .= drupal_render($form['pager']);
  }
  $output .= drupal_render($form);
  return $output;
}