@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Put some crumbs on some project pages

Summary: Ref T10010. This is primarily to make "Parent > Child > Grandchild" navigation more manageable for subprojects, at least for now.

Test Plan: Viewed profile, members, feed; saw crumbs.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10010

Differential Revision: https://secure.phabricator.com/D14891

+43 -12
+18
src/applications/project/controller/PhabricatorProjectController.php
··· 154 154 return $nav; 155 155 } 156 156 157 + protected function buildApplicationCrumbs() { 158 + $crumbs = parent::buildApplicationCrumbs(); 159 + 160 + $project = $this->getProject(); 161 + if ($project) { 162 + $ancestors = $project->getAncestorProjects(); 163 + $ancestors = array_reverse($ancestors); 164 + $ancestors[] = $project; 165 + foreach ($ancestors as $ancestor) { 166 + $crumbs->addTextCrumb( 167 + $project->getName(), 168 + $project->getURI()); 169 + } 170 + } 171 + 172 + return $crumbs; 173 + } 174 + 157 175 }
+8 -5
src/applications/project/controller/PhabricatorProjectFeedController.php
··· 37 37 $nav->selectFilter("feed/{$id}/"); 38 38 $nav->appendChild($box); 39 39 40 - return $this->buildApplicationPage( 41 - $nav, 42 - array( 43 - 'title' => $project->getName(), 44 - )); 40 + $crumbs = $this->buildApplicationCrumbs(); 41 + $crumbs->addTextCrumb(pht('Feed')); 42 + 43 + return $this->newPage() 44 + ->setNavigation($nav) 45 + ->setCrumbs($crumbs) 46 + ->setTitle(array($project->getName(), pht('Feed'))) 47 + ->appendChild($box); 45 48 } 46 49 47 50 private function renderStories(array $stories) {
+9 -7
src/applications/project/controller/PhabricatorProjectMembersEditController.php
··· 95 95 96 96 $nav = $this->buildIconNavView($project); 97 97 $nav->selectFilter("members/{$id}/"); 98 - $nav->appendChild($form_box); 99 - $nav->appendChild($member_list); 100 98 101 - return $this->buildApplicationPage( 102 - $nav, 103 - array( 104 - 'title' => $title, 105 - )); 99 + $crumbs = $this->buildApplicationCrumbs(); 100 + $crumbs->addTextCrumb(pht('Members')); 101 + 102 + return $this->newPage() 103 + ->setNavigation($nav) 104 + ->setCrumbs($crumbs) 105 + ->setTitle(array($project->getName(), $title)) 106 + ->appendChild($form_box) 107 + ->appendChild($member_list); 106 108 } 107 109 108 110 private function renderMemberList(
+3
src/applications/project/controller/PhabricatorProjectProfileController.php
··· 46 46 $nav = $this->buildIconNavView($project); 47 47 $nav->selectFilter("profile/{$id}/"); 48 48 49 + $crumbs = $this->buildApplicationCrumbs(); 50 + 49 51 return $this->newPage() 50 52 ->setNavigation($nav) 53 + ->setCrumbs($crumbs) 51 54 ->setTitle($project->getName()) 52 55 ->setPageObjectPHIDs(array($project->getPHID())) 53 56 ->appendChild($object_box)
+5
src/applications/project/storage/PhabricatorProject.php
··· 308 308 return $this->color; 309 309 } 310 310 311 + public function getURI() { 312 + $id = $this->getID(); 313 + return "/project/view/{$id}/"; 314 + } 315 + 311 316 public function save() { 312 317 if (!$this->getMailKey()) { 313 318 $this->setMailKey(Filesystem::readRandomCharacters(20));