diff --git a/htdocs/index.php b/htdocs/index.php index 6276d85f579..02648490bfc 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -684,6 +684,7 @@ $boxwork.=''."\n"; // Show dashboard $nbworkboardempty=0; +$isIntopOpenedDashBoard = array(); if (! empty($valid_dashboardlines)) { $openedDashBoard = ''; @@ -698,6 +699,7 @@ if (! empty($valid_dashboardlines)) if(!empty($valid_dashboardlines[$infoKey])) { $boards[] = $valid_dashboardlines[$infoKey]; + $isIntopOpenedDashBoard[]=$infoKey; } } @@ -719,12 +721,21 @@ if (! empty($valid_dashboardlines)) $textLateTitle = $langs->trans("NActionsLate", $board->nbtodolate); $textLateTitle.= ' ('.$langs->trans("Late").' = '.$langs->trans("DateReference").' > '.$langs->trans("DateToday").' '.(ceil($board->warning_delay) >= 0 ? '+' : '').ceil($board->warning_delay).' '.$langs->trans("days").')'; - $textLate = img_picto($textLateTitle, "warning_white", 'class="inline-block hideonsmartphone valigntextbottom"').''; - $textLate .= ''; - $textLate .= $board->nbtodolate; - $textLate .= ''; + $textLate = ''; + if($board->nbtodolate>0) + { + $textLate .= ' '; + $textLate .= ' '.$board->nbtodolate; + $textLate .= ''; + } - $openedDashBoard .= ' '.$infoName.' : '.$board->nbtodo.''.$textLate.'' . "\n"; + + $nbtodClass = ''; + if($board->nbtodo>0){ + $nbtodClass = 'badge badge-info'; + } + + $openedDashBoard .= ' '.$infoName.' : '.$board->nbtodo.''.$textLate.'' . "\n"; } @@ -736,10 +747,17 @@ if (! empty($valid_dashboardlines)) } - + $nbworkboardcount=0; foreach($valid_dashboardlines as $infoKey => $board) { - if (empty($board->nbtodo)) $nbworkboardempty++; + if(in_array($infoKey, $isIntopOpenedDashBoard)){ + // skip if info is present on top + continue; + } + + + if (empty($board->nbtodo)) $nbworkboardempty++; + $nbworkboardcount++; @@ -820,8 +838,11 @@ print '