Differential D15889 Diff 38274 src/applications/diffusion/controller/DiffusionRepositoryManagePanelsController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/controller/DiffusionRepositoryManagePanelsController.php
Show First 20 Lines • Show All 56 Lines • ▼ Show 20 Lines | public function handleRequest(AphrontRequest $request) { | ||||
$title = array( | $title = array( | ||||
$panel->getManagementPanelLabel(), | $panel->getManagementPanelLabel(), | ||||
$repository->getDisplayName(), | $repository->getDisplayName(), | ||||
); | ); | ||||
$crumbs = $this->buildApplicationCrumbs(); | $crumbs = $this->buildApplicationCrumbs(); | ||||
$crumbs->addTextCrumb($panel->getManagementPanelLabel()); | $crumbs->addTextCrumb($panel->getManagementPanelLabel()); | ||||
$crumbs->setBorder(true); | |||||
$header_text = pht( | $header_text = pht( | ||||
'%s: %s', | '%s: %s', | ||||
$repository->getDisplayName(), | $repository->getDisplayName(), | ||||
$panel->getManagementPanelLabel()); | $panel->getManagementPanelLabel()); | ||||
$header = id(new PHUIHeaderView()) | $header = id(new PHUIHeaderView()) | ||||
->setHeader($header_text) | ->setHeader($header_text) | ||||
->setHeaderIcon('fa-pencil'); | ->setHeaderIcon('fa-pencil'); | ||||
if ($repository->isTracked()) { | if ($repository->isTracked()) { | ||||
$header->setStatus('fa-check', 'bluegrey', pht('Active')); | $header->setStatus('fa-check', 'bluegrey', pht('Active')); | ||||
} else { | } else { | ||||
$header->setStatus('fa-ban', 'dark', pht('Inactive')); | $header->setStatus('fa-ban', 'dark', pht('Inactive')); | ||||
} | } | ||||
$header->addActionLink( | |||||
id(new PHUIButtonView()) | |||||
->setTag('a') | |||||
->setText(pht('View Repository')) | |||||
->setHref($repository->getURI()) | |||||
->setIcon('fa-code')); | |||||
$view = id(new PHUITwoColumnView()) | $view = id(new PHUITwoColumnView()) | ||||
->setHeader($header) | ->setHeader($header) | ||||
->setNavigation($nav) | ->setNavigation($nav) | ||||
->setMainColumn($content); | ->setMainColumn($content); | ||||
$curtain = $panel->buildManagementPanelCurtain(); | $curtain = $panel->buildManagementPanelCurtain(); | ||||
if ($curtain) { | if ($curtain) { | ||||
$view->setCurtain($curtain); | $view->setCurtain($curtain); | ||||
▲ Show 20 Lines • Show All 51 Lines • Show Last 20 Lines |