Changeset View
Changeset View
Standalone View
Standalone View
src/applications/maniphest/constants/ManiphestTaskStatus.php
Show First 20 Lines • Show All 76 Lines • ▼ Show 20 Lines | public static function getTaskStatusFullName($status) { | ||||
$name = self::getStatusAttribute($status, 'name.full'); | $name = self::getStatusAttribute($status, 'name.full'); | ||||
if ($name !== null) { | if ($name !== null) { | ||||
return $name; | return $name; | ||||
} | } | ||||
return self::getStatusAttribute($status, 'name', pht('Unknown Status')); | return self::getStatusAttribute($status, 'name', pht('Unknown Status')); | ||||
} | } | ||||
public static function renderFullDescription($status) { | public static function renderFullDescription($status, $priority) { | ||||
if (self::isOpenStatus($status)) { | if (self::isOpenStatus($status)) { | ||||
$color = 'status'; | $name = pht('%s, %s', self::getTaskStatusFullName($status), $priority); | ||||
$icon_color = 'bluegrey'; | $color = 'grey'; | ||||
$icon = 'fa-square-o'; | |||||
} else { | } else { | ||||
$color = 'status-dark'; | $name = self::getTaskStatusFullName($status); | ||||
$icon_color = ''; | $color = 'indigo'; | ||||
$icon = 'fa-check-square-o'; | |||||
} | } | ||||
$icon = self::getStatusIcon($status); | $tag = id(new PHUITagView()) | ||||
->setName($name) | |||||
$img = id(new PHUIIconView()) | ->setIcon($icon) | ||||
->setIcon($icon.' '.$icon_color); | ->setType(PHUITagView::TYPE_SHADE) | ||||
->setShade($color); | |||||
$tag = phutil_tag( | |||||
'span', | |||||
array( | |||||
'class' => 'phui-header-status phui-header-'.$color, | |||||
), | |||||
array( | |||||
$img, | |||||
self::getTaskStatusFullName($status), | |||||
)); | |||||
return $tag; | return $tag; | ||||
} | } | ||||
private static function getSpecialStatus($special) { | private static function getSpecialStatus($special) { | ||||
foreach (self::getStatusConfig() as $const => $status) { | foreach (self::getStatusConfig() as $const => $status) { | ||||
if (idx($status, 'special') == $special) { | if (idx($status, 'special') == $special) { | ||||
return $const; | return $const; | ||||
▲ Show 20 Lines • Show All 250 Lines • Show Last 20 Lines |