Differential D19935 Diff 47692 src/applications/auth/controller/config/PhabricatorAuthListController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/controller/config/PhabricatorAuthListController.php
Show First 20 Lines • Show All 85 Lines • ▼ Show 20 Lines | $list->setNoDataString( | ||||
phutil_tag( | phutil_tag( | ||||
'a', | 'a', | ||||
array( | array( | ||||
'href' => $this->getApplicationURI('config/new/'), | 'href' => $this->getApplicationURI('config/new/'), | ||||
), | ), | ||||
pht('Add Authentication Provider')))); | pht('Add Authentication Provider')))); | ||||
$crumbs = $this->buildApplicationCrumbs(); | $crumbs = $this->buildApplicationCrumbs(); | ||||
$crumbs->addTextCrumb(pht('Auth Providers')); | $crumbs->addTextCrumb(pht('Login and Registration')); | ||||
$crumbs->setBorder(true); | $crumbs->setBorder(true); | ||||
$guidance_context = new PhabricatorAuthProvidersGuidanceContext(); | $guidance_context = new PhabricatorAuthProvidersGuidanceContext(); | ||||
$guidance = id(new PhabricatorGuidanceEngine()) | $guidance = id(new PhabricatorGuidanceEngine()) | ||||
->setViewer($viewer) | ->setViewer($viewer) | ||||
->setGuidanceContext($guidance_context) | ->setGuidanceContext($guidance_context) | ||||
->newInfoView(); | ->newInfoView(); | ||||
$button = id(new PHUIButtonView()) | $button = id(new PHUIButtonView()) | ||||
->setTag('a') | ->setTag('a') | ||||
->setButtonType(PHUIButtonView::BUTTONTYPE_SIMPLE) | ->setButtonType(PHUIButtonView::BUTTONTYPE_SIMPLE) | ||||
->setHref($this->getApplicationURI('config/new/')) | ->setHref($this->getApplicationURI('config/new/')) | ||||
->setIcon('fa-plus') | ->setIcon('fa-plus') | ||||
->setDisabled(!$can_manage) | ->setDisabled(!$can_manage) | ||||
->setText(pht('Add Provider')); | ->setText(pht('Add Provider')); | ||||
$list->setFlush(true); | $list->setFlush(true); | ||||
$list = id(new PHUIObjectBoxView()) | $list = id(new PHUIObjectBoxView()) | ||||
->setHeaderText(pht('Providers')) | ->setHeaderText(pht('Providers')) | ||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) | ->setBackground(PHUIObjectBoxView::BLUE_PROPERTY) | ||||
->appendChild($list); | ->appendChild($list); | ||||
$title = pht('Auth Providers'); | $title = pht('Login and Registration Providers'); | ||||
$header = id(new PHUIHeaderView()) | $header = id(new PHUIHeaderView()) | ||||
->setHeader($title) | ->setHeader($title) | ||||
->setHeaderIcon('fa-key') | ->setHeaderIcon('fa-key') | ||||
->addActionLink($button); | ->addActionLink($button); | ||||
$view = id(new PHUITwoColumnView()) | $view = id(new PHUITwoColumnView()) | ||||
->setHeader($header) | ->setHeader($header) | ||||
->setFooter(array( | ->setFooter(array( | ||||
$guidance, | $guidance, | ||||
$list, | $list, | ||||
)); | )); | ||||
return $this->newPage() | $nav = $this->newNavigation() | ||||
->setTitle($title) | |||||
->setCrumbs($crumbs) | ->setCrumbs($crumbs) | ||||
->appendChild($view); | ->appendChild($view); | ||||
$nav->selectFilter('login'); | |||||
return $this->newPage() | |||||
->setTitle($title) | |||||
->appendChild($nav); | |||||
} | } | ||||
} | } |