Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2892431
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Size
6 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/src/applications/config/controller/PhabricatorConfigIgnoreController.php b/src/applications/config/controller/PhabricatorConfigIgnoreController.php
index 4ab69f02a5..72fef3c366 100644
--- a/src/applications/config/controller/PhabricatorConfigIgnoreController.php
+++ b/src/applications/config/controller/PhabricatorConfigIgnoreController.php
@@ -1,57 +1,65 @@
<?php
final class PhabricatorConfigIgnoreController
extends PhabricatorApplicationsController {
private $verb;
private $issue;
public function willProcessRequest(array $data) {
$this->verb = $data['verb'];
$this->issue = $data['key'];
}
public function processRequest() {
$request = $this->getRequest();
$issue_uri = $this->getApplicationURI('issue');
if ($request->isDialogFormPost()) {
$this->manageApplication();
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)
- ->setUser($request->getUser())
- ->addSubmitButton($submit_title)
- ->addCancelButton($issue_uri);
+
+ $dialog = id(new AphrontDialogView())
+ ->setUser($request->getUser())
+ ->setTitle($title)
+ ->appendChild($body)
+ ->addSubmitButton($submit_title)
+ ->addCancelButton($issue_uri);
return id(new AphrontDialogResponse())->setDialog($dialog);
}
public function manageApplication() {
$key = 'config.ignore-issues';
$config_entry = PhabricatorConfigEntry::loadConfigEntry($key);
$list = $config_entry->getValue();
if (isset($list[$this->issue])) {
unset($list[$this->issue]);
} else {
$list[$this->issue] = true;
}
PhabricatorConfigEditor::storeNewValue(
$config_entry, $list, $this->getRequest());
}
}
diff --git a/src/applications/config/controller/PhabricatorConfigIssueListController.php b/src/applications/config/controller/PhabricatorConfigIssueListController.php
index ebc5f12905..307dad5f26 100644
--- a/src/applications/config/controller/PhabricatorConfigIssueListController.php
+++ b/src/applications/config/controller/PhabricatorConfigIssueListController.php
@@ -1,90 +1,89 @@
<?php
final class PhabricatorConfigIssueListController
extends PhabricatorConfigController {
public function processRequest() {
$request = $this->getRequest();
$user = $request->getUser();
$nav = $this->buildSideNavView();
$nav->selectFilter('issue/');
$issues = PhabricatorSetupCheck::runAllChecks();
PhabricatorSetupCheck::setOpenSetupIssueCount(
PhabricatorSetupCheck::countUnignoredIssues($issues));
$list = $this->buildIssueList($issues);
$list->setNoDataString(pht("There are no open setup issues."));
$header = id(new PhabricatorHeaderView())
->setHeader(pht('Open Phabricator Setup Issues'));
$nav->appendChild(
array(
$header,
$list,
));
$title = pht('Setup Issues');
$crumbs = $this
->buildApplicationCrumbs($nav)
->addCrumb(
id(new PhabricatorCrumbView())
->setName(pht('Setup'))
->setHref($this->getApplicationURI('issue/')));
$nav->setCrumbs($crumbs);
return $this->buildApplicationPage(
$nav,
array(
'title' => $title,
'device' => true,
));
}
private function buildIssueList(array $issues) {
assert_instances_of($issues, 'PhabricatorSetupIssue');
$list = new PhabricatorObjectItemListView();
$list->setCards(true);
$ignored_items = array();
foreach ($issues as $issue) {
$href = $this->getApplicationURI('/issue/'.$issue->getIssueKey().'/');
$item = id(new PhabricatorObjectItemView())
->setHeader($issue->getName())
->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;
}
}
foreach ($ignored_items as $item) {
$list->addItem($item);
}
return $list;
}
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Sun, Jan 19, 16:49 (2 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1126636
Default Alt Text
(6 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment