You are here

function theme_signup_node_admin_details_form in Signup 6

Same name and namespace in other branches
  1. 5.2 signup.module \theme_signup_node_admin_details_form()
  2. 6.2 theme/node.admin.inc \theme_signup_node_admin_details_form()
  3. 7 theme/node.admin.inc \theme_signup_node_admin_details_form()

File

theme/node.admin.inc, line 78
Theme functions for the signup node administration page (node/N/signups).

Code

function theme_signup_node_admin_details_form($form) {
  $fieldset = array(
    '#title' => t('Signup details'),
    '#collapsible' => TRUE,
    '#collapsed' => FALSE,
  );
  if (!empty($form['users']['#options'])) {
    $header = $form['#header'];
    $rows = array();
    foreach ($form['users']['#options'] as $key => $value) {
      $rows[] = array(
        'cancel_checkbox' => drupal_render($form['users'][$key]),
        'username' => drupal_render($form['username'][$key]),
        'signup_date' => drupal_render($form['signup_date'][$key]),
        'signup_form_data' => drupal_render($form['signup_form_data'][$key]),
        'attended' => drupal_render($form['attended'][$key]),
      );
    }
    $fieldset['#value'] = '<div class="container-inline">';
    $fieldset['#value'] .= drupal_render($form['operation']);
    $fieldset['#value'] .= drupal_render($form['submit']);
    $fieldset['#value'] .= '</div>';
    $fieldset['#value'] .= theme('table', $header, $rows);
  }
  else {
    $fieldset['#value'] = '<span>' . drupal_render($form['no_users']) . '</span>';
  }
  return theme('fieldset', $fieldset) . drupal_render($form);
}