1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-13 10:22:42 +01:00
phorge-phorge/src/applications/differential/constants/DifferentialRevisionStatus.php
Bob Trahan bfc5bb7c78 change DifferentialRevisionDetailView to use newer fangled UI abstractions
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
2012-12-11 14:59:27 -08:00

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);
}
}