$out->elementEnd('h3');
+ // FIXME: better dates
+
$out->elementStart('div', 'event-times');
$out->element('abbr', array('class' => 'dtstart',
'title' => common_date_iso8601($event->start_time)),
$out->element('div', 'location', $event->location);
}
+ $rsvps = $event->getRSVPs();
+
+ $out->element('div', 'event-rsvps',
+ sprintf(_('Yes: %d No: %d Maybe: %d'),
+ count($rsvps[RSVP::POSITIVE]),
+ count($rsvps[RSVP::NEGATIVE]),
+ count($rsvps[RSVP::POSSIBLE])));
+
$out->elementStart('div', array('class' => 'event-info entry-content'));
$avatar = $profile->getAvatar(AVATAR_MINI_SIZE);
{
return RSVP::staticGet('uri', $notice->uri);
}
+
+ static function forEvent($event)
+ {
+ $rsvps = array(RSVP::POSITIVE => array(), RSVP::NEGATIVE => array(), RSVP::POSSIBLE => array());
+
+ $rsvp = new RSVP();
+
+ $rsvp->event_id = $event->id;
+
+ if ($rsvp->find()) {
+ while ($rsvp->fetch()) {
+ $verb = $this->verbFor($rsvp->code);
+ $rsvps[$verb][] = clone($rsvp);
+ }
+ }
+
+ return $rsvps;
+ }
}