From b8b701faf734cd00a3ddae43d884d9d5248feb9f Mon Sep 17 00:00:00 2001 From: Chad Little Date: Mon, 28 Aug 2017 11:41:48 -0700 Subject: [PATCH] Clarify language when Autoclose is disabled for a repository Summary: Fixes T12051, adds additional language. Test Plan: Disable Autoclose in Actions, see updated language under Branches. {F5147291} Reviewers: epriestley Reviewed By: epriestley Spies: Korvin Maniphest Tasks: T12051 Differential Revision: https://secure.phabricator.com/D18482 --- .../DiffusionRepositoryBranchesManagementPanel.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/applications/diffusion/management/DiffusionRepositoryBranchesManagementPanel.php b/src/applications/diffusion/management/DiffusionRepositoryBranchesManagementPanel.php index 17ee506b16..90b646c3f9 100644 --- a/src/applications/diffusion/management/DiffusionRepositoryBranchesManagementPanel.php +++ b/src/applications/diffusion/management/DiffusionRepositoryBranchesManagementPanel.php @@ -86,8 +86,11 @@ final class DiffusionRepositoryBranchesManagementPanel $repository->getHumanReadableDetail('close-commits-filter', array()), phutil_tag('em', array(), pht('Autoclose On All Branches'))); + $autoclose_disabled = false; if ($repository->getDetail('disable-autoclose')) { - $autoclose_only = phutil_tag('em', array(), pht('Disabled')); + $autoclose_disabled = true; + $autoclose_only = + phutil_tag('em', array(), pht('Autoclose has been disabled')); } $view->addProperty(pht('Autoclose Only'), $autoclose_only); @@ -133,12 +136,18 @@ final class DiffusionRepositoryBranchesManagementPanel $status = pht('Open'); } + if ($autoclose_disabled) { + $autoclose_status = pht('Disabled (Repository)'); + } else { + $autoclose_status = pht('Off'); + } + $rows[] = array( $icon, $branch_name, $status, $tracking ? pht('Tracking') : pht('Off'), - $autoclosing ? pht('Autoclose On') : pht('Off'), + $autoclosing ? pht('Autoclose On') : $autoclose_status, ); } $branch_table = new AphrontTableView($rows);