1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-26 16:52:41 +01:00

Remove AphrontPanelView from Diffusion

Summary: Removes remaining AphrontPanelView calls in Diffusion for UI Consistency.

Test Plan: Tested each page except lint details, which I couldn't quite find a path to. Everything looks right.

Reviewers: epriestley, btrahan

Reviewed By: btrahan

Subscribers: Korvin, epriestley

Maniphest Tasks: T7427

Differential Revision: https://secure.phabricator.com/D12001
This commit is contained in:
Chad Little 2015-03-06 15:32:12 -08:00
parent 68fa70eacb
commit 6909e6206e
9 changed files with 40 additions and 37 deletions

View file

@ -45,10 +45,9 @@ final class DiffusionBranchTableController extends DiffusionController {
->setCommits($commits)
->setDiffusionRequest($drequest);
$panel = id(new AphrontPanelView())
->setNoBackground(true)
->appendChild($view)
->appendChild($pager);
$panel = id(new PHUIObjectBoxView())
->setHeaderText(pht('Branches'))
->appendChild($view);
$content = $panel;
}
@ -62,6 +61,7 @@ final class DiffusionBranchTableController extends DiffusionController {
array(
$crumbs,
$content,
$pager,
),
array(
'title' => array(

View file

@ -57,9 +57,9 @@ final class DiffusionBrowseDirectoryController
$browse_table->setPaths($results->getPaths());
$browse_table->setUser($request->getUser());
$browse_panel = new AphrontPanelView();
$browse_panel = new PHUIObjectBoxView();
$browse_panel->setHeaderText($drequest->getPath(), '/');
$browse_panel->appendChild($browse_table);
$browse_panel->setNoBackground();
$content[] = $browse_panel;
}

View file

@ -899,9 +899,11 @@ final class DiffusionCommitController extends DiffusionController {
$caption = null;
if (count($merges) > $limit) {
$merges = array_slice($merges, 0, $limit);
$caption =
"This commit merges more than {$limit} changes. Only the first ".
"{$limit} are shown.";
$caption = new PHUIInfoView();
$caption->setSeverity(PHUIInfoView::SEVERITY_NOTICE);
$caption->appendChild(
pht('This commit merges more than %d changes. Only the first '.
'%d are shown.', $limit));
}
$history_table = new DiffusionHistoryTableView();
@ -914,11 +916,12 @@ final class DiffusionCommitController extends DiffusionController {
$handles = $this->loadViewerHandles($phids);
$history_table->setHandles($handles);
$panel = new AphrontPanelView();
$panel->setHeader(pht('Merged Changes'));
$panel->setCaption($caption);
$panel = new PHUIObjectBoxView();
$panel->setHeaderText(pht('Merged Changes'));
$panel->appendChild($history_table);
$panel->setNoBackground();
if ($caption) {
$panel->setErrorView($caption);
}
return $panel;
}

View file

@ -124,10 +124,14 @@ final class DiffusionExternalController extends DiffusionController {
'wide',
));
$content = new AphrontPanelView();
$content->setHeader(pht('Multiple Matching Commits'));
$content->setCaption(
$caption = id(new PHUIInfoView())
->setSeverity(PHUIInfoView::SEVERITY_NOTICE)
->appendChild(
pht('This external reference matches multiple known commits.'));
$content = new PHUIObjectBoxView();
$content->setHeaderText(pht('Multiple Matching Commits'));
$content->setErrorView($caption);
$content->appendChild($table);
}

View file

@ -57,10 +57,9 @@ final class DiffusionHistoryController extends DiffusionController {
$history_table->setIsHead($offset == 0);
}
$history_panel = new AphrontPanelView();
$history_panel = new PHUIObjectBoxView();
$history_panel->setHeaderText(pht('History'));
$history_panel->appendChild($history_table);
$history_panel->appendChild($pager);
$history_panel->setNoBackground();
$content[] = $history_panel;
@ -88,6 +87,7 @@ final class DiffusionHistoryController extends DiffusionController {
$crumbs,
$object_box,
$content,
$pager,
),
array(
'title' => array(

View file

@ -104,7 +104,6 @@ final class DiffusionLintController extends DiffusionController {
$content = array();
$link = null;
if (!$this->diffusionRequest) {
$form = id(new AphrontFormView())
->setUser($user)
@ -122,9 +121,8 @@ final class DiffusionLintController extends DiffusionController {
$content[] = id(new AphrontListFilterView())->appendChild($form);
}
$content[] = id(new AphrontPanelView())
->setNoBackground(true)
->setCaption($link)
$content[] = id(new PHUIObjectBoxView())
->setHeaderText(pht('Lint'))
->appendChild($table);
$title = array('Lint');

View file

@ -72,10 +72,9 @@ final class DiffusionLintDetailsController extends DiffusionController {
->setHasMorePages(count($messages) >= $limit)
->setURI($request->getRequestURI(), 'offset');
$content[] = id(new AphrontPanelView())
->setNoBackground(true)
->appendChild($table)
->appendChild($pager);
$content[] = id(new PHUIObjectBoxView())
->setHeaderText(pht('Lint Details'))
->appendChild($table);
$crumbs = $this->buildCrumbs(
array(
@ -88,6 +87,7 @@ final class DiffusionLintDetailsController extends DiffusionController {
array(
$crumbs,
$content,
$pager,
),
array(
'title' =>

View file

@ -137,14 +137,12 @@ final class DiffusionSymbolController extends DiffusionController {
$table->setNoDataString(
pht('No matching symbol could be found in any indexed project.'));
$panel = new AphrontPanelView();
$panel->setHeader(pht('Similar Symbols'));
$panel = new PHUIObjectBoxView();
$panel->setHeaderText(pht('Similar Symbols'));
$panel->appendChild($table);
return $this->buildApplicationPage(
array(
$panel,
),
array(
'title' => pht('Find Symbol'),
));

View file

@ -66,10 +66,9 @@ final class DiffusionTagListController extends DiffusionController {
$handles = $this->loadViewerHandles($phids);
$view->setHandles($handles);
$panel = id(new AphrontPanelView())
->setNoBackground(true)
->appendChild($view)
->appendChild($pager);
$panel = id(new PHUIObjectBoxView())
->setHeaderText(pht('Tags'))
->appendChild($view);
$content = $panel;
}
@ -84,6 +83,7 @@ final class DiffusionTagListController extends DiffusionController {
array(
$crumbs,
$content,
$pager,
),
array(
'title' => array(