Merge branch 'develop_new_dashboard' of github.com:atm-john/dolibarr into develop_new_task_progress_bar

This commit is contained in:
ATM john 2019-08-13 16:04:10 +02:00
commit 4ccabca101
2 changed files with 27 additions and 5 deletions

View File

@ -570,7 +570,7 @@ $dashboardgroup = array (
),
'invoice_supplier' =>
array (
'groupName' => 'SupplierInvoices',
'groupName' => 'BillsSuppliers',
'stats' =>
array ('invoice_supplier'),
),
@ -636,6 +636,14 @@ foreach($valid_dashboardlines as $board)
}
}
$openedDashBoardSize = 'info-box-sm'; // use sm by default
foreach ($dashboardgroup as $dashbordelement){
if(is_array($dashbordelement['stats']) && count($dashbordelement['stats'])>2){
$openedDashBoardSize = ''; // use default info box size : big
break;
}
}
$totalLateNumber = $totallate;
$totallatePercentage = !empty($totaltodo) ? round($totallate / $totaltodo * 100, 2) : 0;
if(!empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE)) $totallate = $totallatePercentage;
@ -681,7 +689,6 @@ if (!empty($valid_dashboardlines))
$boxwork.='<tr class="nobottom nohover"><td class="tdboxstats nohover flexcontainer centpercent"><div style="display: flex: flex-wrap: wrap">';
foreach($dashboardgroup as $groupKey => $groupElement) {
$boards = array();
@ -703,7 +710,7 @@ if (!empty($valid_dashboardlines))
$groupKeyLowerCase = strtolower($groupKey);
$openedDashBoard.= '<div class="box-flex-item">'."\n";
$openedDashBoard.= ' <div class="info-box">'."\n";
$openedDashBoard.= ' <div class="info-box '.$openedDashBoardSize.'">'."\n";
$openedDashBoard.= ' <span class="info-box-icon bg-infoxbox-'.$groupKeyLowerCase.'"><i class="fa fa-dol-'.$groupKeyLowerCase.'"></i></span>'."\n";
$openedDashBoard.= ' <div class="info-box-content">'."\n";
@ -760,7 +767,7 @@ if (!empty($valid_dashboardlines))
$weatherDashBoard= '<div class="box-flex-item '.$appendClass.'">'."\n";
$weatherDashBoard.= ' <div class="info-box info-box-weather info-box-weather-level'.$weather->level.'">'."\n";
$weatherDashBoard.= ' <div class="info-box '.$openedDashBoardSize.' info-box-weather info-box-weather-level'.$weather->level.'">'."\n";
$weatherDashBoard.= ' <span class="info-box-icon"><i class="fa fa-weather-level'.$weather->level.'"></i></span>'."\n";
$weatherDashBoard.= ' <div class="info-box-content">'."\n";
$weatherDashBoard.= ' <span class="info-box-title">'.$langs->trans('GlobalOpenedElemView').'</span>' . "\n";
@ -858,7 +865,7 @@ $boxwork.='</div>';
if(!empty($isIntopOpenedDashBoard)) {
print '<div class="fichecenter">';
print '<div class="box"><div class="box-flex-container">' . $openedDashBoard . '</div></div>';
print '<div class="opened-dash-board-wrap"><div class="box-flex-container">' . $openedDashBoard . '</div></div>';
print '</div>';
}

View File

@ -15,6 +15,11 @@ if (! defined('ISLOADEDBYSTEELSHEET'))  die('Must be call by steelsheet'); ?>
border-radius: 2px;
margin-bottom: 15px;
}
.info-box.info-box-sm{
min-height: 70px;
margin-bottom: 10px;
}
.info-box small {
font-size: 14px;
}
@ -57,6 +62,12 @@ if (! defined('ISLOADEDBYSTEELSHEET'))  die('Must be call by steelsheet'); ?>
line-height: 90px;
background: rgba(0, 0, 0, 0.2);
}
.info-box-sm .info-box-icon{
height: 70px;
width: 70px;
font-size: 25px;
line-height: 70px;
}
.info-box-icon > img {
max-width: 100%;
}
@ -64,6 +75,10 @@ if (! defined('ISLOADEDBYSTEELSHEET'))  die('Must be call by steelsheet'); ?>
padding: 5px 10px;
margin-left: 90px;
}
.info-box-sm .info-box-content{
margin-left: 70px;
}
.info-box-number {
display: block;
font-weight: bold;