Merge branch 'develop_new_dashboard' of github.com:atm-john/dolibarr into develop_new_task_progress_bar
This commit is contained in:
commit
4ccabca101
@ -570,7 +570,7 @@ $dashboardgroup = array (
|
|||||||
),
|
),
|
||||||
'invoice_supplier' =>
|
'invoice_supplier' =>
|
||||||
array (
|
array (
|
||||||
'groupName' => 'SupplierInvoices',
|
'groupName' => 'BillsSuppliers',
|
||||||
'stats' =>
|
'stats' =>
|
||||||
array ('invoice_supplier'),
|
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;
|
$totalLateNumber = $totallate;
|
||||||
$totallatePercentage = !empty($totaltodo) ? round($totallate / $totaltodo * 100, 2) : 0;
|
$totallatePercentage = !empty($totaltodo) ? round($totallate / $totaltodo * 100, 2) : 0;
|
||||||
if(!empty($conf->global->MAIN_USE_METEO_WITH_PERCENTAGE)) $totallate = $totallatePercentage;
|
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">';
|
$boxwork.='<tr class="nobottom nohover"><td class="tdboxstats nohover flexcontainer centpercent"><div style="display: flex: flex-wrap: wrap">';
|
||||||
|
|
||||||
|
|
||||||
foreach($dashboardgroup as $groupKey => $groupElement) {
|
foreach($dashboardgroup as $groupKey => $groupElement) {
|
||||||
$boards = array();
|
$boards = array();
|
||||||
|
|
||||||
@ -703,7 +710,7 @@ if (!empty($valid_dashboardlines))
|
|||||||
$groupKeyLowerCase = strtolower($groupKey);
|
$groupKeyLowerCase = strtolower($groupKey);
|
||||||
|
|
||||||
$openedDashBoard.= '<div class="box-flex-item">'."\n";
|
$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.= ' <span class="info-box-icon bg-infoxbox-'.$groupKeyLowerCase.'"><i class="fa fa-dol-'.$groupKeyLowerCase.'"></i></span>'."\n";
|
||||||
$openedDashBoard.= ' <div class="info-box-content">'."\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="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.= ' <span class="info-box-icon"><i class="fa fa-weather-level'.$weather->level.'"></i></span>'."\n";
|
||||||
$weatherDashBoard.= ' <div class="info-box-content">'."\n";
|
$weatherDashBoard.= ' <div class="info-box-content">'."\n";
|
||||||
$weatherDashBoard.= ' <span class="info-box-title">'.$langs->trans('GlobalOpenedElemView').'</span>' . "\n";
|
$weatherDashBoard.= ' <span class="info-box-title">'.$langs->trans('GlobalOpenedElemView').'</span>' . "\n";
|
||||||
@ -858,7 +865,7 @@ $boxwork.='</div>';
|
|||||||
|
|
||||||
if(!empty($isIntopOpenedDashBoard)) {
|
if(!empty($isIntopOpenedDashBoard)) {
|
||||||
print '<div class="fichecenter">';
|
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>';
|
print '</div>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -15,6 +15,11 @@ if (! defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?>
|
|||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
}
|
}
|
||||||
|
.info-box.info-box-sm{
|
||||||
|
min-height: 70px;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
.info-box small {
|
.info-box small {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
@ -57,6 +62,12 @@ if (! defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?>
|
|||||||
line-height: 90px;
|
line-height: 90px;
|
||||||
background: rgba(0, 0, 0, 0.2);
|
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 {
|
.info-box-icon > img {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
}
|
}
|
||||||
@ -64,6 +75,10 @@ if (! defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?>
|
|||||||
padding: 5px 10px;
|
padding: 5px 10px;
|
||||||
margin-left: 90px;
|
margin-left: 90px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.info-box-sm .info-box-content{
|
||||||
|
margin-left: 70px;
|
||||||
|
}
|
||||||
.info-box-number {
|
.info-box-number {
|
||||||
display: block;
|
display: block;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user