Changeset View
Changeset View
Standalone View
Standalone View
src/applications/maniphest/view/ManiphestTaskListView.php
Show First 20 Lines • Show All 80 Lines • ▼ Show 20 Lines | foreach ($this->tasks as $task) { | ||||
$color = idx($color_map, $task->getPriority(), 'grey'); | $color = idx($color_map, $task->getPriority(), 'grey'); | ||||
if ($task->isClosed()) { | if ($task->isClosed()) { | ||||
$item->setDisabled(true); | $item->setDisabled(true); | ||||
$color = 'grey'; | $color = 'grey'; | ||||
} | } | ||||
$item->setStatusIcon($icon.' '.$color, $tooltip); | $item->setStatusIcon($icon.' '.$color, $tooltip); | ||||
if ($task->isClosed()) { | |||||
$closed_epoch = $task->getClosedEpoch(); | |||||
// We don't expect a task to be closed without a closed epoch, but | |||||
// recover if we find one. This can happen with older objects or with | |||||
// lipsum test data. | |||||
if (!$closed_epoch) { | |||||
$closed_epoch = $task->getDateModified(); | |||||
} | |||||
$item->addIcon( | |||||
'fa-check-square-o grey', | |||||
phabricator_datetime($closed_epoch, $this->getUser())); | |||||
} else { | |||||
$item->addIcon( | $item->addIcon( | ||||
'none', | 'none', | ||||
phabricator_datetime($task->getDateModified(), $this->getUser())); | phabricator_datetime($task->getDateModified(), $this->getUser())); | ||||
} | |||||
if ($this->showSubpriorityControls) { | if ($this->showSubpriorityControls) { | ||||
$item->setGrippable(true); | $item->setGrippable(true); | ||||
} | } | ||||
if ($this->showSubpriorityControls || $this->showBatchControls) { | if ($this->showSubpriorityControls || $this->showBatchControls) { | ||||
$item->addSigil('maniphest-task'); | $item->addSigil('maniphest-task'); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 68 Lines • Show Last 20 Lines |