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

View file

@ -57,9 +57,9 @@ final class DiffusionBrowseDirectoryController
$browse_table->setPaths($results->getPaths()); $browse_table->setPaths($results->getPaths());
$browse_table->setUser($request->getUser()); $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->appendChild($browse_table);
$browse_panel->setNoBackground();
$content[] = $browse_panel; $content[] = $browse_panel;
} }

View file

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

View file

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

View file

@ -57,10 +57,9 @@ final class DiffusionHistoryController extends DiffusionController {
$history_table->setIsHead($offset == 0); $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($history_table);
$history_panel->appendChild($pager);
$history_panel->setNoBackground();
$content[] = $history_panel; $content[] = $history_panel;
@ -88,6 +87,7 @@ final class DiffusionHistoryController extends DiffusionController {
$crumbs, $crumbs,
$object_box, $object_box,
$content, $content,
$pager,
), ),
array( array(
'title' => array( 'title' => array(

View file

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

View file

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

View file

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

View file

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