You are here

function theme_spam_admin_overview in Spam 5.3

Same name and namespace in other branches
  1. 6 spam.module \theme_spam_admin_overview()

Theme spam administration overview.

File

./spam.module, line 1376

Code

function theme_spam_admin_overview($form) {

  // Overview table:
  $header = array(
    theme('table_select_header_cell'),
    t('Type'),
    t('Title'),
    t('Score'),
    t('Status'),
    t('IP'),
    t('Feedback'),
  );
  $output .= drupal_render($form['options']);
  if (isset($form['title']) && is_array($form['title'])) {
    foreach (element_children($form['title']) as $key) {
      $row = array();
      $row[] = drupal_render($form['spam'][$key]);
      $row[] = drupal_render($form['content_type'][$key]);
      $row[] = drupal_render($form['title'][$key]);
      $row[] = drupal_render($form['score'][$key]);
      $row[] = drupal_render($form['status'][$key]);
      $row[] = drupal_render($form['hostname'][$key]);
      $row[] = drupal_render($form['feedback'][$key]);
      $rows[] = $row;
    }
  }
  else {
    $rows[] = array(
      array(
        'data' => t('No spam content found.'),
        'colspan' => '6',
      ),
    );
  }
  $output .= theme('table', $header, $rows);
  if ($form['pager']['#value']) {
    $output .= drupal_render($form['pager']);
  }
  $output .= drupal_render($form);
  return $output;
}