function theme_signup_admin_form in Signup 5.2
Same name and namespace in other branches
- 6.2 theme/admin.inc \theme_signup_admin_form()
- 6 theme/admin.inc \theme_signup_admin_form()
File
- ./
signup.module, line 1379 - The Signup module (http://drupal.org/project/signup) manages replies to nodes. In particular, it's good for event management. Signup supports sending reminder emails and automatically closing signups for nodes with a start time, via the Event…
Code
function theme_signup_admin_form($form) {
if (!isset($form['nids'])) {
$type = $_SESSION['signup_status_filter'];
switch ($type) {
case 'open':
$filter = t('open');
break;
case 'closed':
$filter = t('closed');
break;
default:
$filter = t('enabled');
break;
}
return t('No content is currently !status for signups.', array(
'!status' => $filter,
));
}
foreach ($form['nids'] as $nid => $node_form) {
if (!is_numeric($nid)) {
continue;
}
$row = array();
if (isset($node_form['start'])) {
$row[] = drupal_render($form['nids'][$nid]['start']);
}
$row[] = drupal_render($form['nids'][$nid]['title']);
$row[] = drupal_render($form['nids'][$nid]['total']);
$row[] = drupal_render($form['nids'][$nid]['limit']);
$row[] = drupal_render($form['nids'][$nid]['status']);
$row[] = drupal_render($form['nids'][$nid]['operations']);
$rows[] = $row;
}
$header = $form['header']['#value'];
unset($form['header']);
$output = theme('table', $header, $rows, array(
'style' => 'width:100%',
));
$output .= drupal_render($form);
$pager = theme('pager', NULL, 25, 0);
if (!empty($pager)) {
$output .= $pager;
}
return $output;
}