diff --git a/libreplan-webapp/src/main/java/org/libreplan/web/dashboard/DashboardController.java b/libreplan-webapp/src/main/java/org/libreplan/web/dashboard/DashboardController.java index af68cd34d..f66c4abd6 100644 --- a/libreplan-webapp/src/main/java/org/libreplan/web/dashboard/DashboardController.java +++ b/libreplan-webapp/src/main/java/org/libreplan/web/dashboard/DashboardController.java @@ -101,11 +101,18 @@ public class DashboardController extends GenericForwardComposer { private void renderOvertimeRatio() { lblOvertimeRatio.setValue(String.format("%.2f", dashboardModel .getOvertimeRatio().doubleValue())); + String valueMeaning = (dashboardModel.getOvertimeRatio().doubleValue() > 1) ? "negative" + : "positive"; + lblOvertimeRatio.setSclass("dashboard-label-remarked " + valueMeaning); } private void renderAvailabilityRatio() { lblAvailabilityRatio.setValue(String.format("%.2f", dashboardModel .getAvailabilityRatio().doubleValue())); + String valueMeaning = (dashboardModel.getAvailabilityRatio() + .doubleValue() > 1) ? "negative" : "positive"; + lblAvailabilityRatio.setSclass("dashboard-label-remarked " + + valueMeaning); } private void renderCostStatus(Order order) { diff --git a/libreplan-webapp/src/main/webapp/dashboard/css/dashboard.css b/libreplan-webapp/src/main/webapp/dashboard/css/dashboard.css index 18c83fd45..52339f08d 100644 --- a/libreplan-webapp/src/main/webapp/dashboard/css/dashboard.css +++ b/libreplan-webapp/src/main/webapp/dashboard/css/dashboard.css @@ -13,10 +13,28 @@ } .dashboard-label-remarked { - font-size: 1em; + color: #666; + font-family: Trebuchet MS,Arial,Helvetica,sans-serif; + font-size: 16px; font-weight: bold; } +.dashboard-label-remarked.positive, +.dashboard-label-remarked.negative { + background-position: 100%; + background-repeat: no-repeat; + padding-right: 25px; + background-size: 25px; +} + +.dashboard-label-remarked.negative { + background-image: url('../img/value-meaning-negative.png'); +} + +.dashboard-label-remarked.positive { + background-image: url('../img/value-meaning-positive.png'); +} + .dashboard-box { border: solid 2px #9B9B9B; background: #fffdf6; diff --git a/libreplan-webapp/src/main/webapp/dashboard/img/value-meaning-negative.png b/libreplan-webapp/src/main/webapp/dashboard/img/value-meaning-negative.png new file mode 100644 index 000000000..8eb55a7c7 Binary files /dev/null and b/libreplan-webapp/src/main/webapp/dashboard/img/value-meaning-negative.png differ diff --git a/libreplan-webapp/src/main/webapp/dashboard/img/value-meaning-positive.png b/libreplan-webapp/src/main/webapp/dashboard/img/value-meaning-positive.png new file mode 100644 index 000000000..581071ba8 Binary files /dev/null and b/libreplan-webapp/src/main/webapp/dashboard/img/value-meaning-positive.png differ