Improved federation page design.
This commit is contained in:
parent
5c289b8a4e
commit
d8bfb9e3b8
7 changed files with 181 additions and 10 deletions
|
@ -1,3 +1,3 @@
|
|||
#Build Number for ANT. Do not edit!
|
||||
#Sun Oct 04 03:50:10 CEST 2020
|
||||
build.number=2
|
||||
#Sun Sep 13 02:31:30 CEST 2020
|
||||
build.number=1
|
||||
|
|
|
@ -86,6 +86,36 @@ public class Federation extends PathPropertyList
|
|||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the contact email.
|
||||
*
|
||||
* @return the contact email
|
||||
*/
|
||||
public String getContactEmail()
|
||||
{
|
||||
String result;
|
||||
|
||||
result = get("federation.contact.email");
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the contact website.
|
||||
*
|
||||
* @return the contact website
|
||||
*/
|
||||
public String getContactWebsite()
|
||||
{
|
||||
String result;
|
||||
|
||||
result = get("federation.contact.url");
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the crawled date.
|
||||
*
|
||||
|
@ -121,6 +151,21 @@ public class Federation extends PathPropertyList
|
|||
return this.inputFile;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the legal website.
|
||||
*
|
||||
* @return the legal website
|
||||
*/
|
||||
public String getLegalWebsite()
|
||||
{
|
||||
String result;
|
||||
|
||||
result = get("federation.legal.url", "federation.legal");
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the logo URL.
|
||||
*
|
||||
|
@ -228,6 +273,37 @@ public class Federation extends PathPropertyList
|
|||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the start date.
|
||||
*
|
||||
* @return the start date
|
||||
*/
|
||||
public String getStartDate()
|
||||
{
|
||||
String result;
|
||||
|
||||
result = get("federation.startdate", "federation.birthdate");
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the technical doc website.
|
||||
*
|
||||
* @return the technical doc website
|
||||
*/
|
||||
public String getTechnicalDocWebsite()
|
||||
{
|
||||
String result;
|
||||
|
||||
result = get("federation.documentation.technical", "federation.documentationtechnical.url", "federation.technical", "federation.technical.url", "service.guide.technical",
|
||||
"federation.guide.technical.url");
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the technical name.
|
||||
*
|
||||
|
@ -243,6 +319,39 @@ public class Federation extends PathPropertyList
|
|||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the user doc website.
|
||||
*
|
||||
* @return the user doc website
|
||||
*/
|
||||
public String getUserDocWebsite()
|
||||
{
|
||||
String result;
|
||||
|
||||
result = get("federation.documentation", "federation.documentation.url", "federation.documentation.user", "federation.documentation.user.url", "service.documentation.tutorial",
|
||||
"federation.documentation.tutorial.url",
|
||||
"federation.guide.user",
|
||||
"federation.guide.user.url");
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the website.
|
||||
*
|
||||
* @return the website
|
||||
*/
|
||||
public String getWebsite()
|
||||
{
|
||||
String result;
|
||||
|
||||
result = get("federation.website");
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setInputFile(final File inputFile)
|
||||
{
|
||||
this.inputFile = inputFile;
|
||||
|
|
|
@ -68,6 +68,11 @@ public class Organization extends PathPropertyList
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the contact email.
|
||||
*
|
||||
* @return the contact email
|
||||
*/
|
||||
public String getContactEmail()
|
||||
{
|
||||
String result;
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
*/
|
||||
package fr.devinsy.statoolinfos.htmlize;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
@ -25,6 +26,7 @@ import fr.devinsy.statoolinfos.core.Federation;
|
|||
import fr.devinsy.statoolinfos.core.Organization;
|
||||
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;
|
||||
|
||||
|
@ -58,6 +60,42 @@ public class FederationPage
|
|||
data.setAttribute("federationLogo", "src", federation.getTechnicalName() + "-logo.png");
|
||||
data.setEscapedContent("federationName", federation.getName());
|
||||
data.setEscapedContent("federationDescription", federation.getDescription());
|
||||
|
||||
data.setEscapedContent("federationURL", federation.getWebsite());
|
||||
data.setAttribute("federationURL", "href", federation.getWebsite());
|
||||
data.setContent("federationStartDate", StringUtils.defaultIfBlank(federation.getStartDate(), "n/a"));
|
||||
|
||||
if (StringUtils.isNotBlank(federation.getLegalWebsite()))
|
||||
{
|
||||
data.setAttribute("legalLink", "href", federation.getLegalWebsite());
|
||||
data.setAttribute("legalLinkImg", "class", "");
|
||||
data.getIdData("legalLinkImg").getAttribute("class").setMode(DisplayMode.REPLACE);
|
||||
}
|
||||
if (StringUtils.isNotBlank(federation.getContactWebsite()))
|
||||
{
|
||||
data.setAttribute("contactLink", "href", federation.getContactWebsite());
|
||||
data.setAttribute("contactLinkImg", "class", "");
|
||||
data.getIdData("contactLinkImg").getAttribute("class").setMode(DisplayMode.REPLACE);
|
||||
}
|
||||
if (StringUtils.isNotBlank(federation.getContactEmail()))
|
||||
{
|
||||
data.setAttribute("emailLink", "href", "mailto:" + federation.getContactEmail());
|
||||
data.setAttribute("emailLinkImg", "class", "");
|
||||
data.getIdData("emailLinkImg").getAttribute("class").setMode(DisplayMode.REPLACE);
|
||||
}
|
||||
if (StringUtils.isNotBlank(federation.getUserDocWebsite()))
|
||||
{
|
||||
data.setAttribute("userDocLink", "href", federation.getUserDocWebsite());
|
||||
data.setAttribute("userDocLinkImg", "class", "");
|
||||
data.getIdData("userDocLinkImg").getAttribute("class").setMode(DisplayMode.REPLACE);
|
||||
}
|
||||
if (StringUtils.isNotBlank(federation.getTechnicalDocWebsite()))
|
||||
{
|
||||
data.setAttribute("technicalDocLink", "href", federation.getTechnicalDocWebsite());
|
||||
data.setAttribute("technicalDocLinkImg", "class", "");
|
||||
data.getIdData("technicalDocLinkImg").getAttribute("class").setMode(DisplayMode.REPLACE);
|
||||
}
|
||||
|
||||
data.setContent("organizationCount", federation.getOrganizations().size());
|
||||
data.setContent("serviceCount", federation.getServiceCount());
|
||||
|
||||
|
|
|
@ -11,13 +11,32 @@
|
|||
<script src="Chart.bundle.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="center_table" style="width: 900px;">
|
||||
<div class="center" >
|
||||
<h2><img id="federationLogo" src="#" style="width: 100px; heigth: 100px; vertical-align: middle;"/> <span id="federationName">Federation name</span></h2>
|
||||
<p id="federationDescription">Bla bla description</p>
|
||||
<div class="center">
|
||||
<div class="row center" style="border: 0px solid yellow;">
|
||||
<div class="column" style="border: 0px solid red;">
|
||||
<img id="federationLogo" src="#" style="width: 100px; heigth: 100px; vertical-align: middle;"/>
|
||||
</div>
|
||||
<div class="column" style="border: 0px solid red; max-width: 500px;">
|
||||
<div class="content_title"><a id="federationName" href="#">n/a</a></div>
|
||||
<div class="content_subtitle"><a id="federationURL" href="#" style="text-decoration: none;">n/a</a></div>
|
||||
</div>
|
||||
<p id="federationDescription">Description absente…</p>
|
||||
<div>Depuis <span id="federationStartDate">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>
|
||||
<div>Nombre de membres : <span id="organizationCount">n/a</span></div>
|
||||
<div>Nombre de services : <span id="serviceCount">n/a</span></div>
|
||||
</div>
|
||||
<div class="center_table" style="width: 900px;">
|
||||
<table id="organizations" class="table_classic left">
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
<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>
|
||||
<p id="organizationDescription">Description absente…</p>
|
||||
</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;">
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
<div class="column" style="border: 0px solid red; max-width: 400px;">
|
||||
<div class="content_title"><a id="serviceName" href="#">Service name</a></div>
|
||||
<div class="content_subtitle"><a id="serviceURL" href="#" style="text-decoration: none;">URL n/a</a></div>
|
||||
<p id="serviceDescription">Description absente…</p>
|
||||
</div>
|
||||
<p id="serviceDescription">Description absente…</p>
|
||||
</div>
|
||||
|
||||
<div>Date ouverture : <span id="serviceStartDate">n/a</span> – Date fermeture : <span id="serviceEndDate">n/a</span> – Statut : <img id="serviceStatusImg" src="status-void.png" style="width: 25px; vertical-align: bottom;" /></div>
|
||||
|
|
Loading…
Reference in a new issue