Look and feel v12

This commit is contained in:
Laurent Destailleur 2020-03-27 19:26:45 +01:00
parent a4797634d5
commit 235210b3bc
3 changed files with 10 additions and 2 deletions

View File

@ -122,16 +122,24 @@ if ($resql)
$i++;
}
$db->free($resql);
include_once DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php';
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder nohover centpercent">';
print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("Statistics").' - '.$langs->trans("Interventions").'</th></tr>'."\n";
$listofstatus = array(0, 1, 2);
$listofstatus = array(0, 1, 3);
$bool = false;
foreach ($listofstatus as $status)
{
$dataseries[] = array($fichinterstatic->LibStatut($status, $bool, 1), (isset($vals[$status.$bool]) ? (int) $vals[$status.$bool] : 0));
if ($status == 3 && !$bool) $bool = true;
else $bool = false;
if ($status == Fichinter::STATUS_DRAFT) $colorseries[$status] = '-'.$badgeStatus0;
if ($status == Fichinter::STATUS_VALIDATED) $colorseries[$status] = $badgeStatus1;
if ($status == Fichinter::STATUS_BILLED) $colorseries[$status] = $badgeStatus4;
if ($status == Fichinter::STATUS_CLOSED) $colorseries[$status] = $badgeStatus6;
}
if ($conf->use_javascript_ajax)
{
@ -140,13 +148,13 @@ if ($resql)
include_once DOL_DOCUMENT_ROOT.'/core/class/dolgraph.class.php';
$dolgraph = new DolGraph();
$dolgraph->SetData($dataseries);
$dolgraph->SetDataColor(array_values($colorseries));
$dolgraph->setShowLegend(2);
$dolgraph->setShowPercent(1);
$dolgraph->SetType(array('pie'));
$dolgraph->setHeight('200');
$dolgraph->draw('idgraphstatus');
print $dolgraph->show($total ? 0 : 1);
$data = array('series'=>$dataseries);
print '</td></tr>';
}