Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/DiffusionCommitAuditStatus.php
Show First 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | final class DiffusionCommitAuditStatus extends Phobject { | ||||
public function getIcon() { | public function getIcon() { | ||||
return idx($this->spec, 'icon'); | return idx($this->spec, 'icon'); | ||||
} | } | ||||
public function getColor() { | public function getColor() { | ||||
return idx($this->spec, 'color'); | return idx($this->spec, 'color'); | ||||
} | } | ||||
public function getAnsiColor() { | |||||
return idx($this->spec, 'color.ansi'); | |||||
} | |||||
public function getName() { | public function getName() { | ||||
return idx($this->spec, 'name', pht('Unknown ("%s")', $this->key)); | return idx($this->spec, 'name', pht('Unknown ("%s")', $this->key)); | ||||
} | } | ||||
public function isNoAudit() { | public function isNoAudit() { | ||||
return ($this->key == self::NONE); | return ($this->key == self::NONE); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 52 Lines • ▼ Show 20 Lines | final class DiffusionCommitAuditStatus extends Phobject { | ||||
private static function getMap() { | private static function getMap() { | ||||
return array( | return array( | ||||
self::NONE => array( | self::NONE => array( | ||||
'name' => pht('No Audits'), | 'name' => pht('No Audits'), | ||||
'legacy' => 0, | 'legacy' => 0, | ||||
'icon' => 'fa-check', | 'icon' => 'fa-check', | ||||
'color' => 'bluegrey', | 'color' => 'bluegrey', | ||||
'closed' => true, | 'closed' => true, | ||||
'color.ansi' => null, | |||||
), | ), | ||||
self::NEEDS_AUDIT => array( | self::NEEDS_AUDIT => array( | ||||
'name' => pht('Audit Required'), | 'name' => pht('Audit Required'), | ||||
'legacy' => 1, | 'legacy' => 1, | ||||
'icon' => 'fa-exclamation-circle', | 'icon' => 'fa-exclamation-circle', | ||||
'color' => 'orange', | 'color' => 'orange', | ||||
'closed' => false, | 'closed' => false, | ||||
'color.ansi' => 'magenta', | |||||
), | ), | ||||
self::CONCERN_RAISED => array( | self::CONCERN_RAISED => array( | ||||
'name' => pht('Concern Raised'), | 'name' => pht('Concern Raised'), | ||||
'legacy' => 2, | 'legacy' => 2, | ||||
'icon' => 'fa-times-circle', | 'icon' => 'fa-times-circle', | ||||
'color' => 'red', | 'color' => 'red', | ||||
'closed' => false, | 'closed' => false, | ||||
'color.ansi' => 'red', | |||||
), | ), | ||||
self::PARTIALLY_AUDITED => array( | self::PARTIALLY_AUDITED => array( | ||||
'name' => pht('Partially Audited'), | 'name' => pht('Partially Audited'), | ||||
'legacy' => 3, | 'legacy' => 3, | ||||
'icon' => 'fa-check-circle-o', | 'icon' => 'fa-check-circle-o', | ||||
'color' => 'yellow', | 'color' => 'yellow', | ||||
'closed' => false, | 'closed' => false, | ||||
'color.ansi' => 'yellow', | |||||
), | ), | ||||
self::AUDITED => array( | self::AUDITED => array( | ||||
'name' => pht('Audited'), | 'name' => pht('Audited'), | ||||
'legacy' => 4, | 'legacy' => 4, | ||||
'icon' => 'fa-check-circle', | 'icon' => 'fa-check-circle', | ||||
'color' => 'green', | 'color' => 'green', | ||||
'closed' => true, | 'closed' => true, | ||||
'color.ansi' => 'green', | |||||
), | ), | ||||
self::NEEDS_VERIFICATION => array( | self::NEEDS_VERIFICATION => array( | ||||
'name' => pht('Needs Verification'), | 'name' => pht('Needs Verification'), | ||||
'legacy' => 5, | 'legacy' => 5, | ||||
'icon' => 'fa-refresh', | 'icon' => 'fa-refresh', | ||||
'color' => 'indigo', | 'color' => 'indigo', | ||||
'closed' => false, | 'closed' => false, | ||||
'color.ansi' => 'magenta', | |||||
), | ), | ||||
); | ); | ||||
} | } | ||||
} | } |