1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-18 21:02:41 +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()) { if ($event->getIsRecurring()) {
$properties->addProperty( $properties->addProperty(
pht('Recurs'), 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( $properties->addProperty(

View file

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

View file

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