Move PHUIErrorView to PHUIInfoView

Summary: Since this element isn't strictly about errors, re-label as info view instead.

Test Plan: Grepped for all callsites, tested UIExamples and a few other random pages.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: hach-que, Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D11867
This commit is contained in:
Chad Little
2015-03-01 14:45:56 -08:00
parent 5b104e291a
commit c038c643f4
82 changed files with 263 additions and 257 deletions

View File

@@ -42,8 +42,8 @@ final class PhrictionDocumentController
$create_uri = '/phriction/edit/?slug='.$slug;
$notice = new PHUIErrorView();
$notice->setSeverity(PHUIErrorView::SEVERITY_NODATA);
$notice = new PHUIInfoView();
$notice->setSeverity(PHUIInfoView::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 PHUIErrorView();
$version_note->setSeverity(PHUIErrorView::SEVERITY_NOTICE);
$version_note = new PHUIInfoView();
$version_note->setSeverity(PHUIInfoView::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 PHUIErrorView();
$notice->setSeverity(PHUIErrorView::SEVERITY_NOTICE);
$notice = new PHUIInfoView();
$notice->setSeverity(PHUIInfoView::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 PHUIErrorView();
$notice->setSeverity(PHUIErrorView::SEVERITY_NOTICE);
$notice = new PHUIInfoView();
$notice->setSeverity(PHUIInfoView::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 PHUIErrorView())
->setSeverity(PHUIErrorView::SEVERITY_NOTICE);
$notice = id(new PHUIInfoView())
->setSeverity(PHUIInfoView::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 PHUIErrorView())
->setSeverity(PHUIErrorView::SEVERITY_NOTICE);
$move_notice = id(new PHUIInfoView())
->setSeverity(PHUIInfoView::SEVERITY_NOTICE);
if ($slug_uri) {
$move_notice->appendChild(

View File

@@ -94,8 +94,8 @@ final class PhrictionEditController
),
pht('discard this draft'));
$draft_note = new PHUIErrorView();
$draft_note->setSeverity(PHUIErrorView::SEVERITY_NOTICE);
$draft_note = new PHUIInfoView();
$draft_note->setSeverity(PHUIInfoView::SEVERITY_NOTICE);
$draft_note->setTitle('Recovered Draft');
$draft_note->appendChild(hsprintf(
'<p>Showing a saved draft of your edits, you can %s.</p>',