--- rsvp-old/rsvp.module 2008-07-15 20:17:40.000000000 -0400 +++ rsvp/rsvp.module 2008-11-20 09:54:34.000000000 -0500 @@ -60,7 +60,7 @@ * @ingroup rsvp_core */ function rsvp_perm() { - return array("administer rsvp", "rsvp on events", "rsvp on own events", "rsvp newsletters subscribers", "rsvp system users", "rsvp buddylist"); + return array("administer rsvp", "rsvp on events", "rsvp on own events", "rsvp newsletters subscribers", "rsvp system users", "rsvp buddylist", "rsvp groups"); } /** @@ -112,6 +112,7 @@ 'access' => user_access('access content'), 'type' => MENU_CALLBACK); + if (arg(0) == 'node' && is_numeric(arg(1))) { $nid = arg(1); $node = node_load($nid); @@ -184,6 +185,12 @@ 'callback arguments' => array(arg(6)), 'type' => MENU_CALLBACK, 'weight' => '2'); + $items[] = array('path' => 'node/'. $nid . '/rsvp/'. $rid.'/attendees/group', + 'access' => ($access && user_access('rsvp groups')), + 'callback' => 'rsvp_attendees_groups', + 'callback arguments' => array(arg(6)), + 'type' => MENU_CALLBACK, + 'weight' => '2'); $items[] = array('path' => 'node/'. $nid .'/rsvp/'. $rid .'/message', 'title' => t('Send message'), 'access' => $access, @@ -578,6 +585,9 @@ if (user_access('rsvp system users')) { $content .= rsvp_list_roles($rid); } + if (user_access('rsvp groups')) { + $content .= rsvp_list_groups($rid); + } $content .= drupal_get_form('rsvp_attendee_form', $rid); $content .= rsvp_show_attendees(rsvp_load($rid)); return $content; @@ -1373,12 +1383,40 @@ ), ); } - $content .= theme('table', $header, $rows); return $content; } +function rsvp_list_groups($rid) { + global $user; + $rsvp = rsvp_load($rid); + $content = t('