diff --git a/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php b/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php index 6ecc9376d7..fc4161d6cf 100644 --- a/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php +++ b/src/applications/calendar/query/PhabricatorCalendarEventSearchEngine.php @@ -368,6 +368,8 @@ final class PhabricatorCalendarEventSearchEngine $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 @@ final class PhabricatorCalendarEventSearchEngine ->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 index ca41fc8cf1..adcaa6f316 100644 --- a/src/applications/calendar/storage/PhabricatorCalendarEvent.php +++ b/src/applications/calendar/storage/PhabricatorCalendarEvent.php @@ -538,16 +538,6 @@ final class PhabricatorCalendarEvent extends PhabricatorCalendarDAO 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 @@ final class PhabricatorCalendarEvent extends PhabricatorCalendarDAO 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 index f04bc1c5fa..28e6e464a3 100644 --- a/src/applications/people/controller/PhabricatorPeopleProfileViewController.php +++ b/src/applications/people/controller/PhabricatorPeopleProfileViewController.php @@ -194,11 +194,12 @@ final class PhabricatorPeopleProfileViewController ->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 index dd0a31fe5d..5c09a753b7 100644 --- a/src/docs/user/userguide/calendar.diviner +++ b/src/docs/user/userguide/calendar.diviner @@ -37,6 +37,22 @@ revision or task. 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 index d89b5c8f71..291097a6c0 100644 --- a/src/infrastructure/internationalization/translation/PhabricatorUSEnglishTranslation.php +++ b/src/infrastructure/internationalization/translation/PhabricatorUSEnglishTranslation.php @@ -1580,6 +1580,14 @@ final class PhabricatorUSEnglishTranslation '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.', + ), + ), + ); }