You are here

function theme_signup_user_list in Signup 6.2

Same name and namespace in other branches
  1. 5.2 signup.module \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_user_list_output in includes/node_output.inc
Helper function to generate the list of users signed up for a node.

File

theme/no_views.inc, line 19
Deprecated code if you don't have Views enabled.

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);
}