Fix look and feel v11
This commit is contained in:
parent
34beca0758
commit
ba1f4f0ac6
@ -65,6 +65,10 @@ class RemiseCheque extends CommonObject
|
|||||||
*/
|
*/
|
||||||
public $ref;
|
public $ref;
|
||||||
|
|
||||||
|
const STATUS_DRAFT = 0;
|
||||||
|
const STATUS_VALIDATED = 1;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
@ -1072,50 +1076,26 @@ class RemiseCheque extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* Return label of a status
|
* Return label of a status
|
||||||
*
|
*
|
||||||
* @param int $status Statut
|
* @param int $status Id status
|
||||||
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto, 6=Long label + picto
|
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto, 6=Long label + picto
|
||||||
* @return string Libelle du statut
|
* @return string Libelle du statut
|
||||||
*/
|
*/
|
||||||
public function LibStatut($status, $mode = 0)
|
public function LibStatut($status, $mode = 0)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage
|
if (empty($this->labelStatus) || empty($this->labelStatusShort))
|
||||||
$langs->load('compta');
|
{
|
||||||
if ($mode == 0)
|
global $langs;
|
||||||
{
|
$langs->load('compta');
|
||||||
if ($status == 0) return $langs->trans('ToValidate');
|
$this->labelStatus[self::STATUS_DRAFT] = $langs->trans('ToValidate');
|
||||||
elseif ($status == 1) return $langs->trans('Validated');
|
$this->labelStatus[self::STATUS_VALIDATED] = $langs->trans('Validated');
|
||||||
}
|
$this->labelStatusShort[self::STATUS_DRAFT] = $langs->trans('ToValidate');
|
||||||
elseif ($mode == 1)
|
$this->labelStatusShort[self::STATUS_VALIDATED] = $langs->trans('Validated');
|
||||||
{
|
}
|
||||||
if ($status == 0) return $langs->trans('ToValidate');
|
|
||||||
elseif ($status == 1) return $langs->trans('Validated');
|
$statusType = 'status'.$status;
|
||||||
}
|
if ($status == self::STATUS_VALIDATED) $statusType = 'status4';
|
||||||
elseif ($mode == 2)
|
|
||||||
{
|
return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode);
|
||||||
if ($status == 0) return img_picto($langs->trans('ToValidate'), 'statut0').' '.$langs->trans('ToValidate');
|
|
||||||
elseif ($status == 1) return img_picto($langs->trans('Validated'), 'statut4').' '.$langs->trans('Validated');
|
|
||||||
}
|
|
||||||
elseif ($mode == 3)
|
|
||||||
{
|
|
||||||
if ($status == 0) return img_picto($langs->trans('ToValidate'), 'statut0');
|
|
||||||
elseif ($status == 1) return img_picto($langs->trans('Validated'), 'statut4');
|
|
||||||
}
|
|
||||||
elseif ($mode == 4)
|
|
||||||
{
|
|
||||||
if ($status == 0) return img_picto($langs->trans('ToValidate'), 'statut0').' '.$langs->trans('ToValidate');
|
|
||||||
elseif ($status == 1) return img_picto($langs->trans('Validated'), 'statut4').' '.$langs->trans('Validated');
|
|
||||||
}
|
|
||||||
elseif ($mode == 5)
|
|
||||||
{
|
|
||||||
if ($status == 0) return $langs->trans('ToValidate').' '.img_picto($langs->trans('ToValidate'), 'statut0');
|
|
||||||
elseif ($status == 1) return $langs->trans('Validated').' '.img_picto($langs->trans('Validated'), 'statut4');
|
|
||||||
}
|
|
||||||
elseif ($mode == 6)
|
|
||||||
{
|
|
||||||
if ($status == 0) return $langs->trans('ToValidate').' '.img_picto($langs->trans('ToValidate'), 'statut0');
|
|
||||||
elseif ($status == 1) return $langs->trans('Validated').' '.img_picto($langs->trans('Validated'), 'statut4');
|
|
||||||
}
|
|
||||||
return $langs->trans('Unknown');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user