mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-25 00:02:41 +01:00
6b1f15ac54
Summary: Ref T1536. Make this UI a bit more human-friendly. Test Plan: {F46873} Reviewers: chad Reviewed By: chad CC: aran Maniphest Tasks: T1536 Differential Revision: https://secure.phabricator.com/D6237
39 lines
975 B
PHP
39 lines
975 B
PHP
<?php
|
|
|
|
abstract class PhabricatorAuthProviderConfigController
|
|
extends PhabricatorAuthController {
|
|
|
|
public function shouldRequireAdmin() {
|
|
return true;
|
|
}
|
|
|
|
protected function buildSideNavView($for_app = false) {
|
|
$nav = new AphrontSideNavFilterView();
|
|
$nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
|
|
|
|
if ($for_app) {
|
|
$nav->addLabel(pht('Create'));
|
|
$nav->addFilter('',
|
|
pht('Add Authentication Provider'),
|
|
$this->getApplicationURI('/config/new/'));
|
|
}
|
|
return $nav;
|
|
}
|
|
|
|
public function buildApplicationMenu() {
|
|
return $this->buildSideNavView($for_app = true)->getMenu();
|
|
}
|
|
|
|
protected function buildApplicationCrumbs() {
|
|
$crumbs = parent::buildApplicationCrumbs();
|
|
|
|
$crumbs->addAction(
|
|
id(new PHUIListItemView())
|
|
->setName(pht('Add Authentication Provider'))
|
|
->setHref($this->getApplicationURI('/config/new/'))
|
|
->setIcon('create'));
|
|
|
|
return $crumbs;
|
|
}
|
|
|
|
}
|