From 73f63158a85e1cd049d32e8b226df2bbab4400bd Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 21 Jan 2013 07:46:13 -0800 Subject: [PATCH] Fix double-menus in Herald transcripts Summary: Fixes T2329. Adds crumbs and gets rid of the double-depth menus. Test Plan: Looked at transcript list, test controller and transcript detail. Reviewers: chad, btrahan Reviewed By: chad CC: aran Maniphest Tasks: T2329 Differential Revision: https://secure.phabricator.com/D4564 --- .../controller/HeraldTestConsoleController.php | 10 ++++++++++ .../controller/HeraldTranscriptController.php | 14 ++++++++++---- .../controller/HeraldTranscriptListController.php | 6 ++++++ 3 files changed, 26 insertions(+), 4 deletions(-) diff --git a/src/applications/herald/controller/HeraldTestConsoleController.php b/src/applications/herald/controller/HeraldTestConsoleController.php index 43e517d0c4..8856c879c4 100644 --- a/src/applications/herald/controller/HeraldTestConsoleController.php +++ b/src/applications/herald/controller/HeraldTestConsoleController.php @@ -125,6 +125,16 @@ final class HeraldTestConsoleController extends HeraldController { $panel, )); + $crumbs = id($this->buildApplicationCrumbs()) + ->addCrumb( + id(new PhabricatorCrumbView()) + ->setName(pht('Transcripts')) + ->setHref($this->getApplicationURI('/transcript/'))) + ->addCrumb( + id(new PhabricatorCrumbView()) + ->setName(pht('Test Console'))); + $nav->setCrumbs($crumbs); + return $this->buildStandardPageResponse( $nav, array( diff --git a/src/applications/herald/controller/HeraldTranscriptController.php b/src/applications/herald/controller/HeraldTranscriptController.php index 496f4eca66..5dec02733e 100644 --- a/src/applications/herald/controller/HeraldTranscriptController.php +++ b/src/applications/herald/controller/HeraldTranscriptController.php @@ -70,12 +70,18 @@ final class HeraldTranscriptController extends HeraldController { $nav->appendChild($object_xscript_panel); } - $main_nav = $this->renderNav(); - $main_nav->selectFilter('transcript'); - $main_nav->appendChild($nav); + $crumbs = id($this->buildApplicationCrumbs()) + ->addCrumb( + id(new PhabricatorCrumbView()) + ->setName(pht('Transcripts')) + ->setHref($this->getApplicationURI('/transcript/'))) + ->addCrumb( + id(new PhabricatorCrumbView()) + ->setName($xscript->getID())); + $nav->setCrumbs($crumbs); return $this->buildStandardPageResponse( - $main_nav, + $nav, array( 'title' => 'Transcript', )); diff --git a/src/applications/herald/controller/HeraldTranscriptListController.php b/src/applications/herald/controller/HeraldTranscriptListController.php index 1f68313e0f..256aa7588c 100644 --- a/src/applications/herald/controller/HeraldTranscriptListController.php +++ b/src/applications/herald/controller/HeraldTranscriptListController.php @@ -99,6 +99,12 @@ final class HeraldTranscriptListController extends HeraldController { $nav->selectFilter('transcript'); $nav->appendChild($panel); + $crumbs = id($this->buildApplicationCrumbs()) + ->addCrumb( + id(new PhabricatorCrumbView()) + ->setName(pht('Transcripts'))); + $nav->setCrumbs($crumbs); + return $this->buildStandardPageResponse( $nav, array(