Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13989045
D13108.id31671.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D13108.id31671.diff
View Options
diff --git a/src/applications/calendar/controller/PhabricatorCalendarEventViewController.php b/src/applications/calendar/controller/PhabricatorCalendarEventViewController.php
--- a/src/applications/calendar/controller/PhabricatorCalendarEventViewController.php
+++ b/src/applications/calendar/controller/PhabricatorCalendarEventViewController.php
@@ -135,24 +135,27 @@
$event,
PhabricatorPolicyCapability::CAN_EDIT);
- if ($event->getIsRecurring() && $event->getInstanceOfEventPHID()) {
- $index = $event->getSequenceIndex();
+ $edit_label = false;
+ $edit_uri = false;
- $actions->addAction(
- id(new PhabricatorActionView())
- ->setName(pht('Edit This Instance'))
- ->setIcon('fa-pencil')
- ->setHref($this->getApplicationURI("event/edit/{$id}/{$index}/"))
- ->setDisabled(!$can_edit)
- ->setWorkflow(!$can_edit));
+ if ($event->getIsGhostEvent()) {
+ $index = $event->getSequenceIndex();
+ $edit_label = pht('Edit This Instance');
+ $edit_uri = "event/edit/{$id}/{$index}/";
+ } else if ($event->getInstanceOfEventPHID() && !$event->getIsGhostEvent()) {
+ $edit_label = pht('Edit This Instance');
+ $edit_uri = "event/edit/{$id}/";
+ } else if (!$event->getIsRecurring()) {
+ $edit_label = pht('Edit');
+ $edit_uri = "event/edit/{$id}/";
}
- if (!$event->getIsRecurring() && !$event->getIsGhostEvent()) {
+ if ($edit_label && $edit_uri) {
$actions->addAction(
id(new PhabricatorActionView())
- ->setName(pht('Edit Event'))
+ ->setName($edit_label)
->setIcon('fa-pencil')
- ->setHref($this->getApplicationURI("event/edit/{$id}/"))
+ ->setHref($this->getApplicationURI($edit_uri))
->setDisabled(!$can_edit)
->setWorkflow(!$can_edit));
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Oct 22, 5:47 PM (3 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6719918
Default Alt Text
D13108.id31671.diff (1 KB)
Attached To
Mode
D13108: Edit link of an exception to a ghost event should not create new event
Attached
Detach File
Event Timeline
Log In to Comment