Commit 15c86b14 authored by Alejandro De Maria Antolinos's avatar Alejandro De Maria Antolinos

Merge branch 'issue22' into 'master'

Issue22 - Provide a link on  the beamline name to the beamline webpage

See merge request !21
parents 680d6478 b92a6cd3
......@@ -10,6 +10,7 @@
<!-- Using grunt-include-source, the proper js files created by us (not minified) are included below -->
<script src="src/beamlineUrl.js"></script>
<script src="src/doicontroller.js"></script>
<script src="src/doiview.js"></script>
......
......@@ -8,13 +8,10 @@
<link rel="stylesheet" href="/min/output.min.css" >
</head>
<!--
<script src="/min/doi-landing-page.min.js"></script>
-->
<script src="/min/components.min.js"></script>
<script src="/min/precompiled.templates.min.js"></script>
<script src="/src/doiview.js"></script>
<script src="/src/doicontroller.js"></script>
<script src="/min/doi.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
// retrieve the doi code from an url of the format http://doi.esrf.fr/prefix/suffix
......
function DOIController(e){this.server="https://data.datacite.org/",this.sessionId=null,this.acceptedPrefix=["10.5072","10.15151"],this.view=e}function findRegExpInText(e,t){return t.search(e)}function extractFieldsFromCategories(e){var t,n=e.categories;for(t in n)0!=findRegExpInText(/id/,n[t])&&0!=findRegExpInText(/bm/,n[t])||(e.beamline=n[t]);for(t in n)0==findRegExpInText(/\D+-/,n[t])&&(e.proposalNumber=n[t]);for(t in n)-1!=findRegExpInText(/\s/,n[t])&&(e.proposalType=n[t])}function DOIView(){}DOIController.prototype.getData=function(e){var t=this;this.view.setDOI(e),this.hasAcceptedPrefix(e)?$.ajax({headers:{Accept:"application/vnd.citationstyles.csl+json"},type:"GET",url:this.server+e,beforeSend:function(){t.view.setLoading("Retrieving data from Server")},complete:function(){t.view.setLoading(!1)},success:function(e){e?(extractFieldsFromCategories(e),dust.render("esrf-landing-page",{data:e},function(e,t){$("#main").html(t)})):dust.render("doi-not-found-page",{message:"Sorry, the requested DOI was not found."},function(e,t){$("#main").html(t)})},error:function(e,n,i){$("#result").text("error: "+n),dust.render("doi-not-found-page",{message:"Sorry, there was a connexion problem with the datacite server."},function(e,t){$("#main").html(t)}),t.view.setLoading(!1)}}):dust.render("doi-not-found-page",{message:'The DOI was not found at ESRF. (bad prefix). </br> Please use the DOI search engine at <a href="https://www.doi.org"> doi.org</a>.'},function(e,t){$("#main").html(t)})},DOIController.prototype.hasAcceptedPrefix=function(e){var t=e.split("/")[0];return-1!=_.findIndex(this.acceptedPrefix,function(e){return t==e})},DOIView.prototype.setLoading=function(e){0!=e?$("body").addClass("loading"):$("body").removeClass("loading")},DOIView.prototype.setDOI=function(e){$("#doiPanel").html(e)};
\ No newline at end of file
function DOIController(e){this.doiServer="https://data.datacite.org/",this.acceptedPrefix=["10.5072","10.15151"],this.view=e}function findRegExpInText(e,t){return t.search(e)}function extractFieldsFromCategories(e){var t,r=e.categories;for(t in r)0!=findRegExpInText(/id/,r[t])&&0!=findRegExpInText(/bm/,r[t])||(e.beamline=r[t]);for(t in r)0==findRegExpInText(/\D+-/,r[t])&&(e.proposalNumber=r[t]);for(t in r)-1!=findRegExpInText(/\s/,r[t])&&(e.proposalType=r[t])}function DOIView(){}var BEAMLINEURL=[{name:"BM05",startDate:"01 01 2000 00:00 +0000",endDate:"01 12 2100 00:00 +0000",url:"http://www.esrf.fr/UsersAndScience/Experiments/XNP/BM05"},{name:"BM29",startDate:"01 01 2000 00:00 +0000",endDate:"01 12 2100 00:00 +0000",url:"http://www.esrf.eu/UsersAndScience/Experiments/MX/About_our_beamlines/BM29"},{name:"CM01",startDate:"01 01 2000 00:00 +0000",endDate:"01 12 2100 00:00 +0000",url:"http://www.esrf.eu/home/UsersAndScience/Experiments/MX/About_our_beamlines/CM01.html"},{name:"ID01",startDate:"01 01 2000 00:00 +0000",endDate:"01 12 2100 00:00 +0000",url:"http://www.esrf.eu/UsersAndScience/Experiments/XNP/ID01"},{name:"ID06",startDate:"01 01 2000 00:00 +0000",endDate:"01 12 2100 00:00 +0000",url:"http://www.esrf.eu/home/UsersAndScience/Experiments/MEx/id06-large-volume-press.html"},{name:"ID11",startDate:"01 01 2000 00:00 +0000",endDate:"01 12 2100 00:00 +0000",url:"http://www.esrf.fr/UsersAndScience/Experiments/StructMaterials/ID11"},{name:"ID16A",startDate:"01 01 2000 00:00 +0000",endDate:"01 12 2100 00:00 +0000",url:"http://www.esrf.fr/UsersAndScience/Experiments/XNP/ID16A"},{name:"ID16B",startDate:"01 01 2000 00:00 +0000",endDate:"01 12 2100 00:00 +0000",url:"http://www.esrf.fr/UsersAndScience/Experiments/XNP/ID16B"},{name:"ID17",startDate:"01 01 2000 00:00 +0000",endDate:"01 12 2100 00:00 +0000",url:"http://www.esrf.fr/UsersAndScience/Experiments/CBS/ID17"},{name:"ID19",startDate:"01 01 2000 00:00 +0000",endDate:"01 12 2100 00:00 +0000",url:"http://www.esrf.fr/home/UsersAndScience/Experiments/StructMaterials/ID19.html"},{name:"ID21",startDate:"01 01 2000 00:00 +0000",endDate:"01 12 2100 00:00 +0000",url:"http://www.esrf.eu/UsersAndScience/Experiments/XNP/ID21"},{name:"ID22",startDate:"01 01 2000 00:00 +0000",endDate:"01 12 2100 00:00 +0000",url:"http://www.esrf.eu/id22"},{name:"ID23-1",startDate:"01 01 2000 00:00 +0000",endDate:"01 12 2100 00:00 +0000",url:"http://www.esrf.eu/UsersAndScience/Experiments/MX/About_our_beamlines/ID23-1"},{name:"ID23-2",startDate:"01 01 2000 00:00 +0000",endDate:"01 12 2100 00:00 +0000",url:"http://www.esrf.eu/UsersAndScience/Experiments/MX/About_our_beamlines/ID23-2"},{name:"ID29",startDate:"01 01 2000 00:00 +0000",endDate:"01 12 2100 00:00 +0000",url:"http://www.esrf.eu/home/UsersAndScience/Experiments/Beamlines/content/content/id29.html"},{name:"ID30A1",startDate:"01 01 2000 00:00 +0000",endDate:"01 12 2100 00:00 +0000",url:"http://www.esrf.eu/MASSIF1"},{name:"ID30A3",startDate:"01 01 2000 00:00 +0000",endDate:"01 12 2100 00:00 +0000",url:"http://www.esrf.eu/home/UsersAndScience/Experiments/MX/About_our_beamlines/id30a-3--massif-3.html"},{name:"ID30B",startDate:"01 01 2000 00:00 +0000",endDate:"01 12 2100 00:00 +0000",url:"http://www.esrf.eu/id30b"},{name:"ID32",startDate:"01 01 2000 00:00 +0000",endDate:"01 12 2100 00:00 +0000",url:"http://www.esrf.eu/ID32"}];DOIController.prototype.getData=function(e){var t=this;this.view.setDOI(e),this.hasAcceptedPrefix(e)?$.ajax({headers:{Accept:"application/vnd.citationstyles.csl+json"},type:"GET",url:this.doiServer+e,beforeSend:function(){t.view.setLoading("Retrieving data from Server")},complete:function(){t.view.setLoading(!1)},success:function(e){if(e){extractFieldsFromCategories(e);var r=e.issued["date-parts"]-3,n=new Date(r+" 01 01 00:00 +0000");e.beamlineUrl=t.findsUrl(e.beamline,n),dust.render("esrf-landing-page",{data:e},function(e,t){$("#main").html(t)})}else dust.render("doi-not-found-page",{message:"Sorry, the requested DOI was not found."},function(e,t){$("#main").html(t)})},error:function(e,r,n){$("#result").text("error: "+r),dust.render("doi-not-found-page",{message:"Sorry, there was a connexion problem with the datacite server."},function(e,t){$("#main").html(t)}),t.view.setLoading(!1)}}):dust.render("doi-not-found-page",{message:'The DOI was not found at ESRF. (bad prefix). </br> Please use the DOI search engine at <a href="https://www.doi.org"> doi.org</a>.'},function(e,t){$("#main").html(t)})},DOIController.prototype.hasAcceptedPrefix=function(e){var t=e.split("/")[0];return this.acceptedPrefix.includes(t)},DOIController.prototype.findsUrl=function(e,t){for(var r="noLink",n=0;BEAMLINEURL[n]&&"noLink"===r;){var a=new Date(BEAMLINEURL[n].startDate),s=new Date(BEAMLINEURL[n].endDate);BEAMLINEURL[n].name.toLowerCase()===e.toLowerCase()&&t>a&&t<s&&(r=BEAMLINEURL[n].url),n++}return r},DOIView.prototype.setLoading=function(e){0!=e?$("body").addClass("loading"):$("body").removeClass("loading")},DOIView.prototype.setDOI=function(e){$("#doiPanel").html(e)};
\ No newline at end of file
(function(dust){dust.register("doi-not-found-page",body_0);function body_0(chk,ctx){return chk.w("<div class=\"container-fluid\"><div class=\"row\"><div class=\"col-12 text-center\" > <h2> Not found </h2> </div></div><div class=\"row\"><div class=\"col-3\" > </div><div class=\"col-6 lightRedBackground text-center\" > <p> ").f(ctx.get(["message"], false),ctx,"h",["s"]).w(" </p> </div><div class=\"col-3\" > </div></div></div> ");}body_0.__dustBody=!0;return body_0}(dust));
(function(dust){dust.register("esrf-landing-page",body_0);function body_0(chk,ctx){return chk.w("<div class=\"container-fluid\"><br /><div class=\"row\"><div class=\"col-8\"><label>Title</label><div class=\"alert alert-dark\" role=\"alert\">").f(ctx.getPath(false, ["data","title"]),ctx,"h").w(" </div><label> Abstract </label><div class=\"alert alert-warning alert-dismissible fade show text-center align-middle\" role=\"alert\">There is no abstract for this DOI<button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\"> <span aria-hidden=\"true\">&times;</span></button></div><p class=\"grayBackground\"></p><p><label> Experimental report </label><button type=\"button\" class=\"btn btn-primary btn-lg btn-block disabled\">Download experimental report</button></p><p><label> Download data </label><button type=\"button\" class=\"btn btn-primary btn-lg btn-block disabled\">Download data</button></p></div><div class=\"col-4\"><div class=\"row\"><div class=\"col-12\"><div class=\"card\"><div class=\"card-header text-center\"><label>Authors </label></div><div class=\"card-body text-center\">").s(ctx.getPath(false, ["data","author"]),ctx,{"block":body_1},{}).w("</div></div></div></div><br/><div class=\"row\"> <div class=\"col-12\"><div class=\"card\"><div class=\"card-header text-center\"><label>Beamline </label></div><div class=\"card-body text-center\">").f(ctx.getPath(false, ["data","beamline"]),ctx,"h").w("</div></div></div></div><br/><div class=\"row\"><div class=\"col-lg-6\"><div class=\"card\"><div class=\"card-header text-center\"><label>Proposal number </label></div><div class=\"card-body text-center height100p\">").f(ctx.getPath(false, ["data","proposalNumber"]),ctx,"h").w("</div></div></div><div class=\"col-lg-6\"><div class=\"card\"><div class=\"card-header text-center\"><label>Proposal type </label></div><div class=\"card-body text-center height100p\">").f(ctx.getPath(false, ["data","proposalType"]),ctx,"h").w("</div></div></div></div><br/><div class=\"row\"><div class=\"col-lg-6\"><div class=\"card\"><div class=\"card-header text-center\"><label>Release year </label></div><div class=\"card-body text-center\" style=\"height: 100%;\">").f(ctx.getPath(false, ["data","issued","date-parts"]),ctx,"h").w("</div></div></div><div class=\"col-lg-6\"><div class=\"card\"><div class=\"card-header text-center\"><label>Publisher </label></div><div class=\"card-body text-center\">").f(ctx.getPath(false, ["data","publisher"]),ctx,"h").w("</div></div></div></div></div></div></div>");}body_0.__dustBody=!0;function body_1(chk,ctx){return chk.w(" ").x(ctx.getPath(true, ["given"]),ctx,{"else":body_2,"block":body_3},{}).w(" ");}body_1.__dustBody=!0;function body_2(chk,ctx){return chk.w(" ").f(ctx.getPath(true, ["literal"]),ctx,"h").w(" </br> ");}body_2.__dustBody=!0;function body_3(chk,ctx){return chk.w(" ").f(ctx.getPath(true, ["given"]),ctx,"h").w(" ").f(ctx.getPath(true, ["family"]),ctx,"h").w(" </br> ");}body_3.__dustBody=!0;return body_0}(dust));
\ No newline at end of file
(function(dust){dust.register("esrf-landing-page",body_0);function body_0(chk,ctx){return chk.w("<div class=\"container-fluid\"><br /><div class=\"row\"><div class=\"col-8\"><label>Title</label><div class=\"alert alert-dark\" role=\"alert\">").f(ctx.getPath(false, ["data","title"]),ctx,"h").w(" </div><label> Abstract </label><div class=\"alert alert-warning alert-dismissible fade show text-center align-middle\" role=\"alert\">There is no abstract for this DOI<button type=\"button\" class=\"close\" data-dismiss=\"alert\" aria-label=\"Close\"> <span aria-hidden=\"true\">&times;</span></button></div><p class=\"grayBackground\"></p><p><label> Experimental report </label><button type=\"button\" class=\"btn btn-primary btn-lg btn-block disabled\">Download experimental report</button></p><p><label> Download data </label><button type=\"button\" class=\"btn btn-primary btn-lg btn-block disabled\">Download data</button></p></div><div class=\"col-4\"><div class=\"row\"><div class=\"col-12\"><div class=\"card\"><div class=\"card-header text-center\"><label>Authors </label></div><div class=\"card-body text-center\">").s(ctx.getPath(false, ["data","author"]),ctx,{"block":body_1},{}).w("</div></div></div></div><br/><div class=\"row\"> <div class=\"col-12\"><div class=\"card\"><div class=\"card-header text-center\"><label>Beamline </label></div>").h("eq",ctx,{"else":body_4,"block":body_5},{"key":ctx.getPath(false, ["data","beamlineUrl"]),"value":"noLink"},"h").w("</div></div></div><br/><div class=\"row\"><div class=\"col-lg-6\"><div class=\"card\"><div class=\"card-header text-center\"><label>Proposal number </label></div><div class=\"card-body text-center height100p\">").f(ctx.getPath(false, ["data","proposalNumber"]),ctx,"h").w("</div></div></div><div class=\"col-lg-6\"><div class=\"card\"><div class=\"card-header text-center\"><label>Proposal type </label></div><div class=\"card-body text-center height100p\">").f(ctx.getPath(false, ["data","proposalType"]),ctx,"h").w("</div></div></div></div><br/><div class=\"row\"><div class=\"col-lg-6\"><div class=\"card\"><div class=\"card-header text-center\"><label>Release year </label></div><div class=\"card-body text-center\" style=\"height: 100%;\">").f(ctx.getPath(false, ["data","issued","date-parts"]),ctx,"h").w("</div></div></div><div class=\"col-lg-6\"><div class=\"card\"><div class=\"card-header text-center\"><label>Publisher </label></div><div class=\"card-body text-center\">").f(ctx.getPath(false, ["data","publisher"]),ctx,"h").w("</div></div></div></div></div></div></div>");}body_0.__dustBody=!0;function body_1(chk,ctx){return chk.w(" ").x(ctx.getPath(true, ["given"]),ctx,{"else":body_2,"block":body_3},{}).w(" ");}body_1.__dustBody=!0;function body_2(chk,ctx){return chk.w(" ").f(ctx.getPath(true, ["literal"]),ctx,"h").w(" </br> ");}body_2.__dustBody=!0;function body_3(chk,ctx){return chk.w(" ").f(ctx.getPath(true, ["given"]),ctx,"h").w(" ").f(ctx.getPath(true, ["family"]),ctx,"h").w(" </br> ");}body_3.__dustBody=!0;function body_4(chk,ctx){return chk.w(" <div class=\"card-body text-center\"><a href=\"").f(ctx.getPath(false, ["data","beamlineUrl"]),ctx,"h").w("\"> ").f(ctx.getPath(false, ["data","beamline"]),ctx,"h").w(" </a> </div>");}body_4.__dustBody=!0;function body_5(chk,ctx){return chk.w("<div class=\"card-body text-center\"> ").f(ctx.getPath(false, ["data","beamline"]),ctx,"h").w(" </div>");}body_5.__dustBody=!0;return body_0}(dust));
\ No newline at end of file
var BEAMLINEURL = [
{
"name" : "BM05",
"startDate" : "01 01 2000 00:00 +0000",
"endDate" : "01 12 2100 00:00 +0000",
"url" : "http://www.esrf.fr/UsersAndScience/Experiments/XNP/BM05"
},
{
"name" : "BM29",
"startDate" : "01 01 2000 00:00 +0000",
"endDate" : "01 12 2100 00:00 +0000",
"url" : "http://www.esrf.eu/UsersAndScience/Experiments/MX/About_our_beamlines/BM29"
},
{
"name" : "CM01",
"startDate" : "01 01 2000 00:00 +0000",
"endDate" : "01 12 2100 00:00 +0000",
"url" : "http://www.esrf.eu/home/UsersAndScience/Experiments/MX/About_our_beamlines/CM01.html"
},
{
"name" : "ID01",
"startDate" : "01 01 2000 00:00 +0000",
"endDate" : "01 12 2100 00:00 +0000",
"url" : "http://www.esrf.eu/UsersAndScience/Experiments/XNP/ID01"
},
{
"name" : "ID06",
"startDate" : "01 01 2000 00:00 +0000",
"endDate" : "01 12 2100 00:00 +0000",
"url" : "http://www.esrf.eu/home/UsersAndScience/Experiments/MEx/id06-large-volume-press.html"
},
{
"name" : "ID11",
"startDate" : "01 01 2000 00:00 +0000",
"endDate" : "01 12 2100 00:00 +0000",
"url" : "http://www.esrf.fr/UsersAndScience/Experiments/StructMaterials/ID11"
},
{
"name" : "ID16A",
"startDate" : "01 01 2000 00:00 +0000",
"endDate" : "01 12 2100 00:00 +0000",
"url" : "http://www.esrf.fr/UsersAndScience/Experiments/XNP/ID16A"
},
{
"name" : "ID16B",
"startDate" : "01 01 2000 00:00 +0000",
"endDate" : "01 12 2100 00:00 +0000",
"url" : "http://www.esrf.fr/UsersAndScience/Experiments/XNP/ID16B"
},
{
"name" : "ID17",
"startDate" : "01 01 2000 00:00 +0000",
"endDate" : "01 12 2100 00:00 +0000",
"url" : "http://www.esrf.fr/UsersAndScience/Experiments/CBS/ID17"
},
{
"name" : "ID19",
"startDate" : "01 01 2000 00:00 +0000",
"endDate" : "01 12 2100 00:00 +0000",
"url" : "http://www.esrf.fr/home/UsersAndScience/Experiments/StructMaterials/ID19.html"
},
{
"name" : "ID21",
"startDate" : "01 01 2000 00:00 +0000",
"endDate" : "01 12 2100 00:00 +0000",
"url" : "http://www.esrf.eu/UsersAndScience/Experiments/XNP/ID21"
},
{
"name" : "ID22",
"startDate" : "01 01 2000 00:00 +0000",
"endDate" : "01 12 2100 00:00 +0000",
"url" : "http://www.esrf.eu/id22"
},
{
"name" : "ID23-1",
"startDate" : "01 01 2000 00:00 +0000",
"endDate" : "01 12 2100 00:00 +0000",
"url" : "http://www.esrf.eu/UsersAndScience/Experiments/MX/About_our_beamlines/ID23-1"
},
{
"name" : "ID23-2",
"startDate" : "01 01 2000 00:00 +0000",
"endDate" : "01 12 2100 00:00 +0000",
"url" : "http://www.esrf.eu/UsersAndScience/Experiments/MX/About_our_beamlines/ID23-2"
},
{
"name" : "ID29",
"startDate" : "01 01 2000 00:00 +0000",
"endDate" : "01 12 2100 00:00 +0000",
"url" : "http://www.esrf.eu/home/UsersAndScience/Experiments/Beamlines/content/content/id29.html"
},
{
"name" : "ID30A1",
"startDate" : "01 01 2000 00:00 +0000",
"endDate" : "01 12 2100 00:00 +0000",
"url" : "http://www.esrf.eu/MASSIF1"
},
{
"name" : "ID30A3",
"startDate" : "01 01 2000 00:00 +0000",
"endDate" : "01 12 2100 00:00 +0000",
"url" : "http://www.esrf.eu/home/UsersAndScience/Experiments/MX/About_our_beamlines/id30a-3--massif-3.html"
},
{
"name" : "ID30B",
"startDate" : "01 01 2000 00:00 +0000",
"endDate" : "01 12 2100 00:00 +0000",
"url" : "http://www.esrf.eu/id30b"
},
{
"name" : "ID32",
"startDate" : "01 01 2000 00:00 +0000",
"endDate" : "01 12 2100 00:00 +0000",
"url" : "http://www.esrf.eu/ID32"
}
];
\ No newline at end of file
function DOIController(view) {
this.server = "https://data.datacite.org/";
this.sessionId = null;
this.acceptedPrefix = [ "10.5072", "10.15151" ];
// doiServer = the server which provides doi details from a given doi name.
this.doiServer = "https://data.datacite.org/";
// 10.5072 is the test esrf doi prefix;
// 10.15151 is the production esrf doi prefix;
this.acceptedPrefix = [ "10.5072", "10.15151" ];
this.view = view;
}
......@@ -19,24 +19,30 @@ DOIController.prototype.getData = function(doi) {
Accept : "application/vnd.citationstyles.csl+json"
},
type : "GET",
url : this.server + doi,
url : this.doiServer + doi,
beforeSend : function() {
_this.view.setLoading("Retrieving data from Server");
},
complete : function() {
_this.view.setLoading(false);
},
success : function(data) {
if (data) {
success : function(doiData) {
if (doiData) {
// extract fields from data.categories
extractFieldsFromCategories(data);
extractFieldsFromCategories(doiData);
// Retrieve the URL corresponding to the beamline name. Currently, the date of the
// experiment is calculated from the publicationYear.
var experimentalYear = doiData.issued["date-parts"] - 3 ;
var experimentalDate = new Date(experimentalYear + " 01 01 00:00 +0000");
doiData.beamlineUrl = _this.findsUrl(doiData.beamline, experimentalDate);
// send to dust render
dust.render('esrf-landing-page', {
data : data
}, function(err, out) {
$("#main").html(out);
});
data : doiData
}, function(err, out) {
$("#main").html(out);
}
);
} else {
dust.render('doi-not-found-page', {
message : "Sorry, the requested DOI was not found."
......@@ -79,6 +85,29 @@ DOIController.prototype.hasAcceptedPrefix = function(doi) {
};
// Search the corresponding url for a given beamline name
// @param: beamline, the beamline name
// @param: date, the date the experiment was performed. (Date Object)
// @return the url of the beamLine, "noLink" if it is not found
DOIController.prototype.findsUrl = function(beamline, date){
var result = "noLink";
var i = 0;
while(BEAMLINEURL[i] && result === "noLink") {
var startDate = new Date(BEAMLINEURL[i].startDate);
var endDate = new Date(BEAMLINEURL[i].endDate);
if (BEAMLINEURL[i].name.toLowerCase() === beamline.toLowerCase() &&
date > startDate &&
date < endDate
) {
result = BEAMLINEURL[i].url;
}
i++;
}
return result;
};
//HELPER FUNCTIONS
......
......@@ -43,7 +43,11 @@
<div class="card-header text-center">
<label>Beamline </label>
</div>
<div class="card-body text-center">{data.beamline}</div>
{@eq key=data.beamlineUrl value="noLink"}
<div class="card-body text-center"> {data.beamline} </div>
{:else}
<div class="card-body text-center"><a href="{data.beamlineUrl}"> {data.beamline} </a> </div>
{/eq}
</div>
</div>
</div>
......
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