function theme_anonymous_publishing_cl_admin_moderation in Anonymous Publishing 7
Theme function to theme the moderation form in a table format.
File
- modules/
cl/ anonymous_publishing_cl.admin.inc, line 388 - Menu callbacks for the CL tabs on the module admin page.
Code
function theme_anonymous_publishing_cl_admin_moderation($variables) {
$form = $variables['form'];
$output = drupal_render($form['apm_info']);
$header = array(
t('published'),
t('nid'),
t('cid'),
t('title'),
t('alias'),
t('e-mail'),
);
$rows = array();
foreach (element_children($form['ap_row']) as $nid) {
$row = array();
foreach (element_children($form['ap_row'][$nid]) as $entry_key) {
unset($form['ap_row'][$nid][$entry_key]['#title']);
if (!isset($form['ap_row'][$nid][$entry_key]['#type']) || 'hidden' != $form['ap_row'][$nid][$entry_key]['#type']) {
$row[] = drupal_render($form['ap_row'][$nid][$entry_key]);
}
}
$rows[] = $row;
}
if (!$rows) {
$rows[] = array(
array(
'data' => t('There are no verified contents to moderate.'),
'colspan' => 5,
),
);
}
$output .= theme('table', array(
'header' => $header,
'rows' => $rows,
));
$output .= drupal_render_children($form);
return $output;
}