From 4bc2864a6f86b7fb41732a5b98524a4a6bc02dc8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 23 Mar 2017 19:26:28 +0100 Subject: [PATCH] Better board for open items --- htdocs/index.php | 80 +++++++++++++++------------------ htdocs/projet/info.php | 2 +- htdocs/theme/eldy/style.css.php | 51 ++++++++++++++++----- htdocs/theme/md/style.css.php | 50 ++++++++++++++++----- 4 files changed, 115 insertions(+), 68 deletions(-) diff --git a/htdocs/index.php b/htdocs/index.php index 75ee74144f2..86ea10b801f 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -337,7 +337,7 @@ if (empty($user->societe_id)) $text=$langs->trans($titres[$key]); $boxstat.=''; $boxstat.='
'; - $boxstat.=''.img_object("",$icons[$key]).' '.$text.'
'; + $boxstat.=''.img_object("",$icons[$key]).' '.$text.'
'; $boxstat.=''.$board->nb[$val].''; $boxstat.='
'; $boxstat.='
'; @@ -530,33 +530,26 @@ $boxwork.='
'; $boxwork.=''."\n"; $boxwork.=''; $boxwork.=''; -$boxwork.=''; -$boxwork.=''; -$boxwork.=''; +//$boxwork.=''; +//$boxwork.=''; +//$boxwork.=''; //print ''; //if ($showweather) $boxwork.=''; $boxwork.=''."\n"; if ($showweather) -{ - $var=!$var; +{/* $boxwork.=''; - $boxwork.=''; - /*$boxwork.='';*/ - $boxwork.=''; - $showweather=0; + $boxwork.='';*/ } +$boxwork.=''; - $boxwork .= ''; - $boxwork .= ''; - $boxwork .=''; - /*print '';*/ - /* - if ($showweather) + + $boxwork .='
'; + $boxwork .= '
'; + $boxwork .= $board->img.' '.$board->label.'
'; + $boxwork .= ''.$board->nbtodo.''; + $boxwork .= '
'; + if ($board->nbtodolate > 0) { - $boxwork.='
'; - $showweather=0; - }*/ - $boxwork .=''; + $boxwork .= ''; + } + $boxwork.=''; $boxwork .="\n"; } + + $boxwork .='
'; + $boxwork .='
'; + $boxwork .='
'; + $boxwork .='
'; + $boxwork .='
'; + $boxwork .='
'; } else { @@ -610,6 +598,8 @@ else $boxwork.=''; } +$boxwork.=''; + $boxwork.='
'.$langs->trans("DolibarrWorkBoard").''.$langs->trans("Number").''.$form->textwithpicto($langs->trans("Late"),$langs->trans("LateDesc")).' '.$langs->trans("Number").''.$form->textwithpicto($langs->trans("Late"),$langs->trans("LateDesc")).'   
'; - //$boxwork.=$langs->trans("Meteo"); - //$boxwork.=''; + $boxwork.=''; $text=''; if ($totallate > 0) $text=$langs->transnoentitiesnoconv("WarningYouHaveAtLeastOneTaskLate").' ('.$langs->transnoentitiesnoconv("NActionsLate",$totallate).')'; $options='height="64px"'; $boxwork.=showWeather($totallate,$text,$options); $boxwork.=''; - if ($board->nbtodolate > 0) $boxwork.=img_picto($textlate,"warning"); - else $boxwork.=' '; - $boxwork.='
'; // Show dashboard $nbworkboardempty=0; @@ -565,41 +558,36 @@ if (! empty($valid_dashboardlines)) foreach($valid_dashboardlines as $board) { if (empty($boad->nbtodo)) $nbworkboardempty++; - - $var=!$var; - $boxwork .= '
'.$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 .= ''; - $boxwork .= ''; - $boxwork .= $board->nbtodolate; - $boxwork .= ''; - $boxwork .= ''; - $boxwork .=''; - if ($board->nbtodolate > 0) $boxwork .=img_picto($textlate, "warning", 'class="valignmiddle"').' '; - $boxwork .=''; - print ' (>'.ceil($board->warning_delay).' '.$langs->trans("days").')'; - print ''; - $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.='
'; // End table array of working board $boxwork.='
'; diff --git a/htdocs/projet/info.php b/htdocs/projet/info.php index 65a95e232ff..3206fd51244 100644 --- a/htdocs/projet/info.php +++ b/htdocs/projet/info.php @@ -107,7 +107,7 @@ llxHeader("",$title,$help_url); $head = project_prepare_head($object); -dol_fiche_head($head, 'agenda', $langs->trans("Project"), 0, ($object->public?'projectpub':'project')); +dol_fiche_head($head, 'agenda', $langs->trans("Project"), -1, ($object->public?'projectpub':'project')); // Project card diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index a394eae4312..aaa9254987b 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -677,6 +677,11 @@ div.fiche>form>div.div-table-responsive { } .thumbstat { flex: 1 1 120px; +} +.thumbstat150 { + flex: 1 1 150px; +} +.thumbstat, thumbstat150 { /* flex-grow: 1; */ /* flex-shrink: 1; */ /* flex-basis: 140px; */ @@ -2854,26 +2859,37 @@ div.tabBar .noborder { .ficheaddleft div.boxstats { border: none; } -.boxstats { +.boxstatsborder { + border: 1px solid #CCC !important; +} +.boxstats, .boxstats130 { display: inline-block; margin: 3px; - padding: 3px; - /*-moz-box-shadow: 3px 3px 4px #DDD; - -webkit-box-shadow: 3px 3px 4px #DDD; - box-shadow: 3px 3px 4px #DDD; - margin-bottom: 8px !important;*/ border: 1px solid #CCC; text-align: center; border-radius: 2px; - +} +.boxstats, .boxstats130, .boxstatscontent { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; - width: 115px; } +.boxstats { + padding: 3px; + width: 105px; +} +.boxstats130 { + width: 135px; + height: 48px; + padding: 3px +} +.boxstatscontent { + padding: 3px; +} + @media only screen and (max-width: 767px) { - .boxstats { + .boxstats, .boxstats130 { width: 100px; } } @@ -2890,15 +2906,25 @@ span.boxstatsindicator { font-weight: normal; } span.dashboardlineindicator, span.dashboardlineindicatorlate { - font-size: 120%; + font-size: 130%; font-weight: normal; } +.dashboardlineindicatorlate img { + width: 16px; +} span.dashboardlineok { color: #008800; } span.dashboardlineko { color: #880000; - font-weight: bold; + /* font-weight: bold; */ + font-size: 100%; +} +.dashboardlinelatecoin { + float: right; + position: relative; + text-align: right; + top: -22px } .boxtable { margin-bottom: 8px !important; @@ -2910,6 +2936,9 @@ span.dashboardlineko { .tdboxstats { text-align: center; } +a.valignmiddle.dashboardlineindicator { + line-height: 30px; +} .box { padding-right: 0px; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 55741cdcffd..994a5be6924 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -684,6 +684,11 @@ div.fiche>form>div.div-table-responsive { } .thumbstat { flex: 1 1 120px; +} +.thumbstat150 { + flex: 1 1 150px; +} +.thumbstat, thumbstat150 { /* flex-grow: 1; */ /* flex-shrink: 1; */ /* flex-basis: 140px; */ @@ -2769,27 +2774,33 @@ div .tdtop { .ficheaddleft div.boxstats { border: none; } -.boxstats { +.boxstatsborder { + border: 1px solid #CCC !important; +} +.boxstats, .boxstats130 { display: inline-block; margin: 3px; - padding: 3px; - /*-moz-box-shadow: 3px 3px 4px #f4f4f4; - -webkit-box-shadow: 3px 3px 4px #f4f4f4; - box-shadow: 3px 3px 4px #f4f4f4; - margin-bottom: 8px !important;*/ border: 1px solid #CCC; text-align: center; border-radius: 2px; - min-height: 38px; - +} +.boxstats, .boxstats130, .boxstatscontent { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; - width: 115px; +} +.boxstats { + padding: 3px; + width: 105px; +} +.boxstats130 { + width: 135px; + height: 48px; + padding: 3px } @media only screen and (max-width: 767px) { - .boxstats { + .boxstats, .boxstats130 { width: 100px; } } @@ -2806,7 +2817,10 @@ span.boxstatsindicator { } span.dashboardlineindicator, span.dashboardlineindicatorlate { font-size: 120%; - font-weight: bold; + font-weight: normal; +} +.dashboardlineindicatorlate img { + width: 16px; } span.dashboardlineok { color: #008800; @@ -2815,6 +2829,16 @@ span.dashboardlineko { color: #880000; font-weight: bold; } +.dashboardlinelatecoin { + float: right; + position: relative; + text-align: right; + top: -22px +} +.boxtable { + margin-bottom: 8px !important; + border-bottom-width: 1px; +} .boxtable { margin-bottom: 8px !important; border-bottom-width: 1px; @@ -2825,6 +2849,10 @@ span.dashboardlineko { .tdboxstats { text-align: center; } +a.valignmiddle.dashboardlineindicator { + line-height: 30px; +} + .box { padding-right: 0px;