From 7fd6704fb5c789be51757df3b4d8c43ce0fbc995 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Mon, 9 Nov 2015 22:18:27 +0000 Subject: [PATCH] Add a crumb to blog on Phame posts Summary: Crumbies Test Plan: View post, see blog link, click on crumb, see blog Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D14449 --- .../phame/controller/blog/PhameBlogViewController.php | 7 +++++-- .../phame/controller/post/PhamePostViewController.php | 5 +++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/applications/phame/controller/blog/PhameBlogViewController.php b/src/applications/phame/controller/blog/PhameBlogViewController.php index 249bd5506a..2f20702f6e 100644 --- a/src/applications/phame/controller/blog/PhameBlogViewController.php +++ b/src/applications/phame/controller/blog/PhameBlogViewController.php @@ -39,8 +39,11 @@ final class PhameBlogViewController extends PhameBlogController { ->appendChild($post_list); $crumbs = $this->buildApplicationCrumbs(); - $crumbs->addTextCrumb(pht('Blogs'), $this->getApplicationURI('blog/')); - $crumbs->addTextCrumb($blog->getName(), $this->getApplicationURI()); + $crumbs->addTextCrumb( + pht('Blogs'), + $this->getApplicationURI('blog/')); + $crumbs->addTextCrumb( + $blog->getName()); $object_box = id(new PHUIObjectBoxView()) ->setHeader($header) diff --git a/src/applications/phame/controller/post/PhamePostViewController.php b/src/applications/phame/controller/post/PhamePostViewController.php index ca48af1036..8b85ada2aa 100644 --- a/src/applications/phame/controller/post/PhamePostViewController.php +++ b/src/applications/phame/controller/post/PhamePostViewController.php @@ -14,7 +14,12 @@ final class PhamePostViewController extends PhamePostController { return new Aphront404Response(); } + $blog = $post->getBlog(); + $crumbs = $this->buildApplicationCrumbs(); + $crumbs->addTextCrumb( + $blog->getName(), + $this->getApplicationURI('blog/view/'.$blog->getID().'/')); $crumbs->addTextCrumb( $post->getTitle(), $this->getApplicationURI('post/view/'.$post->getID().'/'));