From 667897639fe27e21e0ed0e60e18b17e719fb3ccc Mon Sep 17 00:00:00 2001 From: lkassianik Date: Tue, 16 Jun 2015 13:38:48 -0700 Subject: [PATCH] First pass at event modal create options. Summary: Ref T8568, First pass at event modal create options. Test Plan: {nav Calendar > Create} should offer three options: Create Event, Create Public Event, Create Recurring Event. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: epriestley, Korvin Maniphest Tasks: T8568 Differential Revision: https://secure.phabricator.com/D13309 --- .../controller/PhabricatorCalendarController.php | 10 +++++++--- .../calendar/storage/PhabricatorCalendarEvent.php | 6 +++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/applications/calendar/controller/PhabricatorCalendarController.php b/src/applications/calendar/controller/PhabricatorCalendarController.php index a17a96784f..6cba6d8fa7 100644 --- a/src/applications/calendar/controller/PhabricatorCalendarController.php +++ b/src/applications/calendar/controller/PhabricatorCalendarController.php @@ -9,12 +9,16 @@ abstract class PhabricatorCalendarController extends PhabricatorController { ->setUser($this->getViewer()) ->addAction( id(new PhabricatorActionView()) - ->setName(pht('Create Private Event')) - ->setHref('/calendar/event/create/?mode=private')) + ->setName(pht('Create Event')) + ->setHref('/calendar/event/create/')) ->addAction( id(new PhabricatorActionView()) ->setName(pht('Create Public Event')) - ->setHref('/calendar/event/create/?mode=public')); + ->setHref('/calendar/event/create/?mode=public')) + ->addAction( + id(new PhabricatorActionView()) + ->setName(pht('Create Recurring Event')) + ->setHref('/calendar/event/create/?mode=recurring')); $crumbs->addAction( id(new PHUIListItemView()) diff --git a/src/applications/calendar/storage/PhabricatorCalendarEvent.php b/src/applications/calendar/storage/PhabricatorCalendarEvent.php index f12bf9a9c3..2b3fc4bdb8 100644 --- a/src/applications/calendar/storage/PhabricatorCalendarEvent.php +++ b/src/applications/calendar/storage/PhabricatorCalendarEvent.php @@ -50,10 +50,10 @@ final class PhabricatorCalendarEvent extends PhabricatorCalendarDAO if ($mode == 'public') { $view_policy = PhabricatorPolicies::getMostOpenPolicy(); - } else if ($mode == 'recurring') { + } + + if ($mode == 'recurring') { $is_recurring = true; - } else { - $view_policy = $actor->getPHID(); } return id(new PhabricatorCalendarEvent())