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,21 +20,29 @@ final class PhabricatorConfigIgnoreController
|
|||||||
return id(new AphrontRedirectResponse())->setURI($issue_uri);
|
return id(new AphrontRedirectResponse())->setURI($issue_uri);
|
||||||
}
|
}
|
||||||
|
|
||||||
// User just clicked the link, so show them the dialog.
|
|
||||||
if ($this->verb == 'ignore') {
|
if ($this->verb == 'ignore') {
|
||||||
$title = pht('Really ignore this setup issue?');
|
$title = pht('Really ignore this setup issue?');
|
||||||
$submit_title = pht('Ignore');
|
$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') {
|
} else if ($this->verb == 'unignore') {
|
||||||
$title = pht('Really unignore this setup issue?');
|
$title = pht('Unignore this setup issue?');
|
||||||
$submit_title = pht('Unignore');
|
$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 {
|
} else {
|
||||||
throw new Exception('Unrecognized verb: ' . $this->verb);
|
throw new Exception('Unrecognized verb: ' . $this->verb);
|
||||||
}
|
}
|
||||||
$dialog = new AphrontDialogView();
|
|
||||||
$dialog->setTitle($title)
|
$dialog = id(new AphrontDialogView())
|
||||||
->setUser($request->getUser())
|
->setUser($request->getUser())
|
||||||
->addSubmitButton($submit_title)
|
->setTitle($title)
|
||||||
->addCancelButton($issue_uri);
|
->appendChild($body)
|
||||||
|
->addSubmitButton($submit_title)
|
||||||
|
->addCancelButton($issue_uri);
|
||||||
|
|
||||||
return id(new AphrontDialogResponse())->setDialog($dialog);
|
return id(new AphrontDialogResponse())->setDialog($dialog);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,23 +58,22 @@ final class PhabricatorConfigIssueListController
|
|||||||
->setHref($href)
|
->setHref($href)
|
||||||
->addAttribute($issue->getSummary());
|
->addAttribute($issue->getSummary());
|
||||||
if (!$issue->getIsIgnored()) {
|
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->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);
|
$list->addItem($item);
|
||||||
} else {
|
} else {
|
||||||
$item->addIcon('none', pht('Ignored'));
|
$item->addIcon('none', pht('Ignored'));
|
||||||
$link = javelin_tag(
|
$item->addAction(
|
||||||
'a',
|
id(new PHUIListItemView())
|
||||||
array('href' => '/config/unignore/'.$issue->getIssueKey().'/',
|
->setIcon('preview')
|
||||||
'sigil' => 'workflow'),
|
->setWorkflow(true)
|
||||||
pht('Unignore'));
|
->setName(pht('Unignore'))
|
||||||
$item->addAttribute($link);
|
->setHref('/config/unignore/'.$issue->getIssueKey().'/'));
|
||||||
$item->setBarColor('none');
|
$item->setBarColor('none');
|
||||||
$ignored_items[] = $item;
|
$ignored_items[] = $item;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user