1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-18 19:40:55 +01:00

Ghost events should provide a link to original event

Summary: Closes T8356, Ghost events should provide a link to original event

Test Plan: Open an instance at /calendar/event/{id}/{index}. It should have a link to /calendar/event/{id}. Original recurring event should not link to itself.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin, epriestley

Maniphest Tasks: T8356

Differential Revision: https://secure.phabricator.com/D13068
This commit is contained in:
lkassianik 2015-05-29 13:58:53 -07:00
parent cb52dd27fc
commit 3d40a5871d
3 changed files with 8 additions and 5 deletions

View file

@ -218,7 +218,12 @@ final class PhabricatorCalendarEventViewController
if ($event->getIsRecurring()) {
$properties->addProperty(
pht('Recurs'),
idx($event->getRecurrenceFrequency(), 'rule'));
ucwords(idx($event->getRecurrenceFrequency(), 'rule')));
if ($event->getIsGhostEvent()) {
$properties->addProperty(
pht('Recurrence of Event'),
$viewer->renderHandle($event->getInstanceOfEventPHID()));
}
}
$properties->addProperty(

View file

@ -288,8 +288,8 @@ final class PhabricatorCalendarEvent extends PhabricatorCalendarDAO
->setIsGhostEvent(true)
->setDateFrom($date)
->setDateTo($date + $duration)
->setIsRecurring(false)
->setRecurrenceFrequency(null)
->setIsRecurring(true)
->setRecurrenceFrequency($this->recurrenceFrequency)
->setInstanceOfEventPHID($this->getPHID())
->setSequenceIndex($sequence_index)
->setEditPolicy($edit_policy);

View file

@ -393,8 +393,6 @@ final class PhabricatorCalendarEventTransaction
$added = array();
$uninvited = array();
// $event = $this->renderHandleLink($object_phid);
foreach ($new as $phid => $status) {
if ($status == PhabricatorCalendarEventInvitee::STATUS_INVITED
|| $status == PhabricatorCalendarEventInvitee::STATUS_ATTENDING) {