From 795d7a2342e32bf6693f2ba6b3a0ff2f0b7ab8d1 Mon Sep 17 00:00:00 2001 From: Fabrice Gangler Date: Mon, 5 Jun 2017 06:35:03 +0200 Subject: [PATCH] fixed #55 (2) - Added "back to the homepage" link when result has errors --- .../contrastFinder/webapp/controller/IndexController.java | 1 + .../src/main/webapp/WEB-INF/template/header.jspf | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/contrast-finder-webapp/src/main/java/org/asqatasun/contrastFinder/webapp/controller/IndexController.java b/contrast-finder-webapp/src/main/java/org/asqatasun/contrastFinder/webapp/controller/IndexController.java index e6c67159..50c6b9fe 100644 --- a/contrast-finder-webapp/src/main/java/org/asqatasun/contrastFinder/webapp/controller/IndexController.java +++ b/contrast-finder-webapp/src/main/java/org/asqatasun/contrastFinder/webapp/controller/IndexController.java @@ -164,6 +164,7 @@ public String getPageResultFromGet( final Model model, model.addAttribute("defaultAlgorithm", defaultAlgorithm); model.addAttribute("algo", colorModel.getAlgo()); if (result.hasErrors()) { + model.addAttribute("errorResult", "result.hasErrors"); return mainPageView; } else { diff --git a/contrast-finder-webapp/src/main/webapp/WEB-INF/template/header.jspf b/contrast-finder-webapp/src/main/webapp/WEB-INF/template/header.jspf index 21d6cccf..9b983952 100644 --- a/contrast-finder-webapp/src/main/webapp/WEB-INF/template/header.jspf +++ b/contrast-finder-webapp/src/main/webapp/WEB-INF/template/header.jspf @@ -50,7 +50,7 @@