mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 00:32:42 +01:00
Remove "Recent Commits" from repository landing page
Summary: Ref T13552. Currently, the repository landing page has a panel with recent commits. This is accessible by clicking "History" and usually below the fold, so it's not clearly useful. Since I'm consolidating this code anyway to fix an issue with the import pipeline, just get rid of this history view. Test Plan: Viewed a repository landing page, no longer saw a history panel. Maniphest Tasks: T13552 Differential Revision: https://secure.phabricator.com/D21408
This commit is contained in:
parent
c8a279957d
commit
9afc5c6287
1 changed files with 0 additions and 51 deletions
|
@ -299,16 +299,10 @@ final class DiffusionRepositoryController extends DiffusionController {
|
||||||
$handles,
|
$handles,
|
||||||
$browse_pager);
|
$browse_pager);
|
||||||
|
|
||||||
$content[] = $this->buildHistoryTable(
|
|
||||||
$history_results,
|
|
||||||
$history,
|
|
||||||
$history_exception);
|
|
||||||
|
|
||||||
if ($readme) {
|
if ($readme) {
|
||||||
$content[] = $readme;
|
$content[] = $readme;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$branch_button = $this->buildBranchList($drequest);
|
$branch_button = $this->buildBranchList($drequest);
|
||||||
$this->branchButton = $branch_button;
|
$this->branchButton = $branch_button;
|
||||||
|
@ -428,51 +422,6 @@ final class DiffusionRepositoryController extends DiffusionController {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function buildHistoryTable(
|
|
||||||
$history_results,
|
|
||||||
$history,
|
|
||||||
$history_exception) {
|
|
||||||
|
|
||||||
$request = $this->getRequest();
|
|
||||||
$viewer = $request->getUser();
|
|
||||||
$drequest = $this->getDiffusionRequest();
|
|
||||||
$repository = $drequest->getRepository();
|
|
||||||
|
|
||||||
if ($history_exception) {
|
|
||||||
if ($repository->isImporting()) {
|
|
||||||
return $this->renderStatusMessage(
|
|
||||||
pht('Still Importing...'),
|
|
||||||
pht(
|
|
||||||
'This repository is still importing. History is not yet '.
|
|
||||||
'available.'));
|
|
||||||
} else {
|
|
||||||
return $this->renderStatusMessage(
|
|
||||||
pht('Unable to Retrieve History'),
|
|
||||||
$history_exception->getMessage());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$history_table = id(new DiffusionHistoryTableView())
|
|
||||||
->setUser($viewer)
|
|
||||||
->setDiffusionRequest($drequest)
|
|
||||||
->setHistory($history)
|
|
||||||
->setIsHead(true);
|
|
||||||
|
|
||||||
if ($history_results) {
|
|
||||||
$history_table->setParents($history_results['parents']);
|
|
||||||
}
|
|
||||||
|
|
||||||
$panel = id(new PHUIObjectBoxView())
|
|
||||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
|
||||||
->addClass('diffusion-mobile-view');
|
|
||||||
$header = id(new PHUIHeaderView())
|
|
||||||
->setHeader(pht('Recent Commits'));
|
|
||||||
$panel->setHeader($header);
|
|
||||||
$panel->setTable($history_table);
|
|
||||||
|
|
||||||
return $panel;
|
|
||||||
}
|
|
||||||
|
|
||||||
private function buildBranchList(DiffusionRequest $drequest) {
|
private function buildBranchList(DiffusionRequest $drequest) {
|
||||||
$viewer = $this->getViewer();
|
$viewer = $this->getViewer();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue