mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-01 10:20:59 +01:00
4743ad9649
Summary: This uses the slightly smaller icons. Not sure about the logout icon, will play with it more in the morning. Test Plan: tested new nav on desktop and mobile. Reviewers: epriestley Reviewed By: epriestley CC: Korvin, epriestley, aran Differential Revision: https://secure.phabricator.com/D8119
75 lines
1.7 KiB
PHP
75 lines
1.7 KiB
PHP
<?php
|
|
|
|
final class PhabricatorApplicationDiviner extends PhabricatorApplication {
|
|
|
|
public function getBaseURI() {
|
|
return '/diviner/';
|
|
}
|
|
|
|
public function getIconName() {
|
|
return 'diviner';
|
|
}
|
|
|
|
public function getShortDescription() {
|
|
return pht('Documentation');
|
|
}
|
|
|
|
public function getTitleGlyph() {
|
|
return "\xE2\x97\x89";
|
|
}
|
|
|
|
public function getRoutes() {
|
|
return array(
|
|
'/diviner/' => array(
|
|
'' => 'DivinerLegacyController',
|
|
'query/((?<key>[^/]+)/)?' => 'DivinerAtomListController',
|
|
'find/' => 'DivinerFindController',
|
|
),
|
|
'/docs/(?P<keyword>[^/]+)/' => 'DivinerJumpController',
|
|
'/book/(?P<book>[^/]+)/' => 'DivinerBookController',
|
|
'/book/'.
|
|
'(?P<book>[^/]+)/'.
|
|
'(?P<type>[^/]+)/'.
|
|
'(?:(?P<context>[^/]+)/)?'.
|
|
'(?P<name>[^/]+)/'.
|
|
'(?:(?P<index>\d+)/)?' => 'DivinerAtomController',
|
|
);
|
|
}
|
|
|
|
public function getApplicationGroup() {
|
|
return self::GROUP_COMMUNICATION;
|
|
}
|
|
|
|
public function getRemarkupRules() {
|
|
return array(
|
|
new DivinerRemarkupRuleSymbol(),
|
|
);
|
|
}
|
|
|
|
public function buildMainMenuItems(
|
|
PhabricatorUser $user,
|
|
PhabricatorController $controller = null) {
|
|
|
|
$items = array();
|
|
|
|
$application = null;
|
|
if ($controller) {
|
|
$application = $controller->getCurrentApplication();
|
|
}
|
|
|
|
if ($application && $application->getHelpURI()) {
|
|
$item = id(new PHUIListItemView())
|
|
->setName(pht('%s Help', $application->getName()))
|
|
->addClass('core-menu-item')
|
|
->setIcon('info-sm')
|
|
->setOrder(200)
|
|
->setHref($application->getHelpURI());
|
|
$items[] = $item;
|
|
}
|
|
|
|
return $items;
|
|
}
|
|
|
|
|
|
}
|
|
|