From c486b99cf9ea3425a29bad059d121cca92ee1414 Mon Sep 17 00:00:00 2001 From: "Christian P. MOMON" Date: Wed, 21 Oct 2020 02:51:26 +0200 Subject: [PATCH] Improved property checker. --- .../statoolinfos/checker/PropertyChecker.java | 4 ++-- .../statoolinfos/htmlize/CategoriesView.java | 22 +++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/fr/devinsy/statoolinfos/checker/PropertyChecker.java b/src/fr/devinsy/statoolinfos/checker/PropertyChecker.java index 03f1972..6468859 100644 --- a/src/fr/devinsy/statoolinfos/checker/PropertyChecker.java +++ b/src/fr/devinsy/statoolinfos/checker/PropertyChecker.java @@ -90,8 +90,8 @@ public class PropertyChecker this.organizationRules.add("organization.contact.email", EMAIL, PropertyMode.WISHED); this.organizationRules.add("organization.legal", URL, PropertyMode.WISHED); this.organizationRules.add("organization.legal.url", URL, PropertyMode.WISHED); - this.organizationRules.add("organization.technical", URL, PropertyMode.WISHED); - this.organizationRules.add("organization.technical.url", URL, PropertyMode.WISHED); + this.organizationRules.add("organization.guide.user", URL, PropertyMode.WISHED); + this.organizationRules.add("organization.guide.technical", URL, PropertyMode.WISHED); this.organizationRules.add("organization.startdate", DATE, PropertyMode.WISHED); this.organizationRules.add("organization.enddate", DATE, PropertyMode.OPTIONAL); diff --git a/src/fr/devinsy/statoolinfos/htmlize/CategoriesView.java b/src/fr/devinsy/statoolinfos/htmlize/CategoriesView.java index 7a6bf1d..9c05d86 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/CategoriesView.java +++ b/src/fr/devinsy/statoolinfos/htmlize/CategoriesView.java @@ -68,25 +68,25 @@ public class CategoriesView for (Category category : categories) { data.setAttribute("category", index, "categoryLink", "href", "category-" + category.getTechnicalName() + ".xhtml"); - data.setAttribute("category", index, "categoryLink", "title", category.getDescription()); - if ((mode == Mode.ALL) || (mode == Mode.ICONS_ONLY)) + if (mode == Mode.ALL) { + data.setAttribute("category", index, "categoryLink", "title", category.getDescription()); data.setAttribute("category", index, "categoryLogo", "src", category.getLogoPath()); - } - else - { - data.setAttribute("category", index, "categoryLogo", "class", "xid:nodisplay"); - } - - if ((mode == Mode.ALL) || (mode == Mode.LABELS_ONLY)) - { data.setEscapedContent("category", index, "categoryName", category.getName()); } - else + else if (mode == Mode.ICONS_ONLY) { + data.setAttribute("category", index, "categoryLink", "title", category.getName()); + data.setAttribute("category", index, "categoryLogo", "src", category.getLogoPath()); data.setAttribute("category", index, "categoryName", "class", "xid:nodisplay"); } + else if (mode == Mode.LABELS_ONLY) + { + data.setAttribute("category", index, "categoryLink", "title", category.getDescription()); + data.setAttribute("category", index, "categoryLogo", "class", "xid:nodisplay"); + data.setEscapedContent("category", index, "categoryName", category.getName()); + } index += 1; }