Commit da9164ad authored by Maxime Chaillet's avatar Maxime Chaillet

Merge branch 'issue25' into 'master'

fix layout in case of an error in the doi landing page. Fix layout from the…

See merge request !24
parents 478f945e cf6d1a18
......@@ -10,7 +10,7 @@
<script src="/min/components.min.js"></script>
<script src="/min/precompiled.templates.min.js"></script>
<script src="/min/doi.min.js"></script>
<script type="text/javascript">
$(document).ready(function() {
var doi = document.location.pathname.substring(1,document.location.pathname.length);
......
This diff is collapsed.
(function(dust){dust.register("doi-not-found-page",body_0);function body_0(chk,ctx){return chk.w("<div class=\"container-fluid \" style=\"color:black;\"><div class=\"row\"><div class=\"col lightRedBackground text-center rounded\" style=\"border: 10px\" > <p> ").f(ctx.get(["message"], false),ctx,"h",["s"]).w(" </p> </div></div></div> ");}body_0.__dustBody=!0;return body_0}(dust));
(function(dust){dust.register("doi-not-found-page",body_0);function body_0(chk,ctx){return chk.w("<div class=\"container-fluid \" style=\"color:black;\"><div class=\"row\"><div class=\"col-3\"> </div><div class=\"col-6 lightRedBackground text-center rounded\"> <p> ").f(ctx.get(["message"], false),ctx,"h",["s"]).w(" </p> </div></div><div class=\"col-3\"> </div></div> ");}body_0.__dustBody=!0;return body_0}(dust));
(function(dust){dust.register("doi-not-found-page2",body_0);function body_0(chk,ctx){return chk.f(ctx.get(["message"], false),ctx,"h",["s"]);}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>").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));
(function(dust){dust.register("welcome-page",body_0);function body_0(chk,ctx){return chk.w(" <div class=\"container-fluid\"><div class=\"row\"><div class=\"col-12 flexCentered whiteFont\" style=\"color:#132577; font-size: 4rem; height: 200px; margin-top: 10px; margin-bottom: 10px;\">ESRF Data Portal</div></div></div><div class=\"container-fluid\"><div class=\"row\"><div class=\"col-12 col-md-4\"><div class=\"padding10\"><div class=\"card-header text-center\"><h2>About the portal</h2></div><div class=\"card-body padding10\">This page centralizes the services offered by the ESRF to access data stored at the facility as part of its data policy.<ul><li>DOI search engine</li><li>Data catalogue <a href=\"https://icat.esrf.fr\"> icat.esrf.fr</a></li></ul></div></div></div><div class=\"col-12 col-md-4\"><div class=\"padding10\"><div class=\"card-header text-center \"><h2>DOI resolver</h2></div><div class=\"card-body padding10\"><p>The search engine below only finds DOI which have been minted at ESRF. </br> Use <a href=\"https://doi.org\">doi.org </a> search engine for any other DOI.</p><div class=\"row\"><div class=\"col-xl-9 padding-0\"><input id=\"doiSearchBox\" class=\"form-control\" placeholder=\"10.5072/...\" type=\"text\" required/><div class=\"text-danger\" id=\"error\"> </div> </div><div class=\"col padding-0\"> <input class=\"btn btn-primary\" type=\"submit\" value=\"Search\" onclick=\"searchDOI()\" /> </div></div> </div> </div></div><div class=\"col-12 col-md-4\"><div class=\"padding10\"><div class=\"card-header text-center\"><h2>About DOI</h2></div><div class=\"card-body padding10\">The Digital Object Identifier (<a href=\"https://www.doi.org/\">DOI</a>) is a code composed of digits and characters. It identifies data in aunique and perennial way thus referencing this data worldwide. The DOI has two parts namely the DOI prefixand the DOI suffix separated by a slash (\"/\") as depicted below :</p><pre>prefix/suffix </pre></div></div></div></div></div>");}body_0.__dustBody=!0;return body_0}(dust));
\ No newline at end of file
......@@ -43,24 +43,24 @@ DOIController.prototype.getData = function(doi) {
}
);
} else {
if (this.origin == "welcome-page") {
_this.view.displayMessage('doi-not-found-page', "Sorry, the requested DOI was not found.", "error" );
if (_this.origin === "welcome-page") {
_this.view.displayMessage('doi-not-found-page2', "Sorry, the requested DOI was not found.", "error" );
} else {
_this.view.displayMessage('doi-not-found-page', "Sorry, the requested DOI was not found.", "main" );
}
}
},
error : function(jqXHR, textStatus, errorThrown) {
if (this.origin == "welcome-page") {
_this.view.displayMessage('doi-not-found-page', "Sorry, there was a connexion problem with the datacite server.", "error" );
if (_this.origin === "welcome-page") {
_this.view.displayMessage('doi-not-found-page2', "<h3> Not found ! </h3> <p> Sorry, there was a connexion problem with the datacite server. </p>", "error" );
} else {
_this.view.displayMessage('doi-not-found-page', "Sorry, there was a connexion problem with the datacite server.", "main" );
_this.view.displayMessage('doi-not-found-page', "<h2> Not found ! </h2> <p> Sorry, there was a connexion problem with the datacite server. </p>", "main" );
}
_this.view.setLoading(false);
}
});
} else {
if (this.origin == "welcome-page") {
if (_this.origin === "welcome-page") {
_this.view.displayMessage('doi-not-found-page2', '<h3> Not found ! </h3> <p> The DOI <b>' + doi + '</b> was not found at ESRF because its prefix is not ESRF specific. Please use the DOI search engine at <a href="https://www.doi.org"> doi.org</a>. </p>', 'error');
} else {
_this.view.displayMessage('doi-not-found-page', '<h2> Not found ! </h2> <p> The DOI <b>' + doi + '</b> was not found at ESRF because its prefix is not ESRF specific. </br> Please use the DOI search engine at <a href="https://www.doi.org"> doi.org</a>.</p>', 'main');
......
<div class="container-fluid " style="color:black;">
<div class="row">
<div class="col lightRedBackground text-center rounded" style="border: 10px" >
<div class="col-3"> </div>
<div class="col-6 lightRedBackground text-center rounded">
<p> {message|s} </p>
</div>
</div>
<div class="col-3"> </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