Fix status color
This commit is contained in:
parent
724d00fc6c
commit
b552c6b4fe
@ -1043,7 +1043,7 @@ if ($resql) {
|
||||
$moreforfilter .= img_picto($tmptitle, 'user', 'class="pictofixedwidth"').$form->select_dolusers($search_user, 'search_user', $tmptitle, '', 0, '', '', 0, 0, 0, '', 0, '', 'maxwidth250');
|
||||
$moreforfilter .= '</div>';
|
||||
}
|
||||
// If the user can view prospects other than his'
|
||||
// Filter on product tags
|
||||
if (!empty($conf->categorie->enabled) && $user->rights->categorie->lire && ($user->rights->produit->lire || $user->rights->service->lire)) {
|
||||
include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
||||
$moreforfilter .= '<div class="divsearchfield">';
|
||||
|
||||
@ -1251,6 +1251,8 @@ class Holiday extends CommonObject
|
||||
public function LibStatut($status, $mode = 0, $startdate = '')
|
||||
{
|
||||
// phpcs:enable
|
||||
global $langs;
|
||||
|
||||
if (empty($this->labelStatus) || empty($this->labelStatusShort)) {
|
||||
global $langs;
|
||||
//$langs->load("mymodule");
|
||||
@ -1266,9 +1268,11 @@ class Holiday extends CommonObject
|
||||
$this->labelStatusShort[self::STATUS_REFUSED] = $langs->trans('RefuseCP');
|
||||
}
|
||||
|
||||
$params = array();
|
||||
$statusType = 'status6';
|
||||
if (!empty($startdate) && $startdate > dol_now()) {
|
||||
if (!empty($startdate) && $startdate >= dol_now()) { // If not yet passed, we use a green "in live" color
|
||||
$statusType = 'status4';
|
||||
$params = array('tooltip'=>$this->labelStatus[$status].' - '.$langs->trans("Forthcoming"));
|
||||
}
|
||||
if ($status == self::STATUS_DRAFT) {
|
||||
$statusType = 'status0';
|
||||
@ -1283,7 +1287,7 @@ class Holiday extends CommonObject
|
||||
$statusType = 'status5';
|
||||
}
|
||||
|
||||
return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode);
|
||||
return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode, '', $params);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -730,6 +730,7 @@ if ($resql) {
|
||||
$holidaystatic->id = $obj->rowid;
|
||||
$holidaystatic->ref = ($obj->ref ? $obj->ref : $obj->rowid);
|
||||
$holidaystatic->statut = $obj->status;
|
||||
$holidaystatic->date_debut = $db->jdate($obj->date_debut);
|
||||
|
||||
// User
|
||||
$userstatic->id = $obj->fk_user;
|
||||
@ -790,7 +791,7 @@ if ($resql) {
|
||||
}
|
||||
if (!empty($arrayfields['duration']['checked'])) {
|
||||
print '<td class="right">';
|
||||
$nbopenedday = num_open_day($db->jdate($obj->date_debut, 1), $db->jdate($obj->date_fin, 1), 0, 1, $obj->halfday);
|
||||
$nbopenedday = num_open_day($db->jdate($obj->date_debut, 1), $db->jdate($obj->date_fin, 1), 0, 1, $obj->halfday); // user jdate(..., 1) because num_open_day need UTC dates
|
||||
print $nbopenedday.' '.$langs->trans('DurationDays');
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
|
||||
@ -1137,3 +1137,4 @@ CopiedToClipboard=Copied to clipboard
|
||||
InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration.
|
||||
ConfirmCancel=Are you sure you want to cancel
|
||||
EmailMsgID=Email MsgID
|
||||
Forthcoming=Forthcoming
|
||||
Loading…
Reference in New Issue
Block a user