Improved infos in organization page.
This commit is contained in:
parent
8b3918fae4
commit
5c289b8a4e
5 changed files with 170 additions and 9 deletions
|
@ -1,3 +1,3 @@
|
||||||
#Build Number for ANT. Do not edit!
|
#Build Number for ANT. Do not edit!
|
||||||
#Sun Sep 13 02:31:30 CEST 2020
|
#Sun Oct 04 03:50:10 CEST 2020
|
||||||
build.number=1
|
build.number=2
|
||||||
|
|
|
@ -68,6 +68,31 @@ public class Organization extends PathPropertyList
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getContactEmail()
|
||||||
|
{
|
||||||
|
String result;
|
||||||
|
|
||||||
|
result = get("organization.contact.email");
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the contact website.
|
||||||
|
*
|
||||||
|
* @return the contact website
|
||||||
|
*/
|
||||||
|
public String getContactWebsite()
|
||||||
|
{
|
||||||
|
String result;
|
||||||
|
|
||||||
|
result = get("organization.contact.url");
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the crawled date.
|
* Gets the crawled date.
|
||||||
*
|
*
|
||||||
|
@ -93,6 +118,21 @@ public class Organization extends PathPropertyList
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the end date.
|
||||||
|
*
|
||||||
|
* @return the end date
|
||||||
|
*/
|
||||||
|
public String getEndDate()
|
||||||
|
{
|
||||||
|
String result;
|
||||||
|
|
||||||
|
result = get("organization.enddate", "organization.deathdate");
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
public Federation getFederation()
|
public Federation getFederation()
|
||||||
{
|
{
|
||||||
return this.federation;
|
return this.federation;
|
||||||
|
@ -118,6 +158,21 @@ public class Organization extends PathPropertyList
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the legal website.
|
||||||
|
*
|
||||||
|
* @return the legal website
|
||||||
|
*/
|
||||||
|
public String getLegalWebsite()
|
||||||
|
{
|
||||||
|
String result;
|
||||||
|
|
||||||
|
result = get("organization.legal.url", "organization.legal");
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the logo URL.
|
* Gets the logo URL.
|
||||||
*
|
*
|
||||||
|
@ -178,6 +233,37 @@ public class Organization extends PathPropertyList
|
||||||
return this.services;
|
return this.services;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the start date.
|
||||||
|
*
|
||||||
|
* @return the start date
|
||||||
|
*/
|
||||||
|
public String getStartDate()
|
||||||
|
{
|
||||||
|
String result;
|
||||||
|
|
||||||
|
result = get("organization.startdate", "organization.birthdate");
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the technical doc website.
|
||||||
|
*
|
||||||
|
* @return the technical doc website
|
||||||
|
*/
|
||||||
|
public String getTechnicalDocWebsite()
|
||||||
|
{
|
||||||
|
String result;
|
||||||
|
|
||||||
|
result = get("organization.documentation.technical", "organization.documentationtechnical.url", "organization.technical", "organization.technical.url", "service.guide.technical",
|
||||||
|
"organization.guide.technical.url");
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the technical name.
|
* Gets the technical name.
|
||||||
*
|
*
|
||||||
|
@ -208,6 +294,24 @@ public class Organization extends PathPropertyList
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the user doc website.
|
||||||
|
*
|
||||||
|
* @return the user doc website
|
||||||
|
*/
|
||||||
|
public String getUserDocWebsite()
|
||||||
|
{
|
||||||
|
String result;
|
||||||
|
|
||||||
|
result = get("organization.documentation", "organization.documentation.url", "organization.documentation.user", "organization.documentation.user.url", "service.documentation.tutorial",
|
||||||
|
"organization.documentation.tutorial.url",
|
||||||
|
"organization.guide.user",
|
||||||
|
"organization.guide.user.url");
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets the website.
|
* Gets the website.
|
||||||
*
|
*
|
||||||
|
|
|
@ -18,12 +18,14 @@
|
||||||
*/
|
*/
|
||||||
package fr.devinsy.statoolinfos.htmlize;
|
package fr.devinsy.statoolinfos.htmlize;
|
||||||
|
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import fr.devinsy.statoolinfos.core.Organization;
|
import fr.devinsy.statoolinfos.core.Organization;
|
||||||
import fr.devinsy.statoolinfos.core.StatoolInfosException;
|
import fr.devinsy.statoolinfos.core.StatoolInfosException;
|
||||||
import fr.devinsy.xidyn.XidynException;
|
import fr.devinsy.xidyn.XidynException;
|
||||||
|
import fr.devinsy.xidyn.data.DisplayMode;
|
||||||
import fr.devinsy.xidyn.data.TagDataManager;
|
import fr.devinsy.xidyn.data.TagDataManager;
|
||||||
import fr.devinsy.xidyn.presenters.PresenterUtils;
|
import fr.devinsy.xidyn.presenters.PresenterUtils;
|
||||||
|
|
||||||
|
@ -57,8 +59,48 @@ public class OrganizationPage
|
||||||
|
|
||||||
data.setAttribute("organizationLogo", "src", organization.getTechnicalName() + "-logo.png");
|
data.setAttribute("organizationLogo", "src", organization.getTechnicalName() + "-logo.png");
|
||||||
data.setEscapedContent("organizationName", organization.get("organization.name"));
|
data.setEscapedContent("organizationName", organization.get("organization.name"));
|
||||||
|
|
||||||
|
data.setEscapedContent("organizationURL", organization.getWebsite());
|
||||||
|
data.setAttribute("organizationURL", "href", organization.getWebsite());
|
||||||
|
|
||||||
data.setEscapedContent("organizationDescription", organization.get("organization.description"));
|
data.setEscapedContent("organizationDescription", organization.get("organization.description"));
|
||||||
|
data.setContent("organizationStartDate", StringUtils.defaultIfBlank(organization.getStartDate(), "n/a"));
|
||||||
|
data.setContent("organizationEndDate", StringUtils.defaultIfBlank(organization.getEndDate(), "n/a"));
|
||||||
data.setContent("serviceCount", organization.getServices().size());
|
data.setContent("serviceCount", organization.getServices().size());
|
||||||
|
|
||||||
|
data.setAttribute("rawLink", "href", organization.getTechnicalName() + ".properties");
|
||||||
|
|
||||||
|
if (StringUtils.isNotBlank(organization.getLegalWebsite()))
|
||||||
|
{
|
||||||
|
data.setAttribute("legalLink", "href", organization.getLegalWebsite());
|
||||||
|
data.setAttribute("legalLinkImg", "class", "");
|
||||||
|
data.getIdData("legalLinkImg").getAttribute("class").setMode(DisplayMode.REPLACE);
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(organization.getContactWebsite()))
|
||||||
|
{
|
||||||
|
data.setAttribute("contactLink", "href", organization.getContactWebsite());
|
||||||
|
data.setAttribute("contactLinkImg", "class", "");
|
||||||
|
data.getIdData("contactLinkImg").getAttribute("class").setMode(DisplayMode.REPLACE);
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(organization.getContactEmail()))
|
||||||
|
{
|
||||||
|
data.setAttribute("emailLink", "href", "mailto:" + organization.getContactEmail());
|
||||||
|
data.setAttribute("emailLinkImg", "class", "");
|
||||||
|
data.getIdData("emailLinkImg").getAttribute("class").setMode(DisplayMode.REPLACE);
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(organization.getUserDocWebsite()))
|
||||||
|
{
|
||||||
|
data.setAttribute("userDocLink", "href", organization.getUserDocWebsite());
|
||||||
|
data.setAttribute("userDocLinkImg", "class", "");
|
||||||
|
data.getIdData("userDocLinkImg").getAttribute("class").setMode(DisplayMode.REPLACE);
|
||||||
|
}
|
||||||
|
if (StringUtils.isNotBlank(organization.getTechnicalDocWebsite()))
|
||||||
|
{
|
||||||
|
data.setAttribute("technicalDocLink", "href", organization.getTechnicalDocWebsite());
|
||||||
|
data.setAttribute("technicalDocLinkImg", "class", "");
|
||||||
|
data.getIdData("technicalDocLinkImg").getAttribute("class").setMode(DisplayMode.REPLACE);
|
||||||
|
}
|
||||||
|
|
||||||
data.setContent("serviceListView", ServiceListView.build(organization.getServices().sortByName()));
|
data.setContent("serviceListView", ServiceListView.build(organization.getServices().sortByName()));
|
||||||
|
|
||||||
String content = PresenterUtils.dynamize("/fr/devinsy/statoolinfos/htmlize/organization.xhtml", data).toString();
|
String content = PresenterUtils.dynamize("/fr/devinsy/statoolinfos/htmlize/organization.xhtml", data).toString();
|
||||||
|
|
|
@ -12,12 +12,27 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div class="center">
|
<div class="center">
|
||||||
<h2><img id="organizationLogo" src="#" style="width: 100px; heigth: 100px; vertical-align: middle;"/> <span id="organizationName">Organization name</span></h2>
|
<div class="row center" style="border: 0px solid yellow;">
|
||||||
|
<div class="column" style="border: 0px solid red;">
|
||||||
<div style="margin: 5px;">
|
<img id="organizationLogo" src="#" style="width: 100px; height: 100px;"/>
|
||||||
<a id="organizationRawButton" href="#" class="button">Raw</a>
|
|
||||||
</div>
|
</div>
|
||||||
<p id="organizationDescription">n/a</p>
|
<div class="column" style="border: 0px solid red; max-width: 500px;">
|
||||||
|
<div class="content_title"><a id="organizationName" href="#">n/a</a></div>
|
||||||
|
<div class="content_subtitle"><a id="organizationURL" href="#" style="text-decoration: none;">n/a</a></div>
|
||||||
|
<p id="organizationDescription">Description absente…</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div>Date d'entrée : <span id="organizationStartDate">n/a</span> – Date de sortie : <span id="organizationEndDate">n/a</span></div>
|
||||||
|
<div class="content_infos" style="margin: 5px;">
|
||||||
|
Liens :
|
||||||
|
<a id="legalLink" href="#"><img id="legalLinkImg" src="circle-icons/color/ribbon.png" class="disabled" title="Mentions légales"/></a>
|
||||||
|
<a id="contactLink" href="#"><img id="contactLinkImg" src="circle-icons/color/contacts.png" class="disabled" title="Page web de contact"/></a>
|
||||||
|
<a id="emailLink" href="#"><img id="emailLinkImg" src="circle-icons/color/mail.png" class="disabled" title="Courriel de contact/support"/></a>
|
||||||
|
<a id="userDocLink" href="#"><img id="userDocLinkImg" src="circle-icons/color/bookshelf.png" class="disabled" title="Documentation"/></a>
|
||||||
|
<a id="technicalDocLink" href="#"><img id="technicalDocLinkImg" src="circle-icons/color/tools.png" class="disabled" title="Documentation technique"/></a>
|
||||||
|
<a id="rawLink" href="#"><img id="rawLinkImg" src="circle-icons/mono/document.png" title="Fichier propriétés"/></a>
|
||||||
|
</div>
|
||||||
|
<br/>
|
||||||
<div>Nombre de services : <span id="serviceCount">n/a</span></div>
|
<div>Nombre de services : <span id="serviceCount">n/a</span></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="serviceListView" />
|
<div id="serviceListView" />
|
||||||
|
|
|
@ -34,8 +34,8 @@
|
||||||
<div class="content_infos" style="margin: 5px;">
|
<div class="content_infos" style="margin: 5px;">
|
||||||
Liens :
|
Liens :
|
||||||
<a id="legalLink" href="#"><img id="legalLinkImg" src="circle-icons/color/ribbon.png" class="disabled" title="Mentions légales"/></a>
|
<a id="legalLink" href="#"><img id="legalLinkImg" src="circle-icons/color/ribbon.png" class="disabled" title="Mentions légales"/></a>
|
||||||
<a id="contactLink" href="#"><img id="contactLinkImg" src="circle-icons/color/contacts.png" title="Page web de contact"/></a>
|
<a id="contactLink" href="#"><img id="contactLinkImg" src="circle-icons/color/contacts.png" class="disabled" title="Page web de contact"/></a>
|
||||||
<a id="emailLink" href="#"><img id="emailLinkImg" src="circle-icons/color/mail.png" title="Courriel de contact/support"/></a>
|
<a id="emailLink" href="#"><img id="emailLinkImg" src="circle-icons/color/mail.png" class="disabled" title="Courriel de contact/support"/></a>
|
||||||
<a id="userDocLink" href="#"><img id="userDocLinkImg" src="circle-icons/color/bookshelf.png" class="disabled" title="Documentation"/></a>
|
<a id="userDocLink" href="#"><img id="userDocLinkImg" src="circle-icons/color/bookshelf.png" class="disabled" title="Documentation"/></a>
|
||||||
<a id="technicalDocLink" href="#"><img id="technicalDocLinkImg" src="circle-icons/color/tools.png" class="disabled" title="Documentation technique"/></a>
|
<a id="technicalDocLink" href="#"><img id="technicalDocLinkImg" src="circle-icons/color/tools.png" class="disabled" title="Documentation technique"/></a>
|
||||||
<a id="rawLink" href="#"><img id="rawLinkImg" src="circle-icons/mono/document.png" title="Fichier propriétés"/></a>
|
<a id="rawLink" href="#"><img id="rawLinkImg" src="circle-icons/mono/document.png" title="Fichier propriétés"/></a>
|
||||||
|
|
Loading…
Reference in a new issue