diff --git a/src/fr/devinsy/statoolinfos/core/Organization.java b/src/fr/devinsy/statoolinfos/core/Organization.java index 287e5b1..70eb328 100644 --- a/src/fr/devinsy/statoolinfos/core/Organization.java +++ b/src/fr/devinsy/statoolinfos/core/Organization.java @@ -158,6 +158,21 @@ public class Organization extends PathPropertyList return this.federation; } + /** + * Gets the funkwhale webpage. + * + * @return the funkwhale webpage + */ + public String getFunkwhaleWebpage() + { + String result; + + result = get("organization.socialnetworks.funkwhale", "organization.socialnetworks.funkwhale.url"); + + // + return result; + } + public File getInputFile() { return this.inputFile; @@ -233,6 +248,21 @@ public class Organization extends PathPropertyList return result; } + /** + * Gets the mobilizon webpage. + * + * @return the mobilizon webpage + */ + public String getMobilizonWebpage() + { + String result; + + result = get("organization.socialnetworks.mobilizon", "organization.socialnetworks.mobilizon.url"); + + // + return result; + } + /** * Gets the name. * @@ -248,6 +278,36 @@ public class Organization extends PathPropertyList return result; } + /** + * Gets the peertube webpage. + * + * @return the peertube webpage + */ + public String getPeertubeWebpage() + { + String result; + + result = get("organization.socialnetworks.peertube", "organization.socialnetworks.peertube.url"); + + // + return result; + } + + /** + * Gets the pixelfed webpage. + * + * @return the pixelfed webpage + */ + public String getPixelfedWebpage() + { + String result; + + result = get("organization.socialnetworks.pixelfed", "organization.socialnetworks.pixelfed.url"); + + // + return result; + } + /** * Gets the service count. * diff --git a/src/fr/devinsy/statoolinfos/htmlize/Htmlizer.java b/src/fr/devinsy/statoolinfos/htmlize/Htmlizer.java index 0e70fec..84f8d29 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/Htmlizer.java +++ b/src/fr/devinsy/statoolinfos/htmlize/Htmlizer.java @@ -133,7 +133,12 @@ public class Htmlizer // StatoolInfosUtils.copyRessource(source + "diaspora-logo.png", targetDirectory); + StatoolInfosUtils.copyRessource(source + "funkwhale-logo.png", targetDirectory); + StatoolInfosUtils.copyRessource(source + "funkwhale-logo2.png", targetDirectory); StatoolInfosUtils.copyRessource(source + "mastodon-logo.png", targetDirectory); + StatoolInfosUtils.copyRessource(source + "mobilizon-logo.png", targetDirectory); + StatoolInfosUtils.copyRessource(source + "peertube-logo.png", targetDirectory); + StatoolInfosUtils.copyRessource(source + "pixelfed-logo.png", targetDirectory); // File color = new File(targetDirectory, "circle-icons/color"); diff --git a/src/fr/devinsy/statoolinfos/htmlize/SocialNetworksPage.java b/src/fr/devinsy/statoolinfos/htmlize/SocialNetworksPage.java index 70baa6d..95141d4 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/SocialNetworksPage.java +++ b/src/fr/devinsy/statoolinfos/htmlize/SocialNetworksPage.java @@ -77,6 +77,13 @@ public class SocialNetworksPage data.setAttribute("organizationListLine", index, "organizationListLineDiasporaLink", "href", organization.getDiasporaWebpage()); } + if (StringUtils.isNotBlank(organization.getFunkwhaleWebpage())) + { + data.setAttribute("organizationListLine", index, "organizationListLineFunkwhaleImg", "class", ""); + data.getIdData("organizationListLine", index, "organizationListLineFunkwhaleImg").getAttribute("class").setMode(DisplayMode.REPLACE); + data.setAttribute("organizationListLine", index, "organizationListLineFunkwhaleLink", "href", organization.getFunkwhaleWebpage()); + } + if (StringUtils.isNotBlank(organization.getMastodonWebpage())) { data.setAttribute("organizationListLine", index, "organizationListLineMastodonImg", "class", ""); @@ -84,6 +91,27 @@ public class SocialNetworksPage data.setAttribute("organizationListLine", index, "organizationListLineMastodonLink", "href", organization.getMastodonWebpage()); } + if (StringUtils.isNotBlank(organization.getMobilizonWebpage())) + { + data.setAttribute("organizationListLine", index, "organizationListLineMobilizonImg", "class", ""); + data.getIdData("organizationListLine", index, "organizationListLineMobilizonImg").getAttribute("class").setMode(DisplayMode.REPLACE); + data.setAttribute("organizationListLine", index, "organizationListLineMobilizonLink", "href", organization.getMobilizonWebpage()); + } + + if (StringUtils.isNotBlank(organization.getPixelfedWebpage())) + { + data.setAttribute("organizationListLine", index, "organizationListLinePixelfedImg", "class", ""); + data.getIdData("organizationListLine", index, "organizationListLinePixelfedImg").getAttribute("class").setMode(DisplayMode.REPLACE); + data.setAttribute("organizationListLine", index, "organizationListLinePixelfedLink", "href", organization.getPixelfedWebpage()); + } + + if (StringUtils.isNotBlank(organization.getPeertubeWebpage())) + { + data.setAttribute("organizationListLine", index, "organizationListLinePeertubeImg", "class", ""); + data.getIdData("organizationListLine", index, "organizationListLinePeertubeImg").getAttribute("class").setMode(DisplayMode.REPLACE); + data.setAttribute("organizationListLine", index, "organizationListLinePeertubeLink", "href", organization.getPeertubeWebpage()); + } + index += 1; } diff --git a/src/fr/devinsy/statoolinfos/htmlize/socialNetworks.xhtml b/src/fr/devinsy/statoolinfos/htmlize/socialNetworks.xhtml index 23b2539..858f0d2 100644 --- a/src/fr/devinsy/statoolinfos/htmlize/socialNetworks.xhtml +++ b/src/fr/devinsy/statoolinfos/htmlize/socialNetworks.xhtml @@ -26,9 +26,17 @@
Nom du membre | URL | -Réseaux sociaux | +Réseaux sociaux | n/a | + | + | + | + |
---|