From fa536d30c019a1ddd4bbef6279160785934c4ba4 Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Fri, 2 Oct 2020 19:43:37 +0200 Subject: [PATCH] Added registration icons in service page. --- .../statoolinfos/htmlize/ServicePage.java | 22 +++++++++++++++++++ .../statoolinfos/htmlize/service.xhtml | 7 ++++++ 2 files changed, 29 insertions(+) diff --git a/src/fr/devinsy/statoolinfos/htmlize/ServicePage.java b/src/fr/devinsy/statoolinfos/htmlize/ServicePage.java index 4c41c07..ccce023 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/ServicePage.java +++ b/src/fr/devinsy/statoolinfos/htmlize/ServicePage.java @@ -25,6 +25,7 @@ import fr.devinsy.statoolinfos.core.Organization; import fr.devinsy.statoolinfos.core.Service; import fr.devinsy.statoolinfos.core.StatoolInfosException; import fr.devinsy.xidyn.XidynException; +import fr.devinsy.xidyn.data.DisplayMode; import fr.devinsy.xidyn.data.TagDataManager; import fr.devinsy.xidyn.presenters.PresenterUtils; @@ -60,6 +61,27 @@ public class ServicePage data.setEscapedContent("serviceName", service.getName()); data.setEscapedContent("serviceDescription", service.getDescription()); + if (service.isRegistrationNone()) + { + data.setAttribute("registrationNoneImg", "class", "toto"); + data.getIdData("registrationNoneImg").getAttribute("class").setMode(DisplayMode.REPLACE); + } + if (service.isRegistrationFree()) + { + data.setAttribute("registrationFreeImg", "class", ""); + data.getIdData("registrationFreeImg").getAttribute("class").setMode(DisplayMode.REPLACE); + } + if (service.isRegistrationMember()) + { + data.setAttribute("registrationMemberImg", "class", ""); + data.getIdData("registrationMemberImg").getAttribute("class").setMode(DisplayMode.REPLACE); + } + if (service.isRegistrationClient()) + { + data.setAttribute("registrationClientImg", "class", ""); + data.getIdData("registrationClientImg").getAttribute("class").setMode(DisplayMode.REPLACE); + } + String content = PresenterUtils.dynamize("/fr/devinsy/statoolinfos/htmlize/service.xhtml", data).toString(); BreadcrumbTrail trail = new BreadcrumbTrail(); diff --git a/src/fr/devinsy/statoolinfos/htmlize/service.xhtml b/src/fr/devinsy/statoolinfos/htmlize/service.xhtml index 9ca4a12..a975858 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/service.xhtml +++ b/src/fr/devinsy/statoolinfos/htmlize/service.xhtml @@ -17,6 +17,13 @@
Raw
+ +
+ + + + +

Bla bla description