1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-30 01:10:58 +01:00

[Redesign] Remove remaining barColor callsites

Summary: Ref T8099, Fixes T8341. Switches all remaining callsites to setBarColor to use setStatusIcon (sans workboards).

Test Plan: Test each of the applications I changed as I could (not Releeph).

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8341, T8099

Differential Revision: https://secure.phabricator.com/D13059
This commit is contained in:
Chad Little 2015-05-28 15:17:34 -07:00
parent fd47a047e5
commit 13f9f209df
9 changed files with 30 additions and 14 deletions

View file

@ -157,17 +157,17 @@ final class PhabricatorAuditListView extends AphrontView {
->setObjectName($commit_name)
->setHeader($commit_desc)
->setHref($commit_link)
->addAttribute($status_text)
->addAttribute(pht('Author: %s', $author_name))
->addAttribute($reasons)
->addIcon('none', $committed)
->setSubHead(pht('Author: %s', $author_name));
->addIcon('none', $committed);
if (!empty($auditors)) {
$item->addByLine(pht('Auditors: %s', $auditors));
}
if ($status_color) {
$item->setStatusIcon('fa-exclamation-triangle '.$status_color);
$item->setStatusIcon(
'fa-exclamation-triangle '.$status_color, $status_text);
}
$list->addItem($item);

View file

@ -206,7 +206,8 @@ final class HarbormasterBuildableSearchEngine
$item->addIcon('fa-wrench grey', pht('Manual'));
}
$item->setBarColor(HarbormasterBuildable::getBuildableStatusColor(
$item->setStatusIcon('fa-wrench '.
HarbormasterBuildable::getBuildableStatusColor(
$buildable->getBuildableStatus()));
$item->addByline(HarbormasterBuildable::getBuildableStatusName(
$buildable->getBuildableStatus()));

View file

@ -143,7 +143,7 @@ final class PhortuneAccountViewController extends PhortuneController {
switch ($method->getStatus()) {
case PhortunePaymentMethod::STATUS_ACTIVE:
$item->setBarColor('green');
$item->setStatusIcon('fa-check green');
$disable_uri = $this->getApplicationURI('card/'.$id.'/disable/');
$item->addAction(
@ -154,6 +154,7 @@ final class PhortuneAccountViewController extends PhortuneController {
->setWorkflow(true));
break;
case PhortunePaymentMethod::STATUS_DISABLED:
$item->setStatusIcon('fa-ban lightbluetext');
$item->setDisabled(true);
break;
}

View file

@ -229,9 +229,9 @@ final class PhortuneMerchantViewController
if ($provider->isEnabled()) {
if ($provider->isAcceptingLivePayments()) {
$item->setBarColor('green');
$item->setStatusIcon('fa-check green');
} else {
$item->setBarColor('yellow');
$item->setStatusIcon('fa-warning yellow');
$item->addIcon('fa-exclamation-triangle', pht('Test Mode'));
}

View file

@ -183,7 +183,7 @@ final class PhrequentSearchEngine extends PhabricatorApplicationSearchEngine {
'/phrequent/track/stop/'.
$usertime->getObjectPHID().'/'));
}
$item->setBarColor('green');
$item->setStatusIcon('fa-clock-o green');
}
$view->addItem($item);

View file

@ -22,10 +22,20 @@ final class PonderQuestionStatus extends PonderConstants {
public static function getQuestionStatusTagColor($status) {
$map = array(
self::STATUS_OPEN => PHUITagView::COLOR_BLUE,
self::STATUS_CLOSED => PHUITagView::COLOR_BLACK,
);
return idx($map, $status);
}
public static function getQuestionStatusIcon($status) {
$map = array(
self::STATUS_OPEN => 'fa-question-circle',
self::STATUS_CLOSED => 'fa-check-square-o',
);
return idx($map, $status);
}
}

View file

@ -144,14 +144,18 @@ final class PonderQuestionSearchEngine
->setUser($viewer);
foreach ($questions as $question) {
$color = PonderQuestionStatus::getQuestionStatusTagColor(
$question->getStatus());
$icon = PonderQuestionStatus::getQuestionStatusIcon(
$question->getStatus());
$full_status = PonderQuestionStatus::getQuestionStatusFullName(
$question->getStatus());
$item = new PHUIObjectItemView();
$item->setObjectName('Q'.$question->getID());
$item->setHeader($question->getTitle());
$item->setHref('/Q'.$question->getID());
$item->setObject($question);
$item->setBarColor(
PonderQuestionStatus::getQuestionStatusTagColor(
$question->getStatus()));
$item->setStatusIcon($icon.' '.$color, $full_status);
$created_date = phabricator_date($question->getDateCreated(), $viewer);
$item->addIcon('none', $created_date);

View file

@ -112,7 +112,7 @@ final class ReleephProductViewController extends ReleephProductController
$open_count = count(idx($requests, $branch->getID(), array()));
if ($open_count) {
$item->setBarColor('orange');
$item->setStatusIcon('fa-code-fork orange');
$item->addIcon(
'fa-code-fork',
pht('%d Open Pull Request(s)', new PhutilNumber($open_count)));

View file

@ -79,7 +79,7 @@ final class PhabricatorCustomFieldConfigOptionType
->addSigil('field-spec-toggle')
->setIcon('fa-plus'));
$enabled_item->setBarColor('green');
$enabled_item->setStatusIcon('fa-check green');
if (!$field->canDisableField()) {
$enabled_item->addAction(