Improve "Ignore" action for setup warnings
Summary:
- The dialog has no body text.
- It uses an "Ignore" link because it predates action items.
Test Plan:
{F49894}
{F49895}
{F49896}
Reviewers: chad, btrahan
Reviewed By: chad
CC: aran
Differential Revision: https://secure.phabricator.com/D6433
This commit is contained in:
@@ -20,19 +20,27 @@ final class PhabricatorConfigIgnoreController
|
||||
return id(new AphrontRedirectResponse())->setURI($issue_uri);
|
||||
}
|
||||
|
||||
// User just clicked the link, so show them the dialog.
|
||||
if ($this->verb == 'ignore') {
|
||||
$title = pht('Really ignore this setup issue?');
|
||||
$submit_title = pht('Ignore');
|
||||
$body = pht(
|
||||
"You can ignore an issue if you don't want to fix it, or plan to ".
|
||||
"fix it later. Ignored issues won't appear on every page but will ".
|
||||
"still be shown in the list of open issues.");
|
||||
} else if ($this->verb == 'unignore') {
|
||||
$title = pht('Really unignore this setup issue?');
|
||||
$title = pht('Unignore this setup issue?');
|
||||
$submit_title = pht('Unignore');
|
||||
$body = pht(
|
||||
"This issue will no longer be suppressed, and will return to its ".
|
||||
"rightful place as a global setup warning.");
|
||||
} else {
|
||||
throw new Exception('Unrecognized verb: ' . $this->verb);
|
||||
}
|
||||
$dialog = new AphrontDialogView();
|
||||
$dialog->setTitle($title)
|
||||
|
||||
$dialog = id(new AphrontDialogView())
|
||||
->setUser($request->getUser())
|
||||
->setTitle($title)
|
||||
->appendChild($body)
|
||||
->addSubmitButton($submit_title)
|
||||
->addCancelButton($issue_uri);
|
||||
|
||||
|
||||
@@ -58,23 +58,22 @@ final class PhabricatorConfigIssueListController
|
||||
->setHref($href)
|
||||
->addAttribute($issue->getSummary());
|
||||
if (!$issue->getIsIgnored()) {
|
||||
$item->addIcon('warning', pht('Setup Warning'));
|
||||
$link = javelin_tag(
|
||||
'a',
|
||||
array('href' => '/config/ignore/'.$issue->getIssueKey().'/',
|
||||
'sigil' => 'workflow'),
|
||||
pht('Ignore'));
|
||||
$item->setBarColor('yellow');
|
||||
$item->addAttribute($link);
|
||||
$item->addAction(
|
||||
id(new PHUIListItemView())
|
||||
->setIcon('unpublish')
|
||||
->setWorkflow(true)
|
||||
->setName(pht('Ignore'))
|
||||
->setHref('/config/ignore/'.$issue->getIssueKey().'/'));
|
||||
$list->addItem($item);
|
||||
} else {
|
||||
$item->addIcon('none', pht('Ignored'));
|
||||
$link = javelin_tag(
|
||||
'a',
|
||||
array('href' => '/config/unignore/'.$issue->getIssueKey().'/',
|
||||
'sigil' => 'workflow'),
|
||||
pht('Unignore'));
|
||||
$item->addAttribute($link);
|
||||
$item->addAction(
|
||||
id(new PHUIListItemView())
|
||||
->setIcon('preview')
|
||||
->setWorkflow(true)
|
||||
->setName(pht('Unignore'))
|
||||
->setHref('/config/unignore/'.$issue->getIssueKey().'/'));
|
||||
$item->setBarColor('none');
|
||||
$ignored_items[] = $item;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user