diff --git a/htdocs/index.php b/htdocs/index.php index afea714d95f..eab8844b960 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -364,18 +364,6 @@ $showweather=empty($conf->global->MAIN_DISABLE_METEO)?1:0; //Array that contains all WorkboardResponse classes to process them $dashboardlines=array(); -$boxwork=''; -$boxwork.='
'; -$boxwork.=''."\n"; -$boxwork.=''; -$boxwork.=''; -$boxwork.=''; -$boxwork.=''; -$boxwork.=''; -//print ''; -if ($showweather) $boxwork.=''; -$boxwork.=''."\n"; - // Do not include sections without management permission require DOL_DOCUMENT_ROOT.'/core/class/workboardresponse.class.php'; @@ -531,27 +519,64 @@ foreach($valid_dashboardlines as $board) } } + +$boxwork=''; +$boxwork.='
'; +$boxwork.='
'.$langs->trans("DolibarrWorkBoard").''.$langs->trans("Number").''.$form->textwithpicto($langs->trans("Late"),$langs->trans("LateDesc")).'   
'."\n"; +$boxwork.=''; +$boxwork.=''; +$boxwork.=''; +$boxwork.=''; +$boxwork.=''; +//print ''; +//if ($showweather) $boxwork.=''; +$boxwork.=''."\n"; + +if ($showweather) +{ + $var=!$var; + $boxwork.=''; + $boxwork.=''; + /*$boxwork.='';*/ + $boxwork.=''; + $showweather=0; +} + + // Show dashboard foreach($valid_dashboardlines as $board) { $var=!$var; - $boxwork.= ''; + $boxwork.= ''; $boxwork.= ''; $boxwork.= ''; - $boxwork.=''; /*print '';*/ - + /* if ($showweather) { $boxwork.=''; $showweather=0; - } + }*/ $boxwork.=''; $boxwork.="\n"; }
'.$langs->trans("DolibarrWorkBoard").''.$langs->trans("Number").''.$form->textwithpicto($langs->trans("Late"),$langs->trans("LateDesc")).'   
'; + //$boxwork.=$langs->trans("Meteo"); + //$boxwork.=''; + $text=''; + if ($totallate > 0) $text=$langs->transnoentitiesnoconv("WarningYouHaveAtLeastOneTaskLate").' ('.$langs->transnoentitiesnoconv("NActionsLate",$totallate).')'; + $options='height="64px"'; + if ($rowspan <= 2) $options='height="24"'; // Weather logo is smaller if dashboard has few elements + else if ($rowspan <= 3) $options='height="48"'; // Weather logo is smaller if dashboard has few elements + $boxwork.=showWeather($totallate,$text,$options); + $boxwork.=''; + if ($board->nbtodolate > 0) $boxwork.=img_picto($textlate,"warning"); + else $boxwork.=' '; + $boxwork.='
'.$board->img.''.$board->label.'
'.$board->img.'   '.$board->label.''.$board->nbtodo.''; $textlate = $langs->trans("NActionsLate",$board->nbtodolate); - $textlate .= ' ('.$langs->trans("Late").' = '.$langs->trans("DateReference").' > '.$langs->trans("DateToday").' '.(ceil($board->warning_delay) >= 0 ? '+' : '').ceil($board->warning_delay).' '.$langs->trans("days").')'; - $boxwork.= ''; + $textlate.= ' ('.$langs->trans("Late").' = '.$langs->trans("DateReference").' > '.$langs->trans("DateToday").' '.(ceil($board->warning_delay) >= 0 ? '+' : '').ceil($board->warning_delay).' '.$langs->trans("days").')'; + $boxwork.= ''; + $boxwork.= ''; $boxwork.= $board->nbtodolate; - $boxwork.= ''; + $boxwork.= ''; + $boxwork.= ''; $boxwork.=''; - if ($board->nbtodolate > 0) $boxwork.=img_picto($textlate,"warning"); - else $boxwork.=' '; + $boxwork.=''; + if ($board->nbtodolate > 0) $boxwork.=img_picto($textlate, "warning", 'class="valignmiddle"').' '; $boxwork.=''; print ' (>'.ceil($board->warning_delay).' '.$langs->trans("days").')'; print ''; @@ -563,7 +588,7 @@ foreach($valid_dashboardlines as $board) $boxwork.=showWeather($totallate,$text,$options); $boxwork.='