mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42:41 +01:00
Event detail view of Calendar events with no invitees should show "None" in the Properties column.
Summary: Ref T8020, Event detail view of Calendar events with no invitees should show "None" in the Properties column. Test Plan: Open event, edit event to have no invitees, save, event detail view should show "None" in the Invitee section of the Properties column Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: Korvin, epriestley Maniphest Tasks: T8020 Differential Revision: https://secure.phabricator.com/D12718
This commit is contained in:
parent
8d128646b3
commit
a802371974
1 changed files with 24 additions and 14 deletions
|
@ -187,24 +187,34 @@ final class PhabricatorCalendarEventViewController
|
|||
pht('Ends'),
|
||||
phabricator_datetime($event->getDateTo(), $viewer));
|
||||
|
||||
$invitees = $event->getInvitees();
|
||||
$invitee_list = new PHUIStatusListView();
|
||||
foreach ($invitees as $invitee) {
|
||||
if ($invitee->isUninvited()) {
|
||||
continue;
|
||||
}
|
||||
$item = new PHUIStatusItemView();
|
||||
$invitee_phid = $invitee->getInviteePHID();
|
||||
$target = $viewer->renderHandle($invitee_phid);
|
||||
$item->setNote($invitee->getStatus())
|
||||
->setTarget($target);
|
||||
$invitee_list->addItem($item);
|
||||
}
|
||||
|
||||
$properties->addProperty(
|
||||
pht('Host'),
|
||||
$viewer->renderHandle($event->getUserPHID()));
|
||||
|
||||
$invitees = $event->getInvitees();
|
||||
foreach ($invitees as $key => $invitee) {
|
||||
if ($invitee->isUninvited()) {
|
||||
unset($invitees[$key]);
|
||||
}
|
||||
}
|
||||
|
||||
if ($invitees) {
|
||||
$invitee_list = new PHUIStatusListView();
|
||||
foreach ($invitees as $invitee) {
|
||||
$item = new PHUIStatusItemView();
|
||||
$invitee_phid = $invitee->getInviteePHID();
|
||||
$target = $viewer->renderHandle($invitee_phid);
|
||||
$item->setNote($invitee->getStatus())
|
||||
->setTarget($target);
|
||||
$invitee_list->addItem($item);
|
||||
}
|
||||
} else {
|
||||
$invitee_list = phutil_tag(
|
||||
'em',
|
||||
array(),
|
||||
pht('None'));
|
||||
}
|
||||
|
||||
$properties->addProperty(
|
||||
pht('Invitees'),
|
||||
$invitee_list);
|
||||
|
|
Loading…
Reference in a new issue