From 76bfd91fd071a002b9a3cf532e0a3b08246df92a Mon Sep 17 00:00:00 2001 From: Chad Little Date: Thu, 17 Mar 2016 13:32:22 -0700 Subject: [PATCH] Add icons/colors to Audit transactions Summary: Fixes T10616. Adds additional colors, icons, to Audit transactions Test Plan: Mess with various Audit states. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Maniphest Tasks: T10616 Differential Revision: https://secure.phabricator.com/D15490 --- .../storage/PhabricatorAuditTransaction.php | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/applications/audit/storage/PhabricatorAuditTransaction.php b/src/applications/audit/storage/PhabricatorAuditTransaction.php index 20203a6f68..e1f7a9d08a 100644 --- a/src/applications/audit/storage/PhabricatorAuditTransaction.php +++ b/src/applications/audit/storage/PhabricatorAuditTransaction.php @@ -117,12 +117,37 @@ final class PhabricatorAuditTransaction return 'red'; case PhabricatorAuditActionConstants::ACCEPT: return 'green'; + case PhabricatorAuditActionConstants::RESIGN: + return 'black'; + case PhabricatorAuditActionConstants::CLOSE: + return 'indigo'; } } return parent::getColor(); } + public function getIcon() { + + $type = $this->getTransactionType(); + + switch ($type) { + case PhabricatorAuditActionConstants::ACTION: + switch ($this->getNewValue()) { + case PhabricatorAuditActionConstants::CONCERN: + return 'fa-exclamation-circle'; + case PhabricatorAuditActionConstants::ACCEPT: + return 'fa-check'; + case PhabricatorAuditActionConstants::RESIGN: + return 'fa-plane'; + case PhabricatorAuditActionConstants::CLOSE: + return 'fa-check'; + } + } + + return parent::getIcon(); + } + public function getTitle() { $old = $this->getOldValue(); $new = $this->getNewValue();