mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-15 03:12:41 +01:00
bfc5bb7c78
Summary: actions are still a bit messy - unsatisfactory icons (T2013 will help!) Test Plan: viewed diffs - they look good Reviewers: epriestley, vrana Reviewed By: epriestley CC: chad, aran, Korvin Maniphest Tasks: T2007 Differential Revision: https://secure.phabricator.com/D3904
28 lines
903 B
PHP
28 lines
903 B
PHP
<?php
|
|
|
|
/**
|
|
* NOTE: you probably want {@class:ArcanistDifferentialRevisionStatus}.
|
|
* This class just contains a mapping for color within the Differential
|
|
* application.
|
|
*/
|
|
|
|
final class DifferentialRevisionStatus {
|
|
|
|
public static function getRevisionStatusTagColor($status) {
|
|
$default = PhabricatorTagView::COLOR_GREY;
|
|
|
|
$map = array(
|
|
ArcanistDifferentialRevisionStatus::NEEDS_REVIEW =>
|
|
PhabricatorTagView::COLOR_ORANGE,
|
|
ArcanistDifferentialRevisionStatus::NEEDS_REVISION =>
|
|
PhabricatorTagView::COLOR_RED,
|
|
ArcanistDifferentialRevisionStatus::ACCEPTED =>
|
|
PhabricatorTagView::COLOR_GREEN,
|
|
ArcanistDifferentialRevisionStatus::CLOSED =>
|
|
PhabricatorTagView::COLOR_BLUE,
|
|
ArcanistDifferentialRevisionStatus::ABANDONED =>
|
|
PhabricatorTagView::COLOR_BLACK,
|
|
);
|
|
return idx($map, $status, $default);
|
|
}
|
|
}
|