Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14008190
D13352.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
5 KB
Referenced Files
None
Subscribers
None
D13352.diff
View Options
diff --git a/src/applications/calendar/controller/PhabricatorCalendarEventEditController.php b/src/applications/calendar/controller/PhabricatorCalendarEventEditController.php
--- a/src/applications/calendar/controller/PhabricatorCalendarEventEditController.php
+++ b/src/applications/calendar/controller/PhabricatorCalendarEventEditController.php
@@ -341,10 +341,10 @@
$recurrence_frequency_select = id(new AphrontFormSelectControl())
->setName('frequency')
->setOptions(array(
- 'daily' => pht('Daily'),
- 'weekly' => pht('Weekly'),
- 'monthly' => pht('Monthly'),
- 'yearly' => pht('Yearly'),
+ PhabricatorCalendarEvent::FREQUENCY_DAILY => pht('Daily'),
+ PhabricatorCalendarEvent::FREQUENCY_WEEKLY => pht('Weekly'),
+ PhabricatorCalendarEvent::FREQUENCY_MONTHLY => pht('Monthly'),
+ PhabricatorCalendarEvent::FREQUENCY_YEARLY => pht('Yearly'),
))
->setValue($frequency)
->setLabel(pht('Recurring Event Frequency'))
diff --git a/src/applications/calendar/storage/PhabricatorCalendarEvent.php b/src/applications/calendar/storage/PhabricatorCalendarEvent.php
--- a/src/applications/calendar/storage/PhabricatorCalendarEvent.php
+++ b/src/applications/calendar/storage/PhabricatorCalendarEvent.php
@@ -37,6 +37,12 @@
private $invitees = self::ATTACHABLE;
private $appliedViewer;
+ // Frequency Constants
+ const FREQUENCY_DAILY = 'daily';
+ const FREQUENCY_WEEKLY = 'weekly';
+ const FREQUENCY_MONTHLY = 'monthly';
+ const FREQUENCY_YEARLY = 'yearly';
+
public static function initializeNewCalendarEvent(
PhabricatorUser $actor,
$mode) {
diff --git a/src/applications/calendar/storage/PhabricatorCalendarEventTransaction.php b/src/applications/calendar/storage/PhabricatorCalendarEventTransaction.php
--- a/src/applications/calendar/storage/PhabricatorCalendarEventTransaction.php
+++ b/src/applications/calendar/storage/PhabricatorCalendarEventTransaction.php
@@ -254,11 +254,37 @@
}
return $text;
case self::TYPE_RECURRING:
+ $text = pht('%s made this event recurring.',
+ $this->renderHandleLink($author_phid));
+ return $text;
case self::TYPE_FREQUENCY:
+ $text = '';
+ switch ($new['rule']) {
+ case PhabricatorCalendarEvent::FREQUENCY_DAILY:
+ $text = pht('%s set this event to repeat daily.',
+ $this->renderHandleLink($author_phid));
+ break;
+ case PhabricatorCalendarEvent::FREQUENCY_WEEKLY:
+ $text = pht('%s set this event to repeat weekly.',
+ $this->renderHandleLink($author_phid));
+ break;
+ case PhabricatorCalendarEvent::FREQUENCY_MONTHLY:
+ $text = pht('%s set this event to repeat monthly.',
+ $this->renderHandleLink($author_phid));
+ break;
+ case PhabricatorCalendarEvent::FREQUENCY_YEARLY:
+ $text = pht('%s set this event to repeat yearly.',
+ $this->renderHandleLink($author_phid));
+ break;
+ }
+ return $text;
case self::TYPE_RECURRENCE_END_DATE:
+ $text = pht('%s has changed the recurrence end date of this event.',
+ $this->renderHandleLink($author_phid));
+ return $text;
case self::TYPE_INSTANCE_OF_EVENT:
case self::TYPE_SEQUENCE_INDEX:
- return pht('Recurring event has been updated');
+ return pht('Recurring event has been updated.');
}
return parent::getTitle();
}
@@ -438,11 +464,44 @@
}
return $text;
case self::TYPE_RECURRING:
+ $text = pht('%s made %s a recurring event.',
+ $this->renderHandleLink($author_phid),
+ $this->renderHandleLink($object_phid));
+ return $text;
case self::TYPE_FREQUENCY:
+ $text = '';
+ switch ($new['rule']) {
+ case PhabricatorCalendarEvent::FREQUENCY_DAILY:
+ $text = pht('%s set %s to repeat daily.',
+ $this->renderHandleLink($author_phid),
+ $this->renderHandleLink($object_phid));
+ break;
+ case PhabricatorCalendarEvent::FREQUENCY_WEEKLY:
+ $text = pht('%s set %s to repeat weekly.',
+ $this->renderHandleLink($author_phid),
+ $this->renderHandleLink($object_phid));
+ break;
+ case PhabricatorCalendarEvent::FREQUENCY_MONTHLY:
+ $text = pht('%s set %s to repeat monthly.',
+ $this->renderHandleLink($author_phid),
+ $this->renderHandleLink($object_phid));
+ break;
+ case PhabricatorCalendarEvent::FREQUENCY_YEARLY:
+ $text = pht('%s set %s to repeat yearly.',
+ $this->renderHandleLink($author_phid),
+ $this->renderHandleLink($object_phid));
+ break;
+ }
+ return $text;
case self::TYPE_RECURRENCE_END_DATE:
+ $text = pht('%s set the recurrence end date of %s to %s.',
+ $this->renderHandleLink($author_phid),
+ $this->renderHandleLink($object_phid),
+ $new);
+ return $text;
case self::TYPE_INSTANCE_OF_EVENT:
case self::TYPE_SEQUENCE_INDEX:
- return pht('Recurring event has been updated');
+ return pht('Recurring event has been updated.');
}
return parent::getTitleForFeed();
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Oct 30, 5:13 PM (2 w, 8 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6714581
Default Alt Text
D13352.diff (5 KB)
Attached To
Mode
D13352: Adds details to Calendar event feed titles
Attached
Detach File
Event Timeline
Log In to Comment