You are here

function theme_signup_user_list in Signup 5.2

Same name and namespace in other branches
  1. 6.2 theme/no_views.inc \theme_signup_user_list()

Formats the list of users signed up for a particular node.

Parameters

$node: The node object that users have signed up for.

$registered_signups: Array of objects with data for each registered user signed up.

$anon_signups: Array of objects with data for each anonymous user signed up.

1 theme call to theme_signup_user_list()
_signup_node_output in ./signup.module
Generate all the signup-related output for a given node.

File

./signup.module, line 979
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_user_list($node, $registered_signups, $anon_signups) {
  $header = array(
    array(
      'data' => t('!users signed up', array(
        '!users' => format_plural(count($registered_signups) + count($anon_signups), '1 individual', '@count individuals'),
      )),
    ),
  );
  $rows = array();
  foreach ($registered_signups as $signup) {
    $rows[] = array(
      theme('username', $signup),
    );
  }
  if (!empty($anon_signups)) {
    $rows[] = array(
      t('!count anonymous', array(
        '!count' => count($anon_signups),
      )),
    );
  }
  return theme('table', $header, $rows);
}