1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 00:42:41 +01:00

Make ghost event instances render better on the event list

Summary:
Ref T11326. Currently, we render "E (99)" for ghost instances, which is meaningless and inconsistent.

Render these more sensibly and consistently.

Test Plan: Viewed event list, saw reasonable monograms / object names.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11326

Differential Revision: https://secure.phabricator.com/D16296
This commit is contained in:
epriestley 2016-07-14 04:44:13 -07:00
parent 2a1b8ce85b
commit 7c9a74ce04

View file

@ -275,19 +275,18 @@ final class PhabricatorCalendarEventSearchEngine
} }
if ($event->getIsGhostEvent()) { if ($event->getIsGhostEvent()) {
$title_text = $event->getMonogram() $monogram = $event->getParentEvent()->getMonogram();
.' (' $index = $event->getSequenceIndex();
.$event->getSequenceIndex() $monogram = "{$monogram}/{$index}";
.'): '
.$event->getName();
} else { } else {
$title_text = $event->getMonogram().': '.$event->getName(); $monogram = $event->getMonogram();
} }
$item = id(new PHUIObjectItemView()) $item = id(new PHUIObjectItemView())
->setUser($viewer) ->setUser($viewer)
->setObject($event) ->setObject($event)
->setHeader($title_text) ->setObjectName($monogram)
->setHeader($event->getName())
->setHref($event->getURI()) ->setHref($event->getURI())
->addAttribute($event_date_info); ->addAttribute($event_date_info);