Fixed & refactored status label
This commit is contained in:
parent
ee1b3df3f1
commit
4cab9e8a62
3 changed files with 11 additions and 9 deletions
|
|
@ -701,6 +701,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
|
|||
$taskstatic->duration_effective = $lines[$i]->duration_effective;
|
||||
$taskstatic->budget_amount = $lines[$i]->budget_amount;
|
||||
$taskstatic->billable = $lines[$i]->billable;
|
||||
$taskstatic->status = $lines[$i]->status;
|
||||
$taskstatic->fk_statut = $lines[$i]->fk_statut;
|
||||
|
||||
// Action column
|
||||
|
|
@ -957,7 +958,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
|
|||
// Status
|
||||
if (count($arrayfields) > 0 && !empty($arrayfields['t.fk_statut']['checked'])) {
|
||||
print '<td class="center">';
|
||||
print $taskstatic->getLibStatut(5);
|
||||
print $taskstatic->getLibStatut(4);
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2498,12 +2498,12 @@ class Task extends CommonObjectLine
|
|||
$this->labelStatus[0] = 'Draft';
|
||||
$this->labelStatus[1] = 'ToDo';
|
||||
$this->labelStatus[2] = 'Running';
|
||||
$this->labelStatus[3] = 'Finish';
|
||||
$this->labelStatus[3] = 'Closed';
|
||||
$this->labelStatus[4] = 'Transfered';
|
||||
$this->labelStatusShort[0] = 'Draft';
|
||||
$this->labelStatusShort[1] = 'ToDo';
|
||||
$this->labelStatusShort[2] = 'Running';
|
||||
$this->labelStatusShort[3] = 'Completed';
|
||||
$this->labelStatusShort[3] = 'Closed';
|
||||
$this->labelStatusShort[4] = 'Transfered';
|
||||
|
||||
if ($mode == 0) {
|
||||
|
|
@ -2540,17 +2540,17 @@ class Task extends CommonObjectLine
|
|||
}
|
||||
} elseif ($mode == 4) {
|
||||
if ($status == 0) {
|
||||
return img_picto($langs->trans($this->labelStatusShort[$status]), 'statut0').' '.$langs->trans($this->labelStatus[$status]);
|
||||
return dolGetStatus($langs->trans($this->labelStatus[$status]), $langs->trans($this->labelStatusShort[$status]), '', 'status0', $mode);
|
||||
} elseif ($status == 1) {
|
||||
return img_picto($langs->trans($this->labelStatusShort[$status]), 'statut1').' '.$langs->trans($this->labelStatus[$status]);
|
||||
return dolGetStatus($langs->trans($this->labelStatus[$status]), $langs->trans($this->labelStatusShort[$status]), '', 'status1', $mode);
|
||||
} elseif ($status == 2) {
|
||||
return img_picto($langs->trans($this->labelStatusShort[$status]), 'statut3').' '.$langs->trans($this->labelStatus[$status]);
|
||||
return dolGetStatus($langs->trans($this->labelStatus[$status]), $langs->trans($this->labelStatusShort[$status]), '', 'status2', $mode);
|
||||
} elseif ($status == 3) {
|
||||
return img_picto($langs->trans($this->labelStatusShort[$status]), 'statut6').' '.$langs->trans($this->labelStatus[$status]);
|
||||
return dolGetStatus($langs->trans($this->labelStatus[$status]), $langs->trans($this->labelStatusShort[$status]), '', 'status3', $mode);
|
||||
} elseif ($status == 4) {
|
||||
return img_picto($langs->trans($this->labelStatusShort[$status]), 'statut6').' '.$langs->trans($this->labelStatus[$status]);
|
||||
return dolGetStatus($langs->trans($this->labelStatus[$status]), $langs->trans($this->labelStatusShort[$status]), '', 'status4', $mode);
|
||||
} elseif ($status == 5) {
|
||||
return img_picto($langs->trans($this->labelStatusShort[$status]), 'statut5').' '.$langs->trans($this->labelStatus[$status]);
|
||||
return dolGetStatus($langs->trans($this->labelStatus[$status]), $langs->trans($this->labelStatusShort[$status]), '', 'status5', $mode);
|
||||
}
|
||||
} elseif ($mode == 5) {
|
||||
/*if ($status==0) return $langs->trans($this->labelStatusShort[$status]).' '.img_picto($langs->trans($this->labelStatusShort[$status]),'statut0');
|
||||
|
|
|
|||
|
|
@ -1091,6 +1091,7 @@ if ($action == 'create' && $user->hasRight('projet', 'creer') && (empty($object-
|
|||
}
|
||||
if (!empty($arrayfields['t.fk_statut']['checked'])) {
|
||||
print '<td class="liste_titre center">';
|
||||
//TODO: add status filter
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue