This commit is contained in:
liumengyi
2023-03-16 02:17:48 +00:00
parent 103ef2810c
commit 068784e472
+3 -2
View File
@@ -5684,12 +5684,13 @@ class executionModel extends model
*/
public function generateRow($executions, $users, $productID)
{
$rows = array();
$today = helper::today();
$rows = array();
foreach($executions as $id => $execution)
{
$label = $execution->type == 'stage' ? 'label-warning' : 'label-info';
$link = $execution->type == 'kanban' ? helper::createLink('execution', 'kanban', "id=$execution->id") : helper::createLink('execution', 'task', "id=$execution->id");
$execution->name = "<span class='project-type-label label label-outline $label'>{$this->lang->execution->typeList[$execution->type]}</span> " . (empty($execution->children) ? html::a($link, $execution->name) : $execution->name);
$execution->name = "<span class='project-type-label label label-outline $label'>{$this->lang->execution->typeList[$execution->type]}</span> " . (empty($execution->children) ? html::a($link, $execution->name) : $execution->name) . (strtotime($today) > strtotime($execution->end) ? '<span class="label label-danger label-badge">' . $this->lang->execution->delayed . '</span>' : '');;
$execution->project = $execution->projectName;
$execution->parent = ($execution->parent and $execution->grade > 1) ? $execution->parent : '';
$execution->asParent = !empty($execution->children);