mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 14:52:41 +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,
|
||||
$browse_pager);
|
||||
|
||||
$content[] = $this->buildHistoryTable(
|
||||
$history_results,
|
||||
$history,
|
||||
$history_exception);
|
||||
|
||||
if ($readme) {
|
||||
$content[] = $readme;
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
$branch_button = $this->buildBranchList($drequest);
|
||||
$this->branchButton = $branch_button;
|
||||
|
@ -428,51 +422,6 @@ final class DiffusionRepositoryController extends DiffusionController {
|
|||
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) {
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
|
|
Loading…
Reference in a new issue