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:
@@ -42,8 +42,8 @@ final class PhrictionDocumentController
|
||||
|
||||
$create_uri = '/phriction/edit/?slug='.$slug;
|
||||
|
||||
$notice = new AphrontErrorView();
|
||||
$notice->setSeverity(AphrontErrorView::SEVERITY_NODATA);
|
||||
$notice = new PHUIErrorView();
|
||||
$notice->setSeverity(PHUIErrorView::SEVERITY_NODATA);
|
||||
$notice->setTitle(pht('No content here!'));
|
||||
$notice->appendChild(
|
||||
pht(
|
||||
@@ -67,8 +67,8 @@ final class PhrictionDocumentController
|
||||
|
||||
if ($content->getID() != $document->getContentID()) {
|
||||
$vdate = phabricator_datetime($content->getDateCreated(), $user);
|
||||
$version_note = new AphrontErrorView();
|
||||
$version_note->setSeverity(AphrontErrorView::SEVERITY_NOTICE);
|
||||
$version_note = new PHUIErrorView();
|
||||
$version_note->setSeverity(PHUIErrorView::SEVERITY_NOTICE);
|
||||
$version_note->appendChild(
|
||||
pht('You are viewing an older version of this document, as it '.
|
||||
'appeared on %s.', $vdate));
|
||||
@@ -88,16 +88,16 @@ final class PhrictionDocumentController
|
||||
|
||||
$core_content = $content->renderContent($user);
|
||||
} else if ($current_status == PhrictionChangeType::CHANGE_DELETE) {
|
||||
$notice = new AphrontErrorView();
|
||||
$notice->setSeverity(AphrontErrorView::SEVERITY_NOTICE);
|
||||
$notice = new PHUIErrorView();
|
||||
$notice->setSeverity(PHUIErrorView::SEVERITY_NOTICE);
|
||||
$notice->setTitle(pht('Document Deleted'));
|
||||
$notice->appendChild(
|
||||
pht('This document has been deleted. You can edit it to put new '.
|
||||
'content here, or use history to revert to an earlier version.'));
|
||||
$core_content = $notice->render();
|
||||
} else if ($current_status == PhrictionChangeType::CHANGE_STUB) {
|
||||
$notice = new AphrontErrorView();
|
||||
$notice->setSeverity(AphrontErrorView::SEVERITY_NOTICE);
|
||||
$notice = new PHUIErrorView();
|
||||
$notice->setSeverity(PHUIErrorView::SEVERITY_NOTICE);
|
||||
$notice->setTitle(pht('Empty Document'));
|
||||
$notice->appendChild(
|
||||
pht('This document is empty. You can edit it to put some proper '.
|
||||
@@ -119,8 +119,8 @@ final class PhrictionDocumentController
|
||||
$slug_uri = PhrictionDocument::getSlugURI($new_doc->getSlug());
|
||||
}
|
||||
|
||||
$notice = id(new AphrontErrorView())
|
||||
->setSeverity(AphrontErrorView::SEVERITY_NOTICE);
|
||||
$notice = id(new PHUIErrorView())
|
||||
->setSeverity(PHUIErrorView::SEVERITY_NOTICE);
|
||||
|
||||
if ($slug_uri) {
|
||||
$notice->appendChild(
|
||||
@@ -164,8 +164,8 @@ final class PhrictionDocumentController
|
||||
$slug_uri = PhrictionDocument::getSlugURI($from_doc->getSlug());
|
||||
}
|
||||
|
||||
$move_notice = id(new AphrontErrorView())
|
||||
->setSeverity(AphrontErrorView::SEVERITY_NOTICE);
|
||||
$move_notice = id(new PHUIErrorView())
|
||||
->setSeverity(PHUIErrorView::SEVERITY_NOTICE);
|
||||
|
||||
if ($slug_uri) {
|
||||
$move_notice->appendChild(
|
||||
|
||||
Reference in New Issue
Block a user