From 7a9c1ea0b4ff501f5465a3331fe95b50645de793 Mon Sep 17 00:00:00 2001 From: lkassianik Date: Mon, 27 Apr 2015 14:26:25 -0700 Subject: [PATCH] Calendar event monograms, part 1. Event default URL should be install/E{id} instead of install/calendar/view/{id} Summary: Ref T7928, Calendar event monograms, part 1. Default event URL should be install/E{id} Test Plan: Create calendar event, event should open with install/E{id} URL. Edit event and cancel edit, URL should remain install/E{id}. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: Korvin, epriestley Maniphest Tasks: T7928 Differential Revision: https://secure.phabricator.com/D12578 --- .../calendar/application/PhabricatorCalendarApplication.php | 3 +-- .../controller/PhabricatorCalendarEventEditController.php | 3 +-- src/view/phui/calendar/PHUICalendarListView.php | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/applications/calendar/application/PhabricatorCalendarApplication.php b/src/applications/calendar/application/PhabricatorCalendarApplication.php index 098e58795e..229bf03353 100644 --- a/src/applications/calendar/application/PhabricatorCalendarApplication.php +++ b/src/applications/calendar/application/PhabricatorCalendarApplication.php @@ -34,6 +34,7 @@ final class PhabricatorCalendarApplication extends PhabricatorApplication { public function getRoutes() { return array( + '/E(?P[1-9]\d*)' => 'PhabricatorCalendarEventViewController', '/calendar/' => array( '' => 'PhabricatorCalendarViewController', 'all/' => 'PhabricatorCalendarBrowseController', @@ -46,8 +47,6 @@ final class PhabricatorCalendarApplication extends PhabricatorApplication { => 'PhabricatorCalendarEventEditController', 'delete/(?P[1-9]\d*)/' => 'PhabricatorCalendarEventDeleteController', - 'view/(?P[1-9]\d*)/' - => 'PhabricatorCalendarEventViewController', ), ), ); diff --git a/src/applications/calendar/controller/PhabricatorCalendarEventEditController.php b/src/applications/calendar/controller/PhabricatorCalendarEventEditController.php index ef22084f58..78e25fe563 100644 --- a/src/applications/calendar/controller/PhabricatorCalendarEventEditController.php +++ b/src/applications/calendar/controller/PhabricatorCalendarEventEditController.php @@ -163,8 +163,7 @@ final class PhabricatorCalendarEventEditController if ($this->isCreate()) { $submit->addCancelButton($this->getApplicationURI()); } else { - $submit->addCancelButton( - $this->getApplicationURI('event/view/'.$status->getID().'/')); + $submit->addCancelButton('/E'.$status->getID()); } if ($request->isAjax()) { diff --git a/src/view/phui/calendar/PHUICalendarListView.php b/src/view/phui/calendar/PHUICalendarListView.php index b337efb0b4..fe2bdfb3d0 100644 --- a/src/view/phui/calendar/PHUICalendarListView.php +++ b/src/view/phui/calendar/PHUICalendarListView.php @@ -117,7 +117,7 @@ final class PHUICalendarListView extends AphrontTagView { array( 'sigil' => 'has-tooltip', 'class' => 'phui-calendar-item-link', - 'href' => '/calendar/event/view/'.$event->getEventID().'/', + 'href' => '/E'.$event->getEventID(), 'meta' => array( 'tip' => $tip, 'size' => 200,