You are here

function theme_heartbeat_messages_admin_overview in Heartbeat 6.4

Same name and namespace in other branches
  1. 7 modules/heartbeat_ui/heartbeat_ui.admin.inc \theme_heartbeat_messages_admin_overview()

Theme the comment admin form.

Parameters

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

File

./heartbeat.admin.inc, line 115
Admnistration tasks for heartbeat.

Code

function theme_heartbeat_messages_admin_overview($form) {
  $output = drupal_render($form['options']);
  if (isset($form['message']) && is_array($form['message'])) {
    foreach (element_children($form['message']) as $key) {
      $row = array();
      $row[] = drupal_render($form['heartbeat-activity'][$key]);
      $row[] = drupal_render($form['message'][$key]);
      $row[] = drupal_render($form['username'][$key]);
      $row[] = drupal_render($form['language'][$key]);
      $row[] = drupal_render($form['timestamp'][$key]);
      $row[] = drupal_render($form['operations'][$key]);
      $rows[] = $row;
    }
  }
  else {
    $rows[] = array(
      array(
        'data' => t('No messages available.'),
        'colspan' => '5',
      ),
    );
  }
  $output .= theme('table', $form['header']['#value'], $rows);
  if ($form['pager']['#value']) {
    $output .= drupal_render($form['pager']);
  }
  $output .= drupal_render($form);
  return $output;
}