Commit c927577b authored by Maxime Chaillet's avatar Maxime Chaillet

change the message displayed above the button to access the data depending on current date.

parent a1680c03
This diff is collapsed.
This diff is collapsed.
......@@ -142,6 +142,18 @@ function extractDates(data){
// session date is the date the experiment for the session was performed
var experimentDate = new Date(data.date_collected);
data.sessionDate = experimentDate.getFullYear() + "-" + experimentDate.getMonth() + "-" + experimentDate.getDate();
// Setup access message which is displayed above the button to access the data
var publicationDate = new Date(data.publication_year + "-01-01T00:00+00:00");
var now = new Date();
if (now > publicationDate ) {
data.accessMessage = "The data can be downloaded by clicking on the link below" ;
} else {
data.accessMessage = "The data is under embargo until <b>" + data.publication_year + "</b> but could be released earlier. It is currently only available to download if you are a member of the proposal team.";
}
}
......
......@@ -90,7 +90,7 @@
<label>Experimental data </label>
</div>
<div class="card-body padding10">
<p class="card-text" >The data is currently only available to download if you are a member of the proposal team.</p>
<p class="card-text" >{data.accessMessage|s}</p>
</div>
<div class="card-footer">
<form action="https://icat.esrf.fr/#/browse/facility/ESRF/proposal/{data.proposalNumber}/investigation/{data.investigationId}/dataset" target="_blank">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment