forked from Wavyzz/dolibarr
prepare badges
This commit is contained in:
@@ -3194,19 +3194,16 @@ class Propal extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
$statuttrans='';
|
$statuttrans='';
|
||||||
if ($statut==self::STATUS_DRAFT) $statuttrans='statut0';
|
if ($statut==self::STATUS_DRAFT) $statuttrans='status0';
|
||||||
elseif ($statut==self::STATUS_VALIDATED) $statuttrans='statut1';
|
elseif ($statut==self::STATUS_VALIDATED) $statuttrans='status1';
|
||||||
elseif ($statut==self::STATUS_SIGNED) $statuttrans='statut3';
|
elseif ($statut==self::STATUS_SIGNED) $statuttrans='status3';
|
||||||
elseif ($statut==self::STATUS_NOTSIGNED) $statuttrans='statut5';
|
elseif ($statut==self::STATUS_NOTSIGNED) $statuttrans='status5';
|
||||||
elseif ($statut==self::STATUS_BILLED) $statuttrans='statut6';
|
elseif ($statut==self::STATUS_BILLED) $statuttrans='status6';
|
||||||
|
|
||||||
if ($mode == 0) return $this->labelstatut[$statut];
|
|
||||||
elseif ($mode == 1) return $this->labelstatut_short[$statut];
|
return dolGetStatus($this->labelstatut[$statut], $this->labelstatut_short[$statut], '', $statuttrans, $mode);
|
||||||
elseif ($mode == 2) return img_picto($this->labelstatut_short[$statut], $statuttrans).' '.$this->labelstatut_short[$statut];
|
|
||||||
elseif ($mode == 3) return img_picto($this->labelstatut[$statut], $statuttrans);
|
|
||||||
elseif ($mode == 4) return img_picto($this->labelstatut[$statut], $statuttrans).' '.$this->labelstatut[$statut];
|
|
||||||
elseif ($mode == 5) return '<span class="hideonsmartphone">'.$this->labelstatut_short[$statut].' </span>'.img_picto($this->labelstatut[$statut], $statuttrans);
|
|
||||||
elseif ($mode == 6) return '<span class="hideonsmartphone">'.$this->labelstatut[$statut].' </span>'.img_picto($this->labelstatut[$statut], $statuttrans);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -8012,7 +8012,7 @@ function dolGetStatus($statusLabel = '', $statusLabelShort = '', $html = '', $st
|
|||||||
if($displayMode==0){
|
if($displayMode==0){
|
||||||
$return = !empty($html)?$html:$statusLabel;
|
$return = !empty($html)?$html:$statusLabel;
|
||||||
}
|
}
|
||||||
elseif($displayMode===1){
|
elseif($displayMode==1){
|
||||||
$return = !empty($html)?$html:(!empty($statusLabelShort)?$statusLabelShort:$statusLabel);
|
$return = !empty($html)?$html:(!empty($statusLabelShort)?$statusLabelShort:$statusLabel);
|
||||||
}
|
}
|
||||||
// use status with images
|
// use status with images
|
||||||
@@ -8047,7 +8047,7 @@ function dolGetStatus($statusLabel = '', $statusLabelShort = '', $html = '', $st
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Use new badge
|
// Use new badge
|
||||||
if(!empty($conf->global->MAIN_STATUS_USES_CSS) && !empty($displayMode)){
|
elseif(!empty($conf->global->MAIN_STATUS_USES_CSS) && !empty($displayMode)){
|
||||||
|
|
||||||
$statusLabelShort = !empty($statusLabelShort)?$statusLabelShort:$statusLabel;
|
$statusLabelShort = !empty($statusLabelShort)?$statusLabelShort:$statusLabel;
|
||||||
|
|
||||||
@@ -8064,7 +8064,7 @@ function dolGetStatus($statusLabel = '', $statusLabelShort = '', $html = '', $st
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $return;
|
return $return.$displayMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user