Rough in basics + policies + history repository management panels
Summary: Ref T10748. This is roughly where I'm headed, if it makes some kind of sense? The "Edit" links in sub-sections don't work yet since I haven't built the thing. Probably depends on D15736. Test Plan: Manually navigated to `/manage/`, clicked around. Reviewers: chad Reviewed By: chad Maniphest Tasks: T10748 Differential Revision: https://secure.phabricator.com/D15737
This commit is contained in:
@@ -30,7 +30,8 @@ final class DiffusionRepositoryManageController
|
||||
foreach ($panels as $panel) {
|
||||
$panel
|
||||
->setViewer($viewer)
|
||||
->setRepository($repository);
|
||||
->setRepository($repository)
|
||||
->setController($this);
|
||||
}
|
||||
|
||||
$selected = $request->getURIData('panel');
|
||||
@@ -63,10 +64,30 @@ final class DiffusionRepositoryManageController
|
||||
$repository->getPathURI('manage/'));
|
||||
$crumbs->addTextCrumb($panel->getManagementPanelLabel());
|
||||
|
||||
$header_text = pht(
|
||||
'%s: %s',
|
||||
$repository->getDisplayName(),
|
||||
$panel->getManagementPanelLabel());
|
||||
|
||||
$header = id(new PHUIHeaderView())
|
||||
->setHeader($header_text)
|
||||
->setHeaderIcon('fa-pencil');
|
||||
if ($repository->isTracked()) {
|
||||
$header->setStatus('fa-check', 'bluegrey', pht('Active'));
|
||||
} else {
|
||||
$header->setStatus('fa-ban', 'dark', pht('Inactive'));
|
||||
}
|
||||
|
||||
$view = id(new PHUITwoColumnView())
|
||||
->setHeader($header)
|
||||
->setNavigation($nav)
|
||||
->setMainColumn($content);
|
||||
|
||||
$curtain = $panel->buildManagementPanelCurtain();
|
||||
if ($curtain) {
|
||||
$view->setCurtain($curtain);
|
||||
}
|
||||
|
||||
return $this->newPage()
|
||||
->setTitle($title)
|
||||
->setCrumbs($crumbs)
|
||||
@@ -95,5 +116,14 @@ final class DiffusionRepositoryManageController
|
||||
return $nav;
|
||||
}
|
||||
|
||||
public function newTimeline(PhabricatorRepository $repository) {
|
||||
$timeline = $this->buildTransactionTimeline(
|
||||
$repository,
|
||||
new PhabricatorRepositoryTransactionQuery());
|
||||
$timeline->setShouldTerminate(true);
|
||||
|
||||
return $timeline;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user