Changeset View
Changeset View
Standalone View
Standalone View
src/applications/base/PhabricatorApplication.php
| Show First 20 Lines • Show All 166 Lines • ▼ Show 20 Lines | public function getTitleGlyph() { | ||||
| return null; | return null; | ||||
| } | } | ||||
| final public function getHelpMenuItems(PhabricatorUser $viewer) { | final public function getHelpMenuItems(PhabricatorUser $viewer) { | ||||
| $items = array(); | $items = array(); | ||||
| $articles = $this->getHelpDocumentationArticles($viewer); | $articles = $this->getHelpDocumentationArticles($viewer); | ||||
| if ($articles) { | if ($articles) { | ||||
| $items[] = id(new PHUIListItemView()) | |||||
| ->setType(PHUIListItemView::TYPE_LABEL) | |||||
| ->setName(pht('%s Documentation', $this->getName())); | |||||
| foreach ($articles as $article) { | foreach ($articles as $article) { | ||||
| $item = id(new PHUIListItemView()) | $item = id(new PhabricatorActionView()) | ||||
| ->setName($article['name']) | ->setName($article['name']) | ||||
| ->setIcon('fa-book') | ->setHref($article['href']); | ||||
| ->setHref($article['href']) | |||||
| ->setOpenInNewWindow(true); | |||||
| $items[] = $item; | $items[] = $item; | ||||
| } | } | ||||
| } | } | ||||
| $command_specs = $this->getMailCommandObjects(); | $command_specs = $this->getMailCommandObjects(); | ||||
| if ($command_specs) { | if ($command_specs) { | ||||
| $items[] = id(new PHUIListItemView()) | |||||
| ->setType(PHUIListItemView::TYPE_LABEL) | |||||
| ->setName(pht('Email Help')); | |||||
| foreach ($command_specs as $key => $spec) { | foreach ($command_specs as $key => $spec) { | ||||
| $object = $spec['object']; | $object = $spec['object']; | ||||
| $class = get_class($this); | $class = get_class($this); | ||||
| $href = '/applications/mailcommands/'.$class.'/'.$key.'/'; | $href = '/applications/mailcommands/'.$class.'/'.$key.'/'; | ||||
| $item = id(new PhabricatorActionView()) | |||||
| $item = id(new PHUIListItemView()) | |||||
| ->setName($spec['name']) | ->setName($spec['name']) | ||||
| ->setIcon('fa-envelope-o') | ->setHref($href); | ||||
| ->setHref($href) | |||||
| ->setOpenInNewWindow(true); | |||||
| $items[] = $item; | $items[] = $item; | ||||
| } | } | ||||
| } | } | ||||
| return $items; | return $items; | ||||
| } | } | ||||
| public function getHelpDocumentationArticles(PhabricatorUser $viewer) { | public function getHelpDocumentationArticles(PhabricatorUser $viewer) { | ||||
| ▲ Show 20 Lines • Show All 434 Lines • Show Last 20 Lines | |||||