You are here

function theme_anonymous_publishing_cl_admin_blocked in Anonymous Publishing 7

Theme function to theme the blocked user form in a table format.

File

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

Code

function theme_anonymous_publishing_cl_admin_blocked($variables) {
  $form = $variables['form'];
  $output = drupal_render($form['apu_info']);
  $header = array(
    t('auid'),
    t('verification e-mail'),
    t('IP-address'),
    t('byline'),
    t('Blocked'),
    t('Remove'),
  );
  $rows = array();
  foreach (element_children($form['users']) as $auid) {
    $row = array();
    foreach (element_children($form['users'][$auid]) as $entry_key) {
      unset($form['users'][$auid][$entry_key]['#title']);
      $row[] = drupal_render($form['users'][$auid][$entry_key]);
    }
    $rows[] = $row;
  }
  if (!$rows) {
    $rows[] = array(
      array(
        'data' => t('There are no e-mail addresses for anonymous publishers on file.'),
        'colspan' => 6,
      ),
    );
  }
  $output .= theme('table', array(
    'header' => $header,
    'rows' => $rows,
  ));
  $output .= drupal_render_children($form);
  return $output;
}