mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-03 12:12:43 +01:00
Differential - special-case "no reviewers" warning to show only for revions that need review
Summary: 'cuz who cares unless you need review? Test Plan: noted the UI showed up appropriately to my new business logix Reviewers: epriestley, chad Reviewed By: chad CC: aran, Korvin Maniphest Tasks: T2010 Differential Revision: https://secure.phabricator.com/D3958
This commit is contained in:
parent
3c11bf320f
commit
f8737d15ca
1 changed files with 29 additions and 17 deletions
|
@ -137,10 +137,13 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
||||||
}
|
}
|
||||||
|
|
||||||
$reviewer_warning = null;
|
$reviewer_warning = null;
|
||||||
|
if ($revision->getStatus() ==
|
||||||
|
ArcanistDifferentialRevisionStatus::NEEDS_REVIEW) {
|
||||||
$has_live_reviewer = false;
|
$has_live_reviewer = false;
|
||||||
foreach ($revision->getReviewers() as $reviewer) {
|
foreach ($revision->getReviewers() as $reviewer) {
|
||||||
if (!$handles[$reviewer]->isDisabled()) {
|
if (!$handles[$reviewer]->isDisabled()) {
|
||||||
$has_live_reviewer = true;
|
$has_live_reviewer = true;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!$has_live_reviewer) {
|
if (!$has_live_reviewer) {
|
||||||
|
@ -149,12 +152,21 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
||||||
$reviewer_warning->setTitle('No Active Reviewers');
|
$reviewer_warning->setTitle('No Active Reviewers');
|
||||||
if ($revision->getReviewers()) {
|
if ($revision->getReviewers()) {
|
||||||
$reviewer_warning->appendChild(
|
$reviewer_warning->appendChild(
|
||||||
'<p>All specified reviewers are disabled. You may want to add '.
|
phutil_render_tag(
|
||||||
'some new reviewers.</p>');
|
'p',
|
||||||
|
array(),
|
||||||
|
pht('All specified reviewers are disabled and this revision '.
|
||||||
|
'needs review. You may want to add some new reviewers.')
|
||||||
|
));
|
||||||
} else {
|
} else {
|
||||||
$reviewer_warning->appendChild(
|
$reviewer_warning->appendChild(
|
||||||
'<p>This revision has no specified reviewers. You may want to '.
|
phutil_render_tag(
|
||||||
'add some.</p>');
|
'p',
|
||||||
|
array(),
|
||||||
|
pht('This revision has no specified reviewers and needs review.'.
|
||||||
|
' You may want to add some reviewers.')
|
||||||
|
));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue