diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index d5129ebe3d..d6ce216cc2 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -412,6 +412,7 @@ phutil_register_library_map(array( 'DiffusionTagListView' => 'applications/diffusion/view/DiffusionTagListView.php', 'DiffusionURITestCase' => 'applications/diffusion/request/__tests__/DiffusionURITestCase.php', 'DiffusionView' => 'applications/diffusion/view/DiffusionView.php', + 'DivinerListController' => 'applications/diviner/controller/DivinerListController.php', 'DrydockAllocator' => 'applications/drydock/allocator/DrydockAllocator.php', 'DrydockAllocatorWorker' => 'applications/drydock/allocator/DrydockAllocatorWorker.php', 'DrydockApacheWebrootBlueprint' => 'applications/drydock/blueprint/webroot/DrydockApacheWebrootBlueprint.php', @@ -1594,6 +1595,7 @@ phutil_register_library_map(array( 'DiffusionTagListView' => 'DiffusionView', 'DiffusionURITestCase' => 'ArcanistPhutilTestCase', 'DiffusionView' => 'AphrontView', + 'DivinerListController' => 'PhabricatorController', 'DrydockAllocatorWorker' => 'PhabricatorWorker', 'DrydockApacheWebrootBlueprint' => 'DrydockBlueprint', 'DrydockApacheWebrootInterface' => 'DrydockWebrootInterface', diff --git a/src/applications/diviner/application/PhabricatorApplicationDiviner.php b/src/applications/diviner/application/PhabricatorApplicationDiviner.php index 204b4a9270..a8c786cc1b 100644 --- a/src/applications/diviner/application/PhabricatorApplicationDiviner.php +++ b/src/applications/diviner/application/PhabricatorApplicationDiviner.php @@ -18,8 +18,26 @@ final class PhabricatorApplicationDiviner extends PhabricatorApplication { - public function shouldAppearInLaunchView() { - return false; + public function getBaseURI() { + return '/diviner/'; + } + + public function getAutospriteName() { + return 'diviner'; + } + + public function getShortDescription() { + return 'Documentation'; + } + + public function getTitleGlyph() { + return "\xE2\x97\x89"; + } + + public function getRoutes() { + return array( + '/diviner/' => 'DivinerListController', + ); } public function buildMainMenuItems( diff --git a/src/applications/diviner/controller/DivinerListController.php b/src/applications/diviner/controller/DivinerListController.php new file mode 100644 index 0000000000..32548f7e0e --- /dev/null +++ b/src/applications/diviner/controller/DivinerListController.php @@ -0,0 +1,79 @@ + array( + 'name' => 'Phabricator Ducks', + 'flavor' => 'Oops, that should say "Docs".', + ), + 'http://www.phabricator.com/docs/arcanist/' => array( + 'name' => 'Arcanist Docs', + 'flavor' => 'Words have never been so finely crafted.', + ), + 'http://www.phabricator.com/docs/libphutil/' => array( + 'name' => 'libphutil Docs', + 'flavor' => 'Soothing prose; seductive poetry.', + ), + 'http://www.phabricator.com/docs/javelin/' => array( + 'name' => 'Javelin Docs', + 'flavor' => 'O, what noble scribe hath penned these words?', + ), + ); + + require_celerity_resource('phabricator-directory-css'); + + $out = array(); + foreach ($links as $href => $link) { + $name = $link['name']; + $flavor = $link['flavor']; + + $link = phutil_render_tag( + 'a', + array( + 'href' => $href, + 'target' => '_blank', + ), + phutil_escape_html($name)); + + $out[] = + '
'.phutil_escape_html($flavor).'
'. + '