From 51b656d434573bcae2fc7dc558952dfaf5c09199 Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Thu, 11 Feb 2021 03:00:58 +0100 Subject: [PATCH] Improved display of date in organization header page. --- .../devinsy/statoolinfos/htmlize/OrganizationPage.java | 10 ++++++++++ src/fr/devinsy/statoolinfos/htmlize/organization.xhtml | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/fr/devinsy/statoolinfos/htmlize/OrganizationPage.java b/src/fr/devinsy/statoolinfos/htmlize/OrganizationPage.java index f9efc6e..e674c53 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/OrganizationPage.java +++ b/src/fr/devinsy/statoolinfos/htmlize/OrganizationPage.java @@ -147,13 +147,19 @@ public class OrganizationPage data.setEscapedContent("organizationDescription", organization.get("organization.description")); + data.setEscapedContent("organizationMemberOfName", StringUtils.defaultIfBlank(organization.getFederation().getName(), "n/a")); data.setContent("organizationStartDate", StringUtils.defaultIfBlank(organization.getStartDate(), "n/a")); data.setContent("organizationEndDate", StringUtils.defaultIfBlank(organization.getEndDate(), "n/a")); data.setContent("organizationAge", StringUtils.defaultIfBlank(organization.getAge(), "n/a")); if (StringUtils.isBlank(organization.getEndDate())) { + data.setContent("organizationMemberOfWord", "depuis"); data.setAttribute("organizationEndDateData", "style", "display: none;"); } + else + { + data.setContent("organizationMemberOfWord", ":"); + } data.setContent("organizationMemberStartDate", StringUtils.defaultIfBlank(organization.getMemberStartDate(), "n/a")); data.setContent("organizationMemberEndDate", StringUtils.defaultIfBlank(organization.getMemberEndDate(), "n/a")); @@ -162,6 +168,10 @@ public class OrganizationPage { data.setAttribute("organizationMemberEndDateData", "style", "display: none;"); } + else + { + data.setContent("organizationStartDateWord", ""); + } { try diff --git a/src/fr/devinsy/statoolinfos/htmlize/organization.xhtml b/src/fr/devinsy/statoolinfos/htmlize/organization.xhtml index b00678d..48aa29a 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/organization.xhtml +++ b/src/fr/devinsy/statoolinfos/htmlize/organization.xhtml @@ -22,8 +22,8 @@

Description absente…

-
Date d'entrée : n/a – Date de sortie : n/a (n/a)
-
Date de création : n/a – Date d'arrêt : n/a (n/a)
+
Membre n/a depuis/: n/an/a (n/a)
+
Depuis n/a – Date d'arrêt : n/a (n/a)
Liens :