diff --git a/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php b/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php --- a/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php +++ b/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php @@ -368,6 +368,8 @@ $epoch_min = $event->getStartDateTimeEpoch(); $epoch_max = $event->getEndDateTimeEpoch(); + $is_invited = $event->isRSVPInvited($viewer->getPHID()); + $event_view = id(new AphrontCalendarEventView()) ->setHostPHID($event->getHostPHID()) ->setEpochRange($epoch_min, $epoch_max) @@ -376,7 +378,7 @@ ->setURI($event->getURI()) ->setIsAllDay($event->getIsAllDay()) ->setIcon($event->getDisplayIcon($viewer)) - ->setViewerIsInvited($event->getIsUserInvited($viewer->getPHID())) + ->setViewerIsInvited($is_invited) ->setIconColor($event->getDisplayIconColor($viewer)); $month_view->addEvent($event_view); diff --git a/src/applications/calendar/storage/PhabricatorCalendarEvent.php b/src/applications/calendar/storage/PhabricatorCalendarEvent.php --- a/src/applications/calendar/storage/PhabricatorCalendarEvent.php +++ b/src/applications/calendar/storage/PhabricatorCalendarEvent.php @@ -538,16 +538,6 @@ return $is_attending; } - public function getIsUserInvited($phid) { - $uninvited_status = PhabricatorCalendarEventInvitee::STATUS_UNINVITED; - $declined_status = PhabricatorCalendarEventInvitee::STATUS_DECLINED; - $status = $this->getUserInviteStatus($phid); - if ($status == $uninvited_status || $status == $declined_status) { - return false; - } - return true; - } - public function getIsGhostEvent() { return $this->isGhostEvent; } @@ -655,7 +645,7 @@ case PhabricatorCalendarEventInvitee::STATUS_INVITED: return 'fa-user-plus'; case PhabricatorCalendarEventInvitee::STATUS_DECLINED: - return 'fa-times'; + return 'fa-times-circle'; } } } diff --git a/src/applications/people/controller/PhabricatorPeopleProfileViewController.php b/src/applications/people/controller/PhabricatorPeopleProfileViewController.php --- a/src/applications/people/controller/PhabricatorPeopleProfileViewController.php +++ b/src/applications/people/controller/PhabricatorPeopleProfileViewController.php @@ -194,11 +194,12 @@ ->withDateRange($range_start, $range_end) ->withInvitedPHIDs(array($user->getPHID())) ->withIsCancelled(false) + ->needRSVPs(array($viewer->getPHID())) ->execute(); $event_views = array(); foreach ($events as $event) { - $viewer_is_invited = $event->getIsUserInvited($viewer->getPHID()); + $viewer_is_invited = $event->isRSVPInvited($viewer->getPHID()); $can_edit = PhabricatorPolicyFilter::hasCapability( $viewer, diff --git a/src/docs/user/userguide/calendar.diviner b/src/docs/user/userguide/calendar.diviner --- a/src/docs/user/userguide/calendar.diviner +++ b/src/docs/user/userguide/calendar.diviner @@ -37,6 +37,22 @@ You can click through to a user's profile to see more details about their availability. +Status Icons +============ + +On the month and day views, Calendar shows an icon next to each event to +indicate status. The icons are: + + - {icon user-plus, color=green} **Invited, Individual**: You're personally + invited to the event. + - {icon users, color=green} **Invited, Group**: A project you are a member + of is invited to the event. + - {icon check-circle, color=green} **Attending**: You're attending the event. + - {icon times-circle, color=grey} **Declined**: You've declined the event. + - {icon times, color=red} **Cancelled**: The event has been cancelled. + +If you don't have any special relationship to the event and the event does not +have any special status, an event-specific icon is shown instead. Importing Events ================ diff --git a/src/infrastructure/internationalization/translation/PhabricatorUSEnglishTranslation.php b/src/infrastructure/internationalization/translation/PhabricatorUSEnglishTranslation.php --- a/src/infrastructure/internationalization/translation/PhabricatorUSEnglishTranslation.php +++ b/src/infrastructure/internationalization/translation/PhabricatorUSEnglishTranslation.php @@ -1580,6 +1580,14 @@ 'Restart %s build?', 'Restart %s builds?', ), + + '%s is starting in %s minute(s), at %s.' => array( + array( + '%s is starting in one minute, at %3$s.', + '%s is starting in %s minutes, at %s.', + ), + ), + ); }