Improved service date displaying.

This commit is contained in:
Christian P. MOMON 2021-02-11 03:20:40 +01:00
parent 51b656d434
commit a638a5abd5
2 changed files with 10 additions and 1 deletions

View file

@ -120,8 +120,17 @@ public class ServicePage
data.setEscapedAttribute("serviceURL", "href", service.getWebsite()); data.setEscapedAttribute("serviceURL", "href", service.getWebsite());
data.setEscapedContent("serviceDescription", StringUtils.defaultIfBlank(service.getDescription(), "n/a")); data.setEscapedContent("serviceDescription", StringUtils.defaultIfBlank(service.getDescription(), "n/a"));
data.setContent("serviceStartDate", StringUtils.defaultIfBlank(service.getStartDate(), "n/a")); data.setContent("serviceStartDate", StringUtils.defaultIfBlank(service.getStartDate(), "n/a"));
data.setContent("serviceEndDate", StringUtils.defaultIfBlank(service.getEndDate(), "n/a")); data.setContent("serviceEndDate", StringUtils.defaultIfBlank(service.getEndDate(), "n/a"));
if (StringUtils.isBlank(service.getEndDate()))
{
data.setAttribute("serviceEndDateData", "style", "display: none;");
}
else
{
data.setAttribute("serviceStartDateWord", "style", "display: none;");
}
data.setAttribute("serviceStatusImg", "src", "status-" + service.getStatus().toString().toLowerCase() + ".png"); data.setAttribute("serviceStatusImg", "src", "status-" + service.getStatus().toString().toLowerCase() + ".png");
data.setAttribute("serviceStatusImg", "title", StringUtils.defaultIfBlank(service.getStatusDescription(), service.getStatus().toString())); data.setAttribute("serviceStatusImg", "title", StringUtils.defaultIfBlank(service.getStatusDescription(), service.getStatus().toString()));

View file

@ -23,7 +23,7 @@
<p id="serviceDescription" class="center_table" style="width: 500px;">Description absente…</p> <p id="serviceDescription" class="center_table" style="width: 500px;">Description absente…</p>
</div> </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> <div><span id="serviceStartDateWord">Depuis</span> <span id="serviceStartDate">n/a</span><span id="serviceEndDateData"> <span id="serviceEndDate">n/a</span></span> Statut : <img id="serviceStatusImg" src="status-void.png" style="width: 25px; vertical-align: bottom;" /></div>
<div class="content_infos" style="border: 0px solid blue; border-radius: 8px; margin: 5px;"> <div class="content_infos" style="border: 0px solid blue; border-radius: 8px; margin: 5px;">
Inscription : Inscription :
<img id="registrationNoneImg" src="circle-icons/global-mono.svg" class="disabled" title="Sans compte"/> <img id="registrationNoneImg" src="circle-icons/global-mono.svg" class="disabled" title="Sans compte"/>