Commit 974659eb authored by Maxime Chaillet's avatar Maxime Chaillet

#2 create page when doi is not found

parent 9b7ceca0
......@@ -11,7 +11,7 @@ module.exports = function(grunt) {
},
watch: {
files: ['<%= jshint.files %>', 'templates/**js'],
tasks: [ 'uglify','dustjs','wiredep']
tasks: [ 'uglify','dustjs','cssmin','wiredep']
},
uglify: {
options: {
......
......@@ -8,6 +8,10 @@
background-color: #132577 !important;
}
.lightRedBackground{
background-color: #ffcaca !important;
}
.grayBackground{
background-color: #dcdee2;
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
.flex{display:flex}.blueBackground{background-color:#132577!important}.grayBackground{background-color:#dcdee2}.whiteVCenteredFont{color:#fff;margin-top:auto;margin-bottom:auto}.btn{white-space:normal}.btn-primary:hover{background-color:#5b5a78;border-color:#2b2a48}.btn-primary{border-color:#2b2a48}label{font-weight:700}#logo{height:50px}
\ No newline at end of file
.flex{display:flex}.blueBackground{background-color:#132577!important}.lightRedBackground{background-color:#ffcaca!important}.grayBackground{background-color:#dcdee2}.whiteVCenteredFont{color:#fff;margin-top:auto;margin-bottom:auto}.btn{white-space:normal}.btn-primary:hover{background-color:#5b5a78;border-color:#2b2a48}.btn-primary{border-color:#2b2a48}label{font-weight:700}#logo{height:50px}
\ 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-3\" > </div><div class=\"col-6 blueBackground text-center\" > <img src=\"./src/esrfLogo.png\"> </img> </div><div class=\"col-3\"> </div></div><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\"><div class=\"row\"><div class=\"col-12 col-sm-4 blueBackground\" > <img id=\"logo\" src=\"./src/esrfLogo.png\"> </img> </div><div class=\"col-12 col-sm-8 blueBackground flex\"> <div class=\"col-12 whiteVCenteredFont text-right\" > ").f(ctx.getPath(false, ["investigation","doi"]),ctx,"h").w(" </div></div></div><div class=\"row\"><div class=\"col-8\" > <label>Title</label><p class=\"grayBackground\"> ").f(ctx.getPath(false, ["investigation","summary"]),ctx,"h").w(" </p><label> Abstract </label><p class=\"grayBackground\"> </p><p><label> Experimental report </label> <button type=\"button\" class=\"btn btn-primary btn-lg btn-block blueBackground disabled\" style='background-color:#D7D7D7; border:1px solid #D7D7D7;'>Download experimental report </button> </p><p><label> Download data </label><button type=\"button\" class=\"btn btn-primary btn-lg btn-block blueBackground disabled\" style='background-color:#D7D7D7; border:1px solid #D7D7D7;'>Download data </button></p></div><div class=\"col-4\"><div class=\"row\"> <div class=\"col-12\" ><label> Identifier </label><p> ").f(ctx.getPath(false, ["investigation","id"]),ctx,"h").w("</p><label> Authors </label>").s(ctx.getPath(false, ["investigation","investigationUsers"]),ctx,{"block":body_1},{}).w("<label> Publisher </label><p> ESRF </p><label> Publication year </label><p> year </p><label> Proposal number </label><p> ").f(ctx.getPath(false, ["investigation","name"]),ctx,"h").w(" </p> \t</div></div></div></div></div>");}body_0.__dustBody=!0;function body_1(chk,ctx){return chk.h("eq",ctx,{"block":body_2},{"key":ctx.get(["role"], false),"value":"Principal investigator"},"h").h("eq",ctx,{"block":body_3},{"key":ctx.get(["role"], false),"value":"Proposal scientist"},"h");}body_1.__dustBody=!0;function body_2(chk,ctx){return chk.w(" <p>").f(ctx.getPath(true, ["user","fullName"]),ctx,"h").w("</p> ");}body_2.__dustBody=!0;function body_3(chk,ctx){return chk.w("<p>").f(ctx.getPath(true, ["user","fullName"]),ctx,"h").w("</p>");}body_3.__dustBody=!0;return body_0}(dust));
\ No newline at end of file
......@@ -62,7 +62,13 @@ ICATClient.prototype.getByDOI = function(doi){
});
}
else {
alert("The DOI number " + doi + " was not found !");
dust.render('doi-not-found-page',
{
message : "Sorry, the requested DOI was not found."
},
function(err, out) {
$("#main").html(out);
});
}
},
// Code to run if the request fails
......
<div class="container-fluid">
<div class="row">
<div class="col-3" > </div>
<div class="col-6 blueBackground text-center" > <img src="./src/esrfLogo.png"> </img> </div>
<div class="col-3"> </div>
</div>
<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> {message} </p> </div>
<div class="col-3" > </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