You are here

function theme_anonymous_publishing_cl_admin_unverified in Anonymous Publishing 7

Theme function to theme the spambot report in a table format.

File

modules/cl/anonymous_publishing_cl.admin.inc, line 891
Menu callbacks for the CL tabs on the module admin page.

Code

function theme_anonymous_publishing_cl_admin_unverified($variables) {
  $form = $variables['form'];
  $output = drupal_render($form['apu_info']);
  $header = array(
    t('select'),
    t('apid'),
    t('ip-address'),
    t('verification e-mail'),
    t('when'),
    t('title'),
  );
  $rows = array();
  foreach (element_children($form['unverified']) as $id) {
    $row = array();
    foreach (element_children($form['unverified'][$id]) as $entry_key) {
      unset($form['unverified'][$id][$entry_key]['#title']);
      if (isset($form['unverified'][$id][$entry_key]['#type']) && 'hidden' == $form['unverified'][$id][$entry_key]['#type']) {

        // Hidden field.
      }
      else {
        $row[] = drupal_render($form['unverified'][$id][$entry_key]);
      }
    }
    $rows[] = $row;
  }
  if (!$rows) {
    $rows[] = array(
      array(
        'data' => t('There are no unverified posts on file.'),
        'colspan' => 6,
      ),
    );
  }
  $output .= theme('table', array(
    'header' => $header,
    'rows' => $rows,
  ));
  $output .= drupal_render_children($form);
  return $output;
}