Commit f3b2e72c authored by Maxime Chaillet's avatar Maxime Chaillet

handle possibility that authors details in datacite json response can come in 2 formats

parent ad986129
Pipeline #1924 failed with stages
(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").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-10\" ><label>Title</label><div class=\"alert alert-dark\" role=\"alert\">").f(ctx.getPath(false, ["data","title"]),ctx,"h").w(" \t\t \t</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-2\"><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><br /><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><br /><div class=\"card\"><div class=\"card-header text-center\"><label>Publication year </label></div><div class=\"card-body text-center\">").f(ctx.getPath(false, ["data","issued","date-parts"]),ctx,"h").w("</div></div><br /><div class=\"card\"><div class=\"card-header text-center\"><label>Proposal number </label></div><div class=\"card-body text-center\">not displayed</div></div> </div></div></div></div>");}body_0.__dustBody=!0;function body_1(chk,ctx){return chk.f(ctx.getPath(true, ["family"]),ctx,"h").w(" ").f(ctx.getPath(true, ["given"]),ctx,"h").w("</br>");}body_1.__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-10\" ><label>Title</label><div class=\"alert alert-dark\" role=\"alert\">").f(ctx.getPath(false, ["data","title"]),ctx,"h").w(" \t\t \t</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-2\"><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><br /><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><br /><div class=\"card\"><div class=\"card-header text-center\"><label>Publication year </label></div><div class=\"card-body text-center\">").f(ctx.getPath(false, ["data","issued","date-parts"]),ctx,"h").w("</div></div><br /><div class=\"card\"><div class=\"card-header text-center\"><label>Proposal number </label></div><div class=\"card-body text-center\">not displayed</div></div> </div></div></div></div>");}body_0.__dustBody=!0;function body_1(chk,ctx){return chk.x(ctx.getPath(true, ["given"]),ctx,{"else":body_2,"block":body_3},{}).w(" ");}body_1.__dustBody=!0;function body_2(chk,ctx){return chk.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
......@@ -31,9 +31,13 @@
<label>Authors </label>
</div>
<div class="card-body text-center">
{#data.author}
{.family} {.given}</br>
{/data.author}
{#data.author}
{?.given}
{.given} {.family} </br>
{:else}
{.literal} </br>
{/.given}
{/data.author}
</div>
</div>
<br />
......
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