';
$boxstat.='| ';
if ($conf->supplier_proposal->enabled)
diff --git a/htdocs/index.php b/htdocs/index.php
index ee7d2ea7e04..b6189537546 100644
--- a/htdocs/index.php
+++ b/htdocs/index.php
@@ -516,7 +516,6 @@ foreach($dashboardlines as $tmp)
{
if ($tmp instanceof WorkboardResponse) $valid_dashboardlines[] = $tmp;
}
-$rowspan = count($valid_dashboardlines);
// We calculate $totallate. Must be defined before start of next loop because it is show in first fetch on next loop
foreach($valid_dashboardlines as $board)
@@ -549,8 +548,6 @@ if ($showweather)
$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.=' | ';
/*$boxwork.='';
@@ -564,43 +561,54 @@ if ($showweather)
// Show dashboard
$nbworkboardempty=0;
-foreach($valid_dashboardlines as $board)
+if (! empty($valid_dashboardlines))
{
- if (empty($boad->nbtodo)) $nbworkboardempty++;
-
- $var=!$var;
- $boxwork .= ' |
| '.$board->img.' '.$board->label.' | ';
- $boxwork .= ''.$board->nbtodo.' | ';
- $boxwork .= '';
- $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 .= '';
- $boxwork .= '';
- $boxwork .= $board->nbtodolate;
- $boxwork .= '';
- $boxwork .= '';
- $boxwork .=' | ';
- $boxwork .='';
- if ($board->nbtodolate > 0) $boxwork .=img_picto($textlate, "warning", 'class="valignmiddle"').' ';
- $boxwork .=' | ';
- /*print '';
- print ' (>'.ceil($board->warning_delay).' '.$langs->trans("days").')';
- print ' | ';*/
- /*
- if ($showweather)
+ foreach($valid_dashboardlines as $board)
{
- $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.=' | ';
- $showweather=0;
- }*/
- $boxwork .='
';
- $boxwork .="\n";
+ if (empty($boad->nbtodo)) $nbworkboardempty++;
+
+ $var=!$var;
+ $boxwork .= '| '.$board->img.' '.$board->label.' | ';
+ $boxwork .= ''.$board->nbtodo.' | ';
+ $boxwork .= '';
+ $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 .= '';
+ $boxwork .= '';
+ $boxwork .= $board->nbtodolate;
+ $boxwork .= '';
+ $boxwork .= '';
+ $boxwork .=' | ';
+ $boxwork .='';
+ if ($board->nbtodolate > 0) $boxwork .=img_picto($textlate, "warning", 'class="valignmiddle"').' ';
+ $boxwork .=' | ';
+ /*print '';
+ print ' (>'.ceil($board->warning_delay).' '.$langs->trans("days").')';
+ print ' | ';*/
+ /*
+ if ($showweather)
+ {
+ $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.=' | ';
+ $showweather=0;
+ }*/
+ $boxwork .='
';
+ $boxwork .="\n";
+ }
+}
+else
+{
+ $boxwork.='';
+ $boxwork.='| ';
+ $boxwork.=$langs->trans("NoOpenedElementToProcess");
+ $boxwork.=' | ';
+ $boxwork.='
';
}
$boxwork.='
'; // End table array of working board
diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang
index e29c8d8c8b9..9267fa16b2d 100644
--- a/htdocs/langs/en_US/main.lang
+++ b/htdocs/langs/en_US/main.lang
@@ -408,6 +408,7 @@ TotalDuration=Total duration
Summary=Summary
DolibarrStateBoard=Statistics
DolibarrWorkBoard=Work tasks board
+NoOpenedElementToProcess=No opened element to process
Available=Available
NotYetAvailable=Not yet available
NotAvailable=Not available
diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php
index 5ae8d76e456..17e77025da8 100644
--- a/htdocs/theme/eldy/style.css.php
+++ b/htdocs/theme/eldy/style.css.php
@@ -2858,6 +2858,9 @@ span.dashboardlineko {
}
.boxtable {
margin-bottom: 8px !important;
+ border-bottom-width: 1px;
+}
+.boxtablenobottom {
border-bottom-width: 0 !important;
}
.tdboxstats {
diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php
index b7da47d400c..4470cbed751 100644
--- a/htdocs/theme/md/style.css.php
+++ b/htdocs/theme/md/style.css.php
@@ -2785,6 +2785,9 @@ span.dashboardlineko {
}
.boxtable {
margin-bottom: 8px !important;
+ border-bottom-width: 1px;
+}
+.boxtablenobottom {
border-bottom-width: 0 !important;
}
.tdboxstats {