@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.

Fix packages base uri and introduce a console for that base uri

Summary:
The packages base uri is /packages/.
Previously, the base uri pointed to the packages search engine.
Because that prevents navigating to the publishers search engine
and the versions search engine and because the new base uri is a 404,
add a console, similar to Almanac or Nuance to link to these
endpoints. This makes the forms for publishers and versions
accessible without manually navigating there.

Test Plan:
* Clicked on the Packages application in Applications and saw a Console
* Clicked on the options in the console and saw all search engines
* Clicked on the packages crumb and got sent to the console
* Created a package and clicked on Edit Package and didn't see a 404

Reviewers: O1 Blessed Committers, aklapper

Reviewed By: O1 Blessed Committers, aklapper

Subscribers: aklapper, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Differential Revision: https://we.phorge.it/D25881

+72 -1
+2
src/__phutil_library_map__.php
··· 4057 4057 'PhabricatorPHPConfigSetupCheck' => 'applications/config/check/PhabricatorPHPConfigSetupCheck.php', 4058 4058 'PhabricatorPHPPreflightSetupCheck' => 'applications/config/check/PhabricatorPHPPreflightSetupCheck.php', 4059 4059 'PhabricatorPackagesApplication' => 'applications/packages/application/PhabricatorPackagesApplication.php', 4060 + 'PhabricatorPackagesConsoleController' => 'applications/packages/controller/PhabricatorPackagesConsoleController.php', 4060 4061 'PhabricatorPackagesController' => 'applications/packages/controller/PhabricatorPackagesController.php', 4061 4062 'PhabricatorPackagesCreatePublisherCapability' => 'applications/packages/capability/PhabricatorPackagesCreatePublisherCapability.php', 4062 4063 'PhabricatorPackagesDAO' => 'applications/packages/storage/PhabricatorPackagesDAO.php', ··· 10611 10612 'PhabricatorPHPConfigSetupCheck' => 'PhabricatorSetupCheck', 10612 10613 'PhabricatorPHPPreflightSetupCheck' => 'PhabricatorSetupCheck', 10613 10614 'PhabricatorPackagesApplication' => 'PhabricatorApplication', 10615 + 'PhabricatorPackagesConsoleController' => 'PhabricatorPackagesController', 10614 10616 'PhabricatorPackagesController' => 'PhabricatorController', 10615 10617 'PhabricatorPackagesCreatePublisherCapability' => 'PhabricatorPolicyCapability', 10616 10618 'PhabricatorPackagesDAO' => 'PhabricatorLiskDAO',
+2 -1
src/applications/packages/application/PhabricatorPackagesApplication.php
··· 15 15 } 16 16 17 17 public function getBaseURI() { 18 - return '/packages/package/'; 18 + return '/packages/'; 19 19 } 20 20 21 21 public function getIcon() { ··· 64 64 ), 65 65 ), 66 66 '/packages/' => array( 67 + '' => 'PhabricatorPackagesConsoleController', 67 68 'publisher/' => array( 68 69 $this->getQueryRoutePattern() => 69 70 'PhabricatorPackagesPublisherListController',
+68
src/applications/packages/controller/PhabricatorPackagesConsoleController.php
··· 1 + <?php 2 + 3 + final class PhabricatorPackagesConsoleController 4 + extends PhabricatorPackagesController { 5 + 6 + public function shouldAllowPublic() { 7 + return true; 8 + } 9 + 10 + public function handleRequest(AphrontRequest $request) { 11 + $viewer = $request->getViewer(); 12 + 13 + $menu = id(new PHUIObjectItemListView()) 14 + ->setViewer($viewer) 15 + ->setBig(true); 16 + 17 + $menu->addItem( 18 + id(new PHUIObjectItemView()) 19 + ->setHeader(pht('Publishers')) 20 + ->setHref($this->getApplicationURI('publisher/')) 21 + ->setImageIcon('fa-institution') 22 + ->setClickable(true) 23 + ->addAttribute( 24 + pht( 25 + 'Manage software publishers.'))); 26 + 27 + $menu->addItem( 28 + id(new PHUIObjectItemView()) 29 + ->setHeader(pht('Packages')) 30 + ->setHref($this->getApplicationURI('package/')) 31 + ->setImageIcon('fa-gift') 32 + ->setClickable(true) 33 + ->addAttribute( 34 + pht( 35 + 'Create and update software packages.'))); 36 + 37 + $menu->addItem( 38 + id(new PHUIObjectItemView()) 39 + ->setHeader(pht('Versions')) 40 + ->setHref($this->getApplicationURI('version/')) 41 + ->setImageIcon('fa-birthday-cake') 42 + ->setClickable(true) 43 + ->addAttribute( 44 + pht( 45 + 'Release and update package versions.'))); 46 + 47 + $crumbs = $this->buildApplicationCrumbs(); 48 + $crumbs->addTextCrumb(pht('Console')); 49 + $crumbs->setBorder(true); 50 + 51 + $box = id(new PHUIObjectBoxView()) 52 + ->setHeaderText(pht('Packages Console')) 53 + ->setBackground(PHUIObjectBoxView::WHITE_CONFIG) 54 + ->setObjectList($menu); 55 + 56 + $launcher_view = id(new PHUILauncherView()) 57 + ->appendChild($box); 58 + 59 + $view = id(new PHUITwoColumnView()) 60 + ->setFooter($launcher_view); 61 + 62 + return $this->newPage() 63 + ->setTitle(pht('Packages Console')) 64 + ->setCrumbs($crumbs) 65 + ->appendChild($view); 66 + } 67 + 68 + }