PHUIErrorView
Summary: Clean up the error view styling.
Test Plan:
Tested as many as I could find, built additional tests in UIExamples
{F280452}
{F280453}
Reviewers: btrahan, epriestley
Reviewed By: epriestley
Subscribers: hach-que, Korvin, epriestley
Differential Revision: https://secure.phabricator.com/D11605
This commit is contained in:
@@ -118,8 +118,8 @@ final class DiffusionBrowseFileController extends DiffusionBrowseController {
|
||||
|
||||
$follow = $request->getStr('follow');
|
||||
if ($follow) {
|
||||
$notice = new AphrontErrorView();
|
||||
$notice->setSeverity(AphrontErrorView::SEVERITY_WARNING);
|
||||
$notice = new PHUIErrorView();
|
||||
$notice->setSeverity(PHUIErrorView::SEVERITY_WARNING);
|
||||
$notice->setTitle(pht('Unable to Continue'));
|
||||
switch ($follow) {
|
||||
case 'first':
|
||||
@@ -138,8 +138,8 @@ final class DiffusionBrowseFileController extends DiffusionBrowseController {
|
||||
|
||||
$renamed = $request->getStr('renamed');
|
||||
if ($renamed) {
|
||||
$notice = new AphrontErrorView();
|
||||
$notice->setSeverity(AphrontErrorView::SEVERITY_NOTICE);
|
||||
$notice = new PHUIErrorView();
|
||||
$notice->setSeverity(PHUIErrorView::SEVERITY_NOTICE);
|
||||
$notice->setTitle(pht('File Renamed'));
|
||||
$notice->appendChild(
|
||||
pht("File history passes through a rename from '%s' to '%s'.",
|
||||
|
||||
@@ -81,7 +81,7 @@ final class DiffusionBrowseSearchController extends DiffusionBrowseController {
|
||||
} catch (ConduitException $ex) {
|
||||
$err = $ex->getErrorDescription();
|
||||
if ($err != '') {
|
||||
return id(new AphrontErrorView())
|
||||
return id(new PHUIErrorView())
|
||||
->setTitle(pht('Search Error'))
|
||||
->appendChild($err);
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ final class DiffusionCommitController extends DiffusionController {
|
||||
return new Aphront404Response();
|
||||
}
|
||||
|
||||
$error = id(new AphrontErrorView())
|
||||
$error = id(new PHUIErrorView())
|
||||
->setTitle(pht('Commit Still Parsing'))
|
||||
->appendChild(
|
||||
pht(
|
||||
@@ -79,9 +79,9 @@ final class DiffusionCommitController extends DiffusionController {
|
||||
if ($is_foreign) {
|
||||
$subpath = $commit_data->getCommitDetail('svn-subpath');
|
||||
|
||||
$error_panel = new AphrontErrorView();
|
||||
$error_panel = new PHUIErrorView();
|
||||
$error_panel->setTitle(pht('Commit Not Tracked'));
|
||||
$error_panel->setSeverity(AphrontErrorView::SEVERITY_WARNING);
|
||||
$error_panel->setSeverity(PHUIErrorView::SEVERITY_WARNING);
|
||||
$error_panel->appendChild(
|
||||
pht("This Diffusion repository is configured to track only one ".
|
||||
"subdirectory of the entire Subversion repository, and this commit ".
|
||||
@@ -251,8 +251,8 @@ final class DiffusionCommitController extends DiffusionController {
|
||||
->setTag('a')
|
||||
->setIcon($icon);
|
||||
|
||||
$warning_view = id(new AphrontErrorView())
|
||||
->setSeverity(AphrontErrorView::SEVERITY_WARNING)
|
||||
$warning_view = id(new PHUIErrorView())
|
||||
->setSeverity(PHUIErrorView::SEVERITY_WARNING)
|
||||
->setTitle('Very Large Commit')
|
||||
->appendChild(
|
||||
pht('This commit is very large. Load each file individually.'));
|
||||
|
||||
@@ -243,8 +243,8 @@ abstract class DiffusionController extends PhabricatorController {
|
||||
}
|
||||
|
||||
protected function renderStatusMessage($title, $body) {
|
||||
return id(new AphrontErrorView())
|
||||
->setSeverity(AphrontErrorView::SEVERITY_WARNING)
|
||||
return id(new PHUIErrorView())
|
||||
->setSeverity(PHUIErrorView::SEVERITY_WARNING)
|
||||
->setTitle($title)
|
||||
->appendChild($body);
|
||||
}
|
||||
|
||||
@@ -69,9 +69,9 @@ final class DiffusionExternalController extends DiffusionController {
|
||||
}
|
||||
$desc .= $id;
|
||||
|
||||
$content = id(new AphrontErrorView())
|
||||
$content = id(new PHUIErrorView())
|
||||
->setTitle(pht('Unknown External'))
|
||||
->setSeverity(AphrontErrorView::SEVERITY_WARNING)
|
||||
->setSeverity(PHUIErrorView::SEVERITY_WARNING)
|
||||
->appendChild(phutil_tag(
|
||||
'p',
|
||||
array(),
|
||||
|
||||
@@ -84,7 +84,7 @@ final class DiffusionMirrorEditController
|
||||
|
||||
$form_errors = null;
|
||||
if ($errors) {
|
||||
$form_errors = id(new AphrontErrorView())
|
||||
$form_errors = id(new PHUIErrorView())
|
||||
->setErrors($errors);
|
||||
}
|
||||
|
||||
|
||||
@@ -68,9 +68,9 @@ final class DiffusionRepositoryController extends DiffusionController {
|
||||
if ($page_has_content) {
|
||||
$content[] = $this->buildNormalContent($drequest);
|
||||
} else {
|
||||
$content[] = id(new AphrontErrorView())
|
||||
$content[] = id(new PHUIErrorView())
|
||||
->setTitle($empty_title)
|
||||
->setSeverity(AphrontErrorView::SEVERITY_WARNING)
|
||||
->setSeverity(PHUIErrorView::SEVERITY_WARNING)
|
||||
->setErrors(array($empty_message));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user