function theme_modr8_form in modr8 7
Same name and namespace in other branches
- 5 modr8_admin.inc \theme_modr8_form()
- 6 modr8_admin.inc \theme_modr8_form()
Themes the content moderation form.
1 theme call to theme_modr8_form()
- modr8_form in ./
modr8_admin.inc - Content moderation form.
File
- ./
modr8_admin.inc, line 335 - Admin pages for moderation
Code
function theme_modr8_form($variables) {
$form = $variables['form'];
$headers = array(
t('Operations'),
t('Content'),
);
$rows = array();
foreach (element_children($form) as $key) {
// Only do this for nodes; not the submit button.
if (is_numeric($key)) {
$row = array();
$note_field = '';
if (variable_get('modr8_send_approve', FALSE) || variable_get('modr8_send_deny', FALSE)) {
$note_field .= drupal_render($form[$key]['note']);
}
$row[] = array(
'data' => drupal_render($form[$key]['ops']) . $note_field,
'style' => 'vertical-align:top;',
);
$preview = $form[$key]['preview']['#value'];
if (!empty($form[$key]['log_link']['#markup'])) {
$preview .= '<div><em>' . drupal_render($form[$key]['log_link']) . '</em></div>';
}
$row[] = array(
'data' => $preview,
'style' => 'vertical-align:top;',
);
$rows[] = $row;
}
}
$output = theme('table', array(
'header' => $headers,
'rows' => $rows,
));
$output .= drupal_render_children($form);
return $output;
}