mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-19 03:50:54 +01:00
Add Project to quick create menu
Summary: Helpful shortcut, I make quite a few at least Test Plan: Click on dropdown, then Project. Get to Project Create page Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Differential Revision: https://secure.phabricator.com/D10893
This commit is contained in:
parent
32b1ffdf89
commit
12f3f6d3a9
1 changed files with 18 additions and 0 deletions
|
@ -92,6 +92,24 @@ final class PhabricatorProjectApplication extends PhabricatorApplication {
|
|||
);
|
||||
}
|
||||
|
||||
public function getQuickCreateItems(PhabricatorUser $viewer) {
|
||||
$can_create = PhabricatorPolicyFilter::hasCapability(
|
||||
$viewer,
|
||||
$this,
|
||||
ProjectCreateProjectsCapability::CAPABILITY);
|
||||
|
||||
$items = array();
|
||||
if ($can_create) {
|
||||
$item = id(new PHUIListItemView())
|
||||
->setName(pht('Project'))
|
||||
->setIcon('fa-briefcase')
|
||||
->setHref($this->getBaseURI().'create/');
|
||||
$items[] = $item;
|
||||
}
|
||||
|
||||
return $items;
|
||||
}
|
||||
|
||||
protected function getCustomCapabilities() {
|
||||
return array(
|
||||
ProjectCreateProjectsCapability::CAPABILITY => array(),
|
||||
|
|
Loading…
Reference in a new issue