rsvp_list_roles($rid)
rsvp/rsvp.module, line 1332
Returns a list of system roles.
$rid int The RSVP ID.
string a list of system roles.
<?php
function rsvp_list_roles($rid) {
$rsvp = rsvp_load($rid);
$content = t('<h3>You may invite site users:</h3>');
$rows = array();
$header = array(t('Role'), array('data' => t('Operations')));
foreach (user_roles(TRUE) as $rid => $role) {
$rows[] = array(
$role,
l(t('Add'), 'node/'. $rsvp->nid .'/rsvp/'. $rsvp->rid .'/attendees/role/'. $rid,
array('onclick' => "$.get($(this).attr('href'), function(data){ $('#edit-invite-list').val(data); }); return false;")),
);
}
$content .= theme('table', $header, $rows);
return $content;
}
?>