Look and feel v11
This commit is contained in:
parent
c00bdca31b
commit
0a169028e7
@ -1,5 +1,5 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2007-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2007-2019 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* This program is free software; you can redistribute it and/or modify
|
||||||
@ -1306,43 +1306,26 @@ class Cronjob extends CommonObject
|
|||||||
*/
|
*/
|
||||||
public function LibStatut($status, $mode = 0, $processing = 0)
|
public function LibStatut($status, $mode = 0, $processing = 0)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $langs;
|
if (empty($this->labelStatus) || empty($this->labelStatusShort))
|
||||||
$langs->load('users');
|
{
|
||||||
|
global $langs;
|
||||||
|
$langs->load('users');
|
||||||
|
|
||||||
$moretext = '';
|
$moretext = '';
|
||||||
if ($processing) $moretext=' ('.$langs->trans("Running").')';
|
if ($processing) $moretext=' ('.$langs->trans("Running").')';
|
||||||
|
|
||||||
if ($mode == 0)
|
$this->labelStatus[self::STATUS_DISABLED] = $langs->trans('Draft').$moretext;
|
||||||
{
|
$this->labelStatus[self::STATUS_ENABLED] = $langs->trans('Enabled').$moretext;
|
||||||
if ($status == 1) return $langs->trans('Enabled').$moretext;
|
$this->labelStatusShort[self::STATUS_DISABLED] = $langs->trans('Draft');
|
||||||
elseif ($status == 0) return $langs->trans('Disabled').$moretext;
|
$this->labelStatusShort[self::STATUS_ENABLED] = $langs->trans('Enabled');
|
||||||
}
|
}
|
||||||
elseif ($mode == 1)
|
|
||||||
{
|
$statusType = 'status4';
|
||||||
if ($status == 1) return $langs->trans('Enabled').$moretext;
|
if ($status == 1 && $processing) $statusType = 'status1';
|
||||||
elseif ($status == 0) return $langs->trans('Disabled').$moretext;
|
if ($status == 0) $statusType = 'status5';
|
||||||
}
|
|
||||||
elseif ($mode == 2)
|
return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode);
|
||||||
{
|
|
||||||
if ($status == 1) return img_picto($langs->trans('Enabled'), 'statut'.($processing?'1':'4'), 'class="pictostatus"').' '.$langs->trans('Enabled').$moretext;
|
|
||||||
elseif ($status == 0) return img_picto($langs->trans('Disabled'), 'statut5', 'class="pictostatus"').' '.$langs->trans('Disabled').$moretext;
|
|
||||||
}
|
|
||||||
elseif ($mode == 3)
|
|
||||||
{
|
|
||||||
if ($status == 1) return img_picto($langs->trans('Enabled').$moretext, 'statut'.($processing?'1':'4'), 'class="pictostatus"');
|
|
||||||
elseif ($status == 0) return img_picto($langs->trans('Disabled').$moretext, 'statut5', 'class="pictostatus"');
|
|
||||||
}
|
|
||||||
elseif ($mode == 4)
|
|
||||||
{
|
|
||||||
if ($status == 1) return img_picto($langs->trans('Enabled').$moretext, 'statut'.($processing?'1':'4'), 'class="pictostatus"').' '.$langs->trans('Enabled').$moretext;
|
|
||||||
elseif ($status == 0) return img_picto($langs->trans('Disabled').$moretext, 'statut5', 'class="pictostatus"').' '.$langs->trans('Disabled').$moretext;
|
|
||||||
}
|
|
||||||
elseif ($mode == 5)
|
|
||||||
{
|
|
||||||
if ($status == 1) return $langs->trans('Enabled').$moretext.' '.img_picto($langs->trans('Enabled').$moretext, 'statut'.($processing?'1':'4'), 'class="pictostatus"');
|
|
||||||
elseif ($status == 0) return $langs->trans('Disabled').$moretext.' '.img_picto($langs->trans('Disabled').$moretext, 'statut5', 'class="pictostatus"');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user