From 5b56aa3c6d2a7f601817a290baaca44937082fb8 Mon Sep 17 00:00:00 2001 From: lkassianik Date: Mon, 27 Apr 2015 14:27:00 -0700 Subject: [PATCH] Calendar event monograms, part 2. Calendar event monogram should appear in the object crumbs and page titles. Summary: Ref T7928, Calendar event monograms, part 2. Calendar event monogram should appear in the object crumbs and page titles. Test Plan: Create calendar event, event details page should show a clickable crumb, E{id}, and clicking edit should show a page where the crumbs show E{id} > Update Event Reviewers: #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: epriestley, Korvin Maniphest Tasks: T7928 Differential Revision: https://secure.phabricator.com/D12579 --- .../PhabricatorCalendarEventEditController.php | 10 +++++++--- .../PhabricatorCalendarEventViewController.php | 4 ++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/applications/calendar/controller/PhabricatorCalendarEventEditController.php b/src/applications/calendar/controller/PhabricatorCalendarEventEditController.php index 78e25fe563..c1c1a8028c 100644 --- a/src/applications/calendar/controller/PhabricatorCalendarEventEditController.php +++ b/src/applications/calendar/controller/PhabricatorCalendarEventEditController.php @@ -183,9 +183,13 @@ final class PhabricatorCalendarEventEditController $nav = $this->buildSideNavView($status); $nav->selectFilter($filter); - $crumbs = $this - ->buildApplicationCrumbs() - ->addTextCrumb($page_title); + $crumbs = $this->buildApplicationCrumbs(); + + if (!$this->isCreate()) { + $crumbs->addTextCrumb('E'.$status->getId(), '/E'.$status->getId()); + } + + $crumbs->addTextCrumb($page_title); $nav->appendChild( array( diff --git a/src/applications/calendar/controller/PhabricatorCalendarEventViewController.php b/src/applications/calendar/controller/PhabricatorCalendarEventViewController.php index b72b8fbb02..cc51bd1811 100644 --- a/src/applications/calendar/controller/PhabricatorCalendarEventViewController.php +++ b/src/applications/calendar/controller/PhabricatorCalendarEventViewController.php @@ -25,9 +25,9 @@ final class PhabricatorCalendarEventViewController return new Aphront404Response(); } - $title = pht('Event %d', $event->getID()); + $title = 'E'.$event->getID(); $crumbs = $this->buildApplicationCrumbs(); - $crumbs->addTextCrumb($title); + $crumbs->addTextCrumb($title, '/E'.$event->getID()); $header = $this->buildHeaderView($event); $actions = $this->buildActionView($event);