@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.)
hq.recaptime.dev/wiki/Phorge
phorge
phabricator
1<?php
2
3abstract class PhabricatorConfigDatabaseController
4 extends PhabricatorConfigServicesController {
5
6 protected function renderIcon($status) {
7 switch ($status) {
8 case PhabricatorConfigStorageSchema::STATUS_OKAY:
9 $icon = 'fa-check-circle green';
10 break;
11 case PhabricatorConfigStorageSchema::STATUS_WARN:
12 $icon = 'fa-exclamation-circle yellow';
13 break;
14 case PhabricatorConfigStorageSchema::STATUS_FAIL:
15 default:
16 $icon = 'fa-times-circle red';
17 break;
18 }
19
20 return id(new PHUIIconView())
21 ->setIcon($icon);
22 }
23
24 protected function renderAttr($attr, $issue) {
25 if ($issue) {
26 return phutil_tag(
27 'span',
28 array(
29 'style' => 'color: #aa0000;',
30 ),
31 $attr);
32 } else {
33 return $attr;
34 }
35 }
36
37 protected function renderBoolean($value) {
38 if ($value === null) {
39 return '';
40 } else if ($value === true) {
41 return pht('Yes');
42 } else {
43 return pht('No');
44 }
45 }
46
47}