protected function addApplicationCrumb(PHUICrumbsView $crumbs, PhabricatorApplication $application)
 {
     $crumbs->addTextCrumb($application->getName(), '/applications/view/' . get_class($application) . '/');
 }
 protected function buildApplicationCrumbs()
 {
     $blog = $this->getBlog();
     $post = $this->getPost();
     $is_live = $this->getIsLive();
     $is_external = $this->getIsExternal();
     // If this is an external view, don't put the "Phame" crumb or the
     // "Blogs" crumb into the crumbs list.
     if ($is_external) {
         $crumbs = new PHUICrumbsView();
         // Link back to parent site
         if ($blog->getParentSite() && $blog->getParentDomain()) {
             $crumbs->addTextCrumb($blog->getParentSite(), $blog->getExternalParentURI());
         }
     } else {
         $crumbs = parent::buildApplicationCrumbs();
         $crumbs->addTextCrumb(pht('Blogs'), $this->getApplicationURI('blog/'));
     }
     $crumbs->setBorder(true);
     if ($blog) {
         if ($post) {
             if ($is_live) {
                 if ($is_external) {
                     $blog_uri = $blog->getExternalLiveURI();
                 } else {
                     $blog_uri = $blog->getInternalLiveURI();
                 }
             } else {
                 $blog_uri = $blog->getViewURI();
             }
         } else {
             $blog_uri = null;
         }
         $crumbs->addTextCrumb($blog->getName(), $blog_uri);
     }
     if ($post) {
         if (!$is_external) {
             $crumbs->addTextCrumb('J' . $post->getID());
         }
     }
     return $crumbs;
 }
예제 #3
0
 protected function addBuildableCrumb(PHUICrumbsView $crumbs, HarbormasterBuildable $buildable)
 {
     $monogram = $buildable->getMonogram();
     $uri = '/' . $monogram;
     $crumbs->addTextCrumb($monogram, $uri);
 }