Commit fd2c6b6f authored by Maxime Chaillet's avatar Maxime Chaillet

Merge branch 'issue63' into 'master'

Issue63

Closes #63

See merge request icat/doi-landing-page!74
parents 79f5bc72 fe6686c3
Pipeline #7888 passed with stages
in 1 minute and 13 seconds
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title> ESRF - DOI </title>
<link rel="icon" href="/src/images/favicon.ico">
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<!-- Using grunt-wiredep, the proper js files from bower components are included below -->
<!-- bower:js -->
<script src="bower_components/jquery/dist/jquery.js"></script>
<script src="bower_components/dustjs-linkedin/dist/dust-full.min.js"></script>
<script src="bower_components/bootstrap/dist/js/bootstrap.js"></script>
<script src="bower_components/dustjs-helpers/dist/dust-helpers.min.js"></script>
<script src="bower_components/lodash/lodash.js"></script>
<script src="bower_components/moment/moment.js"></script>
<!-- endbower -->
<!-- Using grunt-include-source, the proper js files created by us (not minified) are included below -->
<script src="src/author.js"></script>
<script src="src/beamlineurl.js"></script>
<script src="src/citation.js"></script>
<script src="src/constants.js"></script>
<script src="src/doicontroller.js"></script>
<script src="src/doiData.js"></script>
<script src="src/doiview.js"></script>
<script src="src/ESRF-DC-142893590.js"></script>
<script src="src/ESRF-DC-142915526.js"></script>
<script src="src/event.js"></script>
<script src="src/experimentalreportcontroller.js"></script>
<script src="src/jsonextractor.js"></script>
<script src="src/metadataTableHelper.js"></script>
<!-- bower:css -->
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css" />
<!-- endbower -->
<head>
<meta charset="UTF-8">
<title> ESRF - DOI </title>
<link rel="icon" href="/src/images/favicon.ico">
<!-- Using grunt-include-source, the proper all dustjs templates files (not minified are included below -->
<script src="min/precompiled.templates.min.js"></script>
<link rel="stylesheet" href="/min/output.min.css" >
<script type="text/javascript">
$(document).ready(function() {
var doi = document.location.search.substring(5);
if (doi==="") {
alert ("Please use dev.html page as follow .../dev.html?DOI=prefix/suffix");
} else {
new DOIController(new DOIView()).getData(doi);
}
});
</script>
</head>
<body>
<div class="container-fluid">
<div class="row align-items-center blueBackground">
<div class="col-12 col-sm-4" > <img id="logo" style="height:80px;" src="/src/images/esrflogo.png" alt="the ESRF logo"> </img> </div>
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<!-- Using grunt-wiredep, the proper js files from bower components are included below -->
<!-- bower:js -->
<script src="bower_components/jquery/dist/jquery.js"></script>
<script src="bower_components/dustjs-linkedin/dist/dust-full.min.js"></script>
<script src="bower_components/bootstrap/dist/js/bootstrap.js"></script>
<script src="bower_components/dustjs-helpers/dist/dust-helpers.min.js"></script>
<script src="bower_components/lodash/lodash.js"></script>
<script src="bower_components/moment/moment.js"></script>
<!-- endbower -->
<!-- Using grunt-include-source, the proper js files created by us (not minified) are included below -->
<script src="src/author.js"></script>
<script src="src/beamlineurl.js"></script>
<script src="src/citation.js"></script>
<script src="src/constants.js"></script>
<script src="src/doicontroller.js"></script>
<script src="src/doiData.js"></script>
<script src="src/doiview.js"></script>
<script src="src/ESRF-DC-142893590.js"></script>
<script src="src/ESRF-DC-142915526.js"></script>
<script src="src/event.js"></script>
<script src="src/experimentalreportcontroller.js"></script>
<script src="src/jsonextractor.js"></script>
<script src="src/metadataTableHelper.js"></script>
<!-- bower:css -->
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css" />
<!-- endbower -->
<!-- Using grunt-include-source, the proper all dustjs templates files (not minified are included below -->
<script src="min/precompiled.templates.min.js"></script>
<link rel="stylesheet" href="/min/output.min.css">
<script type="text/javascript">
$(document).ready(function () {
var doi = document.location.search.substring(5);
if (doi === "") {
alert("Please use dev.html page as follow .../dev.html?DOI=prefix/suffix");
} else {
new DOIController(new DOIView()).getData(doi);
}
});
</script>
</head>
<body>
<div class="container-fluid">
<div class="row align-items-center blueBackground">
<div class="col-12 col-sm-4"> <img id="logo" style="height:80px;" src="/src/images/esrflogo.png" alt="the ESRF logo">
</img> </div>
<div class="col"> </div>
<div class="col-auto">
<div class="whiteFont font-3p2rem" id="doiValue">
<!-- filled by the js code -->
</div>
<div class="whiteFont font-3p2rem" id="doiValue">
<!-- filled by the js code -->
</div>
</div>
</div>
</div>
</div>
</div>
<div id="main"></div>
<div id='error' ></div>
<div class="modal">
<div id="main"></div>
<div id='error'></div>
<div class="modal">
<!-- nothing to write here -->
</div>
<footer class="footer">
<div class="container-fluid">
</div>
<footer class="footer">
<div class="container-fluid">
<div class="row">
<div class="col-12 col-md-5" >
<p><a style='font-weight:bold;' href="http://www.esrf.eu">European Synchrotron Radiation Facility</a></p>
</div>
<div class="col-12 col-md-2" >
<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a>
</div>
<div class="col-12 col-md-5">
<p class="float-right" style="font-size:12px;display:block;" > Access to data is governed by the <a href="http://www.esrf.eu/files/live/sites/www/files/about/organisation/ESRF%20data%20policy-web.pdf" target="_blank">ESRF data policy</a>.</p>
</div>
<div class="col-12 col-md-5">
<p><a style='font-weight:bold;' href="http://www.esrf.eu">European Synchrotron Radiation Facility</a></p>
</div>
<div class="col-12 col-md-2">
<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License"
style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a>
</div>
<div class="col-12 col-md-5">
<p class="float-right" style="font-size:12px;display:block;"> Access to data is governed by the <a
href="http://www.esrf.eu/files/live/sites/www/files/about/organisation/ESRF%20data%20policy-web.pdf"
target="_blank">ESRF data policy</a>.</p>
</div>
</div>
</div>
</footer>
</body>
</html>
</div>
</footer>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<link rel="icon" href="/src/images/favicon.ico">
<title> ESRF - DOI </title>
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" href="/min/output.min.css" >
</head>
<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);
var controller = new DOIController(new DOIView());
if (doi !="") {
controller.setOrigin("index");
}
else {
controller.setOrigin("welcome-page");
}
controller.displayMainContent(doi);
});
// search the doi entered in the search box
function searchDOI(){
var doi = $('#doiSearchBox').val();
if (!doi){doi = $('#doiSearchBox').attr('placeholder')}
var controller = new DOIController(new DOIView());
controller.setOrigin("welcome-page");
controller.getData(doi);
};
</script>
</head>
<body>
<div class="container-fluid">
<div class="row align-items-center blueBackground">
<div class="col-12 col-sm-4" > <img id="logo" style="height:80px;" src="/src/images/esrflogo.png" alt="the ESRF logo"> </img> </div>
<head>
<meta charset="UTF-8">
<link rel="icon" href="/src/images/favicon.ico">
<title> ESRF - DOI </title>
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<link rel="stylesheet" href="/min/output.min.css">
</head>
<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);
var controller = new DOIController(new DOIView());
if (doi != "") {
controller.setOrigin("index");
}
else {
controller.setOrigin("welcome-page");
}
controller.displayMainContent(doi);
});
// search the doi entered in the search box
function searchDOI() {
var doi = $('#doiSearchBox').val();
if (!doi) { doi = $('#doiSearchBox').attr('placeholder') }
var controller = new DOIController(new DOIView());
controller.setOrigin("welcome-page");
controller.getData(doi);
};
</script>
</head>
<body>
<div class="container-fluid">
<div class="row align-items-center blueBackground">
<div class="col-12 col-sm-4">
<img id="logo" style="height:80px;" src="/src/images/esrflogo.png" alt="the ESRF logo">
</div>
<div class="col"> </div>
<div class="col-auto">
<div class="whiteFont font-3p2rem" id="doiValue">
<!-- filled by the js code -->
</div>
<div class="whiteFont font-3p2rem" id="doiValue">
<!-- filled by the js code -->
</div>
</div>
</div>
</div>
<div id='main' ></div>
<div id='error' ></div>
<div class="modal">
<!-- nothing to write here -->
</div>
<footer class="footer">
<div class="container-fluid">
</div>
</div>
<div id='main'></div>
<div id='error'></div>
<div class="modal">
<!-- nothing to write here -->
</div>
<footer class="footer">
<div class="container-fluid">
<div class="row">
<div class="col-12 col-md-5" >
<p><a style='font-weight:bold;' href="http://www.esrf.eu">European Synchrotron Radiation Facility</a></p>
</div>
<div class="col-12 col-md-2" >
<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a>
</div>
<div class="col-12 col-md-5">
<p class="float-right" style="font-size:12px;display:block;" > Access to data is governed by the <a href="http://www.esrf.eu/files/live/sites/www/files/about/organisation/ESRF%20data%20policy-web.pdf" target="_blank">ESRF data policy</a>.</p>
</div>
<div class="col-12 col-md-5">
<p><a style='font-weight:bold;' href="http://www.esrf.eu">European Synchrotron Radiation Facility</a></p>
</div>
<div class="col-12 col-md-2">
<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License"
style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a>
</div>
<div class="col-12 col-md-5">
<p class="float-right" style="font-size:12px;display:block;"> Access to data is governed by the <a
href="http://www.esrf.eu/files/live/sites/www/files/about/organisation/ESRF%20data%20policy-web.pdf"
target="_blank">ESRF data policy</a>.</p>
</div>
</div>
</div>
</footer>
</body>
</html>
</div>
</footer>
</body>
</html>
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
function Author(){}Author.prototype.setFirstName=function(e){this.firstName=e},Author.prototype.setFamilyName=function(e){this.familyName=e},Author.prototype.setSingleName=function(e){this.singleName=e},Author.prototype.getRawFamilyName=function(){if(this.familyName)return this.familyName;if(this.singleName){var e=new RegExp(/(\S+)/g),t=this.singleName.match(e);if(2===t.length)return this.familyName=t[1],this.familyName;var r=new RegExp(/\s([^a-z]+$)/).exec(this.singleName);return r&&(this.familyName=r[1]),this.familyName}},Author.prototype.getRawFirstName=function(){if(this.firstName)return this.firstName;if(this.singleName){var e=new RegExp(/(\S+)/g),t=this.singleName.match(e);if(2===t.length)return this.firstName=t[0],this.firstName;var r=new RegExp(/^(.[^A-Z]+)+\b/).exec(this.singleName);return r&&(this.firstName=r[0]),r}},Author.prototype.getTitleCaseFamilyName=function(){if(this.familyName){allLowerCase=this.familyName.toLowerCase();var e=new RegExp(/^./);return allLowerCase.replace(e,function(e){return e.toUpperCase()})}return console.log("family name is undefined"),null},Author.prototype.getFirstNameInitials=function(){var e=new RegExp(/(\S+)/g);return this.firstName?this.firstName.replace(e,function(e){return e.charAt(0)+"."}):(console.log("first name is undefined"),null)};var BEAMLINEURL=[{name:"BM05",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.fr/UsersAndScience/Experiments/XNP/BM05"},{name:"BM29",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/UsersAndScience/Experiments/MX/About_our_beamlines/BM29"},{name:"CM01",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/home/UsersAndScience/Experiments/MX/About_our_beamlines/CM01.html"},{name:"ID01",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/UsersAndScience/Experiments/XNP/ID01"},{name:"ID06",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/home/UsersAndScience/Experiments/MEx/id06-large-volume-press.html"},{name:"ID11",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.fr/UsersAndScience/Experiments/StructMaterials/ID11"},{name:"ID16A",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.fr/UsersAndScience/Experiments/XNP/ID16A"},{name:"ID16B",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.fr/UsersAndScience/Experiments/XNP/ID16B"},{name:"ID17",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.fr/UsersAndScience/Experiments/CBS/ID17"},{name:"ID19",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.fr/home/UsersAndScience/Experiments/StructMaterials/ID19.html"},{name:"ID21",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/UsersAndScience/Experiments/XNP/ID21"},{name:"ID22",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/id22"},{name:"ID23-1",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/UsersAndScience/Experiments/MX/About_our_beamlines/ID23-1"},{name:"ID23-2",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/UsersAndScience/Experiments/MX/About_our_beamlines/ID23-2"},{name:"ID29",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/home/UsersAndScience/Experiments/Beamlines/content/content/id29.html"},{name:"ID30A1",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/MASSIF1"},{name:"ID30A3",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/home/UsersAndScience/Experiments/MX/About_our_beamlines/id30a-3--massif-3.html"},{name:"ID30B",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/id30b"},{name:"ID32",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/ID32"}];function Citation(e){this.isBuildable=function(){if(e&&e.creators&&0!==e.creators.length&&e.title&&e.publisher&&e.doi){if(e.resourceType===CONSTANTS.ES_RESOURCE_TYPE&&e.sessionDate)return!0;if(e.resourceType===CONSTANTS.DC_RESOURCE_TYPE&&e.publiclyAccessibleYear)return!0}return!1}()}Citation.prototype.getAuthorsForCitation=function(e){if(this.isBuildable){var t=_.transform(e,function(e,t,r,n){n instanceof Array||(t=n);var i=null;if(t.givenName?((i=new Author).setFamilyName(t.familyName),i.setFirstName(t.givenName),e.push(i.getTitleCaseFamilyName()+" "+i.getFirstNameInitials())):((i=new Author).setSingleName(t.name),i.getRawFamilyName()&&i.getRawFirstName()?e.push(i.getTitleCaseFamilyName()+" "+i.getFirstNameInitials()):e.push(t.name)),!(n instanceof Array))return!1},[]);return _.join(t,", ")}return console.log("[CITATION GENERATION] Author list for the citation could not be generated."),""},Citation.prototype.getDOIRegistrationYear=function(e){return e.resourceType===CONSTANTS.ES_RESOURCE_TYPE?moment(e.sessionDate).year():e.resourceType===CONSTANTS.DC_RESOURCE_TYPE?e.publiclyAccessibleYear:(console.log("[CITATION GENERATION] Could not get the year to generate the citation."),"")};var CONSTANTS={ES_RESOURCE_TYPE:"experimental session resource type",DC_RESOURCE_TYPE:"dataset collection resource type"};function DOIController(e){var r=this;this.doiServer="https://data.datacite.org/",this.icatPlusServer="https://icatplus.esrf.fr/doi/",this.acceptedPrefix=["10.5072","10.15151"],this.view=e,this.experimentalReportController=new ExperimentalReportController,this.experimentalReportController.onSuccess.attach(function(e,t){r.view.renderExperimentalReportData(t)}),this.experimentalReportController.onError.attach(function(e,t){console.log("Error when retrieving fileList from SMIS."),r.view.renderErrorForExperimentalReport()})}function DoiData(e,t,r,n,i){this.doi=e,this.dataciteLink=t,this.publisher=r,this.creator=n,this.publiclyAccessibleYear=i}function DOIView(){this.mainPanelId="main",this.reportPanelId="expReport",this.badgePanelId="badges",this.metadataDivId="metadata",this.reportExperimentFileNames=null,this.failedRecievingExpReport=!1,this.isDOIAlreadyRendered=!1,this.onDOIRendered=new Event(this)}DOIController.prototype.isValidDOIData=function(e){return!0},DOIController.prototype.render=function(e,t){var r=this;if(r.isValidDOIData(t)){var n=new DoiData,i=new JsonExtractor;n.title=i.getTitle(t),n.doi=i.getDOI(t),n.dataciteLink=r.doiServer+e,n.publisher=i.getPublisher(t),n.creators=i.getCreators(t),n.publiclyAccessibleYear=i.getPubliclyAccessibleYear(t),n.abstract=i.getAbstract(t),n.investigationId=i.getInvestigationId(t),n.resourceType=i.getResourceType(t),n.proposalType=i.getFieldFromSubject(t.subjects,"Proposal Type Description"),n.resourceTypeGeneral=i.getResourceTypeGeneral(t),n.sessionDate=i.getSessionDate(t);var a=i.getFieldFromSubject(t.subjects,"Proposal"),o=i.getFieldFromSubject(t.subjects,"Instrument");r.experimentalReportController.requestFilenameList(a[0]),n.accessibility=n.getAccessibilityStatus(n.resourceType,n.sessionDate,n.publiclyAccessibleYear),n.accessMessage=r.view.setDataAccessMessage(n),n.citation=r.createCitation(n),n.resourceType===CONSTANTS.ES_RESOURCE_TYPE&&(n.beamlineUrls=r.getBeamlineUrl(o,n.sessionDate,n.resourceType),n.mintingYear=moment(n.sessionDate).year()),n.resourceType===CONSTANTS.DC_RESOURCE_TYPE&&(n.beamlineUrls=r.getBeamlineUrl(o,n.publiclyAccessibleYear,n.resourceType),n.mintingYear=n.publiclyAccessibleYear),n.mergedProposalBeamlines=i.getMergedProposalAndBeamline(a,o,n.beamlineUrls),r.view.renderDOIData(n)}else r.view.renderError("Not Found",r.origin)},DOIController.prototype.getData=function(n){var i=this;this.view.setDOIInTopBanner(n),"10.15151/ESRF-DC-142893590"!=n.toUpperCase()?"10.15151/ESRF-DC-142915526"!=n.toUpperCase()?this.hasAcceptedPrefix(n)?$.ajax({headers:{Accept:"application/vnd.datacite.datacite+json"},type:"GET",timeout:15e3,url:this.doiServer+n,beforeSend:function(){i.view.setLoading("Retrieving data from Server")},complete:function(){i.view.setLoading(!1)}}).done(function(e){e&&i.render(n,e)}).fail(function(e,t,r){$.ajax({type:"GET",timeout:15e3,url:i.icatPlusServer+n+"/json-datacite",beforeSend:function(){try{$("logo").fadeIn().fadeOut().fadeIn().fadeOut().fadeIn().fadeOut()}catch(e){}i.view.setLoading("Retrieving data from Server")},complete:function(){i.view.setLoading(!1)}}).done(function(e){e&&i.render(n,e)}).fail(function(e,t,r){i.view.renderError(e,r,i.origin),i.view.setLoading(!1)})}):i.view.renderError("Bad Prefix",i.origin):this.render(n,ESRF_DC_142915526):this.render(n,ESRF_DC_142893590)},DOIController.prototype.hasAcceptedPrefix=function(e){var t=e.split("/")[0];return-1!=_.findIndex(this.acceptedPrefix,function(e){return t==e})},DOIController.prototype.displayMainContent=function(e){"welcome-page"===this.origin&&dust.render("welcome_tpl",{},function(e,t){$("#main").html(t)}),"index"===this.origin&&this.getData(e)},DOIController.prototype.setOrigin=function(e){this.origin=e},DOIController.prototype.getBeamlineUrl=function(e,a,o){var s=[];return e.forEach(function(e){if(a){o===CONSTANTS.ES_RESOURCE_TYPE&&(a=moment(a)),o===CONSTANTS.DC_RESOURCE_TYPE&&(a=moment(a,"YYYY"));for(var t="",r=0;r<BEAMLINEURL.length;r++){var n=moment(BEAMLINEURL[r].startDate),i=moment(BEAMLINEURL[r].endDate);if(BEAMLINEURL[r].name.toLowerCase()===e.toLowerCase()&&n<=a&&a<=i){t=BEAMLINEURL[r].url;break}}""===t?s.push("noLink"):s.push(t)}else s.push("noLink")}),s},DOIController.prototype.createCitation=function(e){var t=new Citation(e);return t.isBuildable?t.getAuthorsForCitation(e.creators)+" ("+t.getDOIRegistrationYear(e)+"). "+e.title+". "+e.publisher+" (ESRF). <a href='https://doi.esrf.fr/"+e.doi+"'> doi:"+e.doi.toUpperCase()+"</a>":"The citation could not be generated."},DoiData.prototype.getAccessibilityStatus=function(e,t,r){if(e)if(e===CONSTANTS.ES_RESOURCE_TYPE){if(r&&t){var n=moment(r,"YYYY"),i=moment();if(n<i)return"Open access";if(i<=n)return"Restricted access"}}else if(e===CONSTANTS.DC_RESOURCE_TYPE)return"Open access";return console.log("Failed to determine whether the accessibility of the DOI."),"Accessibility status could not be determined"},DOIView.prototype.setLoading=function(e){0!=e?$("body").addClass("loading"):$("body").removeClass("loading")},DOIView.prototype.setDOIInTopBanner=function(e){$("#doiValue").text("DOI > "+e.toUpperCase())},DOIView.prototype.renderExperimentalReportData=function(e){if(e){var r=this;this.isDOIAlreadyRendered?dust.render("experimentalreport_tpl",{data:e},function(e,t){$("#"+r.reportPanelId).html(t)}):this.reportExperimentFileNames=e}},DOIView.prototype.renderDOIData=function(r){var n=this;dust.render("landingpage_tpl",{data:r,constants:CONSTANTS},function(e,t){$("#"+n.mainPanelId).html(t),n.isDOIAlreadyRendered=!0,n.renderBadges(r),n.renderMetadata(r),n.failedRecievingExpReport?n.renderErrorForExperimentalReport():n.reportExperimentFileNames&&n.renderExperimentalReportData(n.reportExperimentFileNames)})},DOIView.prototype.renderError=function(e,t,r){var n="welcome-page"===r?"doinotfound2_tpl":"doinotfound_tpl",i="";i="Bad Prefix"===t?"welcome-page"===r?'<h3> Not found ! </h3> <p> The DOI 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>':'<h2> Not found ! </h2> <p> The DOI 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>':"Not Found"===t?"welcome-page"===r?"<h3> Not found ! </h3> <p> Sorry, the requested DOI was not found. </p>":"<h2> Not found ! </h2> <p> Sorry, the requested DOI was not found. </p>":"timeout"===t?"welcome-page"===r?"<h3> Not found ! </h3> <p> Sorry, the server took too long to reply. Try again later. </p>":"<h2> Not found ! </h2> <p> Sorry, the server took too long to reply. Try again later. </p>":""===t&&"The resource you are looking for doesn't exist."===e.responseText?"welcome-page"===r?"<h3> Not found ! </h3> <p>It may take up to 24 hours for a newly generated DOI to become available. Please try again later.</p>":"<h2> Not found ! </h2> <p>It may take up to 24 hours for a newly generated DOI to become available. Please try again later.</p>":"welcome-page"===r?"<h3> Not found ! </h3> <p> Connexion problem to the datacite server. Please try again later.</p>":"<h2> Not found ! </h2> <p> Connexion problem to the datacite server. Please try again later.</p>",dust.render(n,{message:i},function(e,t){$("#error").html(t)})},DOIView.prototype.renderErrorForExperimentalReport=function(){this.failedRecievingExpReport=!0;$("#"+this.reportPanelId).html('<div class="card-header text-center"> <label>Experimental report </label> </div> <div class="card-body padding10"> <p> The filename list is not available. </p> </div>')},DOIView.prototype.renderBadges=function(e){if(e){var r=this;dust.render("badges_tpl",{data:e,constants:CONSTANTS},function(e,t){$("#"+r.badgePanelId).html(t)})}},DOIView.prototype.renderMetadata=function(e){if(e){var r=this;dust.render("metadata_tpl",{data:e,constants:CONSTANTS},function(e,t){$("#"+r.metadataDivId).html(t)})}},DOIView.prototype.setDataAccessMessage=function(e){return"Open access"===e.accessibility?"The data can be accessed by clicking on the link below":"Restricted access"===e.accessibility?"The data are under embargo until <b>"+e.publiclyAccessibleYear+"</b> but could be released earlier. Currently, they are only accessible to proposal team members.":void 0};var ESRF_DC_142893590={id:"https://doi.org/10.15151/esrf-dc-142893590",doi:"10.15151/ESRF-DC-142893590",url:"https://doi.esrf.fr/10.15151/ESRF-DC-142893590",types:{ris:"DATA",bibtex:"misc",citeproc:"dataset",schemaOrg:"Dataset",resourceType:"Datacollection",resourceTypeGeneral:"Dataset"},creators:[{name:"Naschberger, Andreas",nameType:"Personal",givenName:"Andreas",familyName:"Naschberger"},{name:"Bowler, Matthew W.",nameType:"Personal",givenName:"Matthew W.",familyName:"Bowler"},{name:"Rupp, Bernhard",nameType:"Personal",givenName:"Bernhard",familyName:"Rupp"}],titles:[{title:"Structural Evidence for a Role of the Multi-functional Human Glycoprotein Afamin in Wnt Transport"}],publisher:"European Synchrotron Radiation Facility",container:{},subjects:[{subject:"OPID-1",subjectScheme:"Proposal"},{subject:"ID30A1",subjectScheme:"Instrument"}],contributors:[],dates:[{date:"2018",dateType:"Issued"}],publicationYear:2018,language:"en",identifiers:[{identifier:"https://doi.org/10.15151/esrf-dc-142893590",identifierType:"DOI"}],sizes:[],formats:[],rightsList:[],descriptions:[{description:"Afamin, a human plasma glycoprotein and putative transporter of hydrophobic molecules, has been shown to act as extracellular chaperone for poorly soluble, acylated Wnt proteins, forming a stable, soluble complex with functioning Wnt proteins. The 2.1-Å crystal structure of glycosylated human afamin reveals an almost exclusively hydrophobic binding cleft capable of harboring large hydrophobic moieties. Lipid analysis confirms the presence of lipids, and density in the primary binding pocket of afamin was modeled as palmitoleic acid, presenting the native O-acylation on serine 209 in human Wnt3a. The modeled complex between the experimental afamin structure and a Wnt3a homology model based on the XWnt8-Fz8-CRD fragment complex crystal structure is compelling, with favorable interactions comparable with the crystal structure complex. Afamin readily accommodates the conserved palmitoylated serine 209 of Wnt3a, providing a structural basis how afamin solubilizes hydrophobic and poorly soluble Wnt proteins.",descriptionType:"Abstract"}],geoLocations:[],fundingReferences:[],relatedIdentifiers:[],schemaVersion:"http://datacite.org/schema/kernel-3",providerId:"inist",clientId:"inist.esrf",state:"findable"},ESRF_DC_142915526={id:"https://doi.org/10.15151/esrf-dc-142915526",doi:"10.15151/ESRF-DC-142915526",url:"https://doi.esrf.fr/10.15151/ESRF-DC-142915526",types:{ris:"DATA",bibtex:"misc",citeproc:"dataset",schemaOrg:"Dataset",resourceType:"Datacollection",resourceTypeGeneral:"Dataset"},creators:[{name:"Naschberger, Andreas",nameType:"Personal",givenName:"Andreas",familyName:"Naschberger"},{name:"Bowler, Matthew W.",nameType:"Personal",givenName:"Matthew W.",familyName:"Bowler"},{name:"Rupp, Bernhard",nameType:"Personal",givenName:"Bernhard",familyName:"Rupp"}],titles:[{title:"Controlled dehydration, structural flexibility, and Gadolinium MRI contrast compound binding in human plasma glycoprotein afamin"}],publisher:"European Synchrotron Radiation Facility",container:{},subjects:[{subject:"OPID-1",subjectScheme:"Proposal"},{subject:"ID30A1",subjectScheme:"Instrument"}],contributors:[],dates:[{date:"2018",dateType:"Issued"}],publicationYear:2018,language:"en",identifiers:[{identifier:"https://doi.org/10.15151/esrf-dc-142915526",identifierType:"DOI"}],sizes:[],formats:[],rightsList:[],descriptions:[{description:"Afamin, a human blood plasma glycoprotein, a putative multi-functional transporter of hydrophobic molecules and a marker for metabolic syndrome, poses multiple challenges for crystallographic structure determination, both practically and in analysis of the models. Several hundred crystals were analysed, and unusual variability in cell volume and difficulty solving the structure despite a ~34% sequence identity with non-glycosylated human serum albumin indicated that the molecule exhibits variable and context-sensitive packing, despite greatly simplified glycosylation in insect cell expressed recombinant afamin. Controlled dehydration of the crystals was able to stabilise the orthorhombic crystal form reducing the number of molecules in the asymmetric unit from the monoclinic form and changing the conformational states of the protein. An iterative strategy using fully automatic experiments available on MASSIF-1 was used to quickly determine the optimal protocol to achieve the phase transition that should be readily applicable to many types of sample. The study also highlights the drawback of using a single crystallographic structure model for computation modelling purposes given that conformational state of the binding sites and electron density in the binding site, likely resulting from PEGs, greatly varies between models. This also holds for the analysis of unspecific low-affinity ligands, where often a variety fragments with similar uncertainty can be modelled, inviting interpretative bias. As a promiscuous transporter, afamin can also bind Gadoteridol, a magnetic resonance imaging contrast compound in two sites, one near the human albumin Sudlow-site and a second hitherto unknown binding site.",descriptionType:"Abstract"}],geoLocations:[],fundingReferences:[],relatedIdentifiers:[],schemaVersion:"http://datacite.org/schema/kernel-3",providerId:"inist",clientId:"inist.esrf",state:"findable"};function Event(e){this._sender=e,this._listeners=[]}function ExperimentalReportController(){this.server="https://wwws.esrf.fr/misapps/SMISServer/rest/reports/fileNames",this.timeout=5e3,this.onSuccess=new Event(this),this.onError=new Event(this)}function JsonExtractor(){}function proposalBeamlineTable(e,t,r,n){var i=n.mergedProposalBeamlines;if(e.write('<table class="table table-striped">'),e.write("<thead>"),e.write("<tr>"),e.write('<th scope="col">Proposals</th>'),e.write('<th scope="col">Beamlines</th>'),e.write("</tr>"),e.write("</thead>"),e.write("<tbody>"),i){for(var a=0;a<i.length;a++)if(i[a]){var o=i[a].proposal||"unknown",s=i[a].beamline||"unknown",l=i[a].beamlineUrl;e.write("<tr>"),e.write("<td>"+o+"</td>"),"noLink"===l?e.write("<td>"+s+"</td>"):e.write('<td> <a href="'+l+'" target="_blank">'+s+" </a> </td>"),e.write("</tr>")}else e.write("<tr>"),chunck.write("<td> unknown </td>"),chunck.write("<td> unknown </td>"),e.write("</tr>");return e.write("</tbody>"),e.write("</table>"),e.render(r.block,t)}}function abstract(e,t,r,n){var i=n.abstract;return e.write('<div class="myBorder-left">'),e.write("<label> Abstract </label>"),e.write('<div class="padding-left-15">'),i?e.write(i):e.write("There is no abstract for this session."),e.write("</div >"),e.write("</div >"),e.render(r.block,t)}Event.prototype={attach:function(e){this._listeners.push(e)},notify:function(e){for(var t=0;t<this._listeners.length;t++)this._listeners[t](this._sender,e)}},ExperimentalReportController.prototype.normalizeProposalName=function(t){var r;try{return{categoryCode:(r=new RegExp(/^(.*)-(.*)/)).exec(t)[1],categoryCounter:r.exec(t)[2]}}catch(e){r=new RegExp(/\d+$/);try{return{categoryCode:t.substring(0,t.length-r.exec(t)[0].length),categoryCounter:r.exec(t)[0]}}catch(e){return console.log(e),null}}},ExperimentalReportController.prototype.requestFilenameList=function(e){var t=this;if(e){var r=this.normalizeProposalName(e);r?$.ajax({type:"GET",timeout:this.timeout,url:this.server,data:r,dataType:"json",success:function(e){t.onSuccess.notify(e)},error:function(e){t.onError.notify(e)}}):t.onError.notify("Proposal could not be normalized: "+e)}else t.onError.notify("Proposal is null")},ExperimentalReportController.prototype.openFileInNewTab=function(t){if(t)try{window.open("ftp://www.esrf.eu/pub/UserReports/"+t,"_blank")}catch(e){alert("The requested file "+t+" could not be downloaded.")}},JsonExtractor.prototype.getTitle=function(e){return e&&e.titles&&0<e.titles.length&&e.titles[0].title?e.titles[0].title:(console.log("[JSON EXTRACTOR ERROR] title extraction failed."),null)},JsonExtractor.prototype.getDOI=function(e){return e&&e.doi?e.doi.toUpperCase():(console.log("[JSON EXTRACTOR ERROR] doi extraction failed."),null)},JsonExtractor.prototype.getPublisher=function(e){return e&&e.publisher?e.publisher:(console.log("[JSON EXTRACTOR ERROR] publisher extraction failed."),null)},JsonExtractor.prototype.getCreators=function(e){return e&&e.creators?_.map(e.creators,function(e){return e.givenName&&e.familyName||e.name?e:(console.log("[JSON EXTRACTOR ERROR] one of the creator could not be properly extracted."),{})}):(console.log("[JSON EXTRACTOR ERROR] Extraction of the creators failed."),null)},JsonExtractor.prototype.getPubliclyAccessibleYear=function(e){return e&&e.publicationYear?e.publicationYear:(console.log("[JSON EXTRACTOR ERROR] Extraction of the publication year failed."),null)},JsonExtractor.prototype.getInvestigationId=function(e){var t=RegExp(/\/\w*-*[Ee][Ss][Rr][Ff]-[Ee][Ss]-(\d+)$/);return t.exec(e.doi)?t.exec(e.doi)[1]:(console.log("[JSON EXTRACTOR ERROR] investigationId extraction failed."),null)},JsonExtractor.prototype.getFieldFromSubject=function(e,t){if(e)for(var r=new RegExp("^"+t+"$","i"),n=0;n<e.length;n++)if(r.test(e[n].subjectScheme)&&e[n].subject)return _.split(e[n].subject,",");return null},JsonExtractor.prototype.getMintingYear=function(e){},JsonExtractor.prototype.getSessionDate=function(e){if(e&&e.dates&&e.dates instanceof Array){var t=_.find(e.dates,function(e){if(e.dateType)return"collected"===e.dateType.toLowerCase()});if(t&&t.date)return moment(t.date).format("YYYY-M-D")}return console.log("[JSON EXTRACTOR ERROR] Extraction of session date failed."),null},JsonExtractor.prototype.getResourceTypeGeneral=function(e){if(e&&e.types)for(var t in e.types)if("resourceTypeGeneral"===t)return e.types[t];return console.log("[JSON EXTRACTOR ERROR] Extraction of resource type general failed."),null},JsonExtractor.prototype.getResourceType=function(e){if(e&&e.types)for(var t in e.types)if("resourceType"===t){if("Experiment Session"===e.types[t])return CONSTANTS.ES_RESOURCE_TYPE;if("Datacollection"===e.types[t])return CONSTANTS.DC_RESOURCE_TYPE}return console.log("[JSON EXTRACTOR ERROR] Extraction of resource type failed."),null},JsonExtractor.prototype.getAbstract=function(e){if(e&&e.descriptions){var t=_.find(e.descriptions,function(e){return"abstract"===e.descriptionType.toLowerCase()});if(t)return t.description}return console.log("[JSON EXTRACTOR ERROR] Extraction of the abstract failed."),null},JsonExtractor.prototype.getMergedProposalAndBeamline=function(e,t,r){if(e&&t&&r&&e.length===t.length&&e.length===r.length){for(var n=[],i=0;i<e.length;i++)n.push({proposal:e[i],beamline:t[i],beamlineUrl:r[i]});return _.uniqBy(n,function(e){return JSON.stringify(e)})}return null},dust.helpers.proposalBeamlineTable=proposalBeamlineTable,dust.helpers.abstract=abstract;
\ No newline at end of file
function Author(){}function Citation(e){this.isBuildable=function(){if(e&&e.creators&&0!==e.creators.length&&e.title&&e.publisher&&e.doi){if(e.resourceType===CONSTANTS.ES_RESOURCE_TYPE&&e.sessionDate)return!0;if(e.resourceType===CONSTANTS.DC_RESOURCE_TYPE&&e.publiclyAccessibleYear)return!0}return!1}()}function DOIController(e){var t=this;this.doiServer="https://data.datacite.org/",this.icatPlusServer="https://icatplus.esrf.fr/doi/",this.acceptedPrefix=["10.5072","10.15151"],this.view=e,this.experimentalReportController=new ExperimentalReportController,this.experimentalReportController.onSuccess.attach(function(e,r){t.view.renderExperimentalReportData(r)}),this.experimentalReportController.onError.attach(function(e,r){console.log("Error when retrieving fileList from SMIS."),t.view.renderErrorForExperimentalReport()})}function DoiData(e,t,r,i,n){this.doi=e,this.dataciteLink=t,this.publisher=r,this.creator=i,this.publiclyAccessibleYear=n}function DOIView(){this.mainPanelId="main",this.reportPanelId="expReport",this.badgePanelId="badges",this.metadataDivId="metadata",this.reportExperimentFileNames=null,this.failedRecievingExpReport=!1,this.isDOIAlreadyRendered=!1,this.onDOIRendered=new Event(this)}function Event(e){this._sender=e,this._listeners=[]}function ExperimentalReportController(){this.server="https://wwws.esrf.fr/misapps/SMISServer/rest/reports/fileNames",this.timeout=5e3,this.onSuccess=new Event(this),this.onError=new Event(this)}function JsonExtractor(){}function proposalBeamlineTable(e,t,r,i){var n=i.mergedProposalBeamlines;if(e.write('<table class="table table-striped">'),e.write("<thead>"),e.write("<tr>"),e.write('<th scope="col">Proposals</th>'),e.write('<th scope="col">Beamlines</th>'),e.write("</tr>"),e.write("</thead>"),e.write("<tbody>"),n){for(var a=0;a<n.length;a++)if(n[a]){var o=n[a].proposal||"unknown",s=n[a].beamline||"unknown",l=n[a].beamlineUrl;e.write("<tr>"),e.write("<td>"+o+"</td>"),"noLink"===l?e.write("<td>"+s+"</td>"):e.write('<td> <a href="'+l+'" target="_blank">'+s+" </a> </td>"),e.write("</tr>")}else e.write("<tr>"),chunck.write("<td> unknown </td>"),chunck.write("<td> unknown </td>"),e.write("</tr>");return e.write("</tbody>"),e.write("</table>"),e.render(r.block,t)}}function abstract(e,t,r,i){var n=i.abstract;return e.write('<div class="myBorder-left">'),e.write("<label> Abstract </label>"),e.write('<div class="padding-left-15">'),n?e.write(n):e.write("There is no abstract for this session."),e.write("</div >"),e.write("</div >"),e.render(r.block,t)}Author.prototype.setFirstName=function(e){this.firstName=e},Author.prototype.setFamilyName=function(e){this.familyName=e},Author.prototype.setSingleName=function(e){this.singleName=e},Author.prototype.getRawFamilyName=function(){if(this.familyName)return this.familyName;if(this.singleName){var e=new RegExp(/(\S+)/g),t=this.singleName.match(e);if(2===t.length)return this.familyName=t[1],this.familyName;var r=new RegExp(/\s([^a-z]+$)/).exec(this.singleName);return r&&(this.familyName=r[1]),this.familyName}},Author.prototype.getRawFirstName=function(){if(this.firstName)return this.firstName;if(this.singleName){var e=new RegExp(/(\S+)/g),t=this.singleName.match(e);if(2===t.length)return this.firstName=t[0],this.firstName;var r=new RegExp(/^(.[^A-Z]+)+\b/).exec(this.singleName);return r&&(this.firstName=r[0]),r}},Author.prototype.getTitleCaseFamilyName=function(){if(this.familyName){allLowerCase=this.familyName.toLowerCase();var e=new RegExp(/^./);return allLowerCase.replace(e,function(e){return e.toUpperCase()})}return console.log("family name is undefined"),null},Author.prototype.getFirstNameInitials=function(){var e=new RegExp(/(\S+)/g);return this.firstName?this.firstName.replace(e,function(e){return e.charAt(0)+"."}):(console.log("first name is undefined"),null)};var BEAMLINEURL=[{name:"BM05",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.fr/UsersAndScience/Experiments/XNP/BM05"},{name:"BM29",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/UsersAndScience/Experiments/MX/About_our_beamlines/BM29"},{name:"CM01",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/home/UsersAndScience/Experiments/MX/About_our_beamlines/CM01.html"},{name:"ID01",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/UsersAndScience/Experiments/XNP/ID01"},{name:"ID06",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/home/UsersAndScience/Experiments/MEx/id06-large-volume-press.html"},{name:"ID11",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.fr/UsersAndScience/Experiments/StructMaterials/ID11"},{name:"ID16A",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.fr/UsersAndScience/Experiments/XNP/ID16A"},{name:"ID16B",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.fr/UsersAndScience/Experiments/XNP/ID16B"},{name:"ID17",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.fr/UsersAndScience/Experiments/CBS/ID17"},{name:"ID19",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.fr/home/UsersAndScience/Experiments/StructMaterials/ID19.html"},{name:"ID21",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/UsersAndScience/Experiments/XNP/ID21"},{name:"ID22",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/id22"},{name:"ID23-1",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/UsersAndScience/Experiments/MX/About_our_beamlines/ID23-1"},{name:"ID23-2",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/UsersAndScience/Experiments/MX/About_our_beamlines/ID23-2"},{name:"ID29",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/home/UsersAndScience/Experiments/Beamlines/content/content/id29.html"},{name:"ID30A1",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/MASSIF1"},{name:"ID30A3",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/home/UsersAndScience/Experiments/MX/About_our_beamlines/id30a-3--massif-3.html"},{name:"ID30B",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/id30b"},{name:"ID32",startDate:"2000-01-01T00:00+00:00",endDate:"2100-12-31T00:00+00:00",url:"http://www.esrf.eu/ID32"}];Citation.prototype.getAuthorsForCitation=function(e){if(this.isBuildable){var t=_.transform(e,function(e,t,r,i){i instanceof Array||(t=i);var n=null;if(t.givenName?((n=new Author).setFamilyName(t.familyName),n.setFirstName(t.givenName),e.push(n.getTitleCaseFamilyName()+" "+n.getFirstNameInitials())):((n=new Author).setSingleName(t.name),n.getRawFamilyName()&&n.getRawFirstName()?e.push(n.getTitleCaseFamilyName()+" "+n.getFirstNameInitials()):e.push(t.name)),!(i instanceof Array))return!1},[]);return _.join(t,", ")}return console.log("[CITATION GENERATION] Author list for the citation could not be generated."),""},Citation.prototype.getDOIRegistrationYear=function(e){return e.resourceType===CONSTANTS.ES_RESOURCE_TYPE?moment(e.sessionDate).year():e.resourceType===CONSTANTS.DC_RESOURCE_TYPE?e.publiclyAccessibleYear:(console.log("[CITATION GENERATION] Could not get the year to generate the citation."),"")};var CONSTANTS={ES_RESOURCE_TYPE:"experimental session resource type",DC_RESOURCE_TYPE:"dataset collection resource type"};DOIController.prototype.isValidDOIData=function(e){return!0},DOIController.prototype.render=function(e,t){if(this.isValidDOIData(t)){var r=new DoiData,i=new JsonExtractor;r.title=i.getTitle(t),r.doi=i.getDOI(t),r.dataciteLink=this.doiServer+e,r.publisher=i.getPublisher(t),r.creators=i.getCreators(t),r.publiclyAccessibleYear=i.getPubliclyAccessibleYear(t),r.abstract=i.getAbstract(t),r.investigationId=i.getInvestigationId(t),r.resourceType=i.getResourceType(t),r.proposalType=i.getFieldFromSubject(t.subjects,"Proposal Type Description"),r.resourceTypeGeneral=i.getResourceTypeGeneral(t),r.sessionDate=i.getSessionDate(t);var n=i.getFieldFromSubject(t.subjects,"Proposal"),a=i.getFieldFromSubject(t.subjects,"Instrument");this.experimentalReportController.requestFilenameList(n[0]),r.accessibility=r.getAccessibilityStatus(r.resourceType,r.sessionDate,r.publiclyAccessibleYear),r.accessMessage=this.view.setDataAccessMessage(r),r.citation=this.createCitation(r),r.resourceType===CONSTANTS.ES_RESOURCE_TYPE&&(r.beamlineUrls=this.getBeamlineUrl(a,r.sessionDate,r.resourceType),r.mintingYear=moment(r.sessionDate).year()),r.resourceType===CONSTANTS.DC_RESOURCE_TYPE&&(r.beamlineUrls=this.getBeamlineUrl(a,r.publiclyAccessibleYear,r.resourceType),r.mintingYear=r.publiclyAccessibleYear),r.mergedProposalBeamlines=i.getMergedProposalAndBeamline(n,a,r.beamlineUrls),this.view.renderDOIData(r)}else this.view.renderError("Not Found",this.origin)},DOIController.prototype.getData=function(e){var t=this;this.view.setDOIInTopBanner(e),"10.15151/ESRF-DC-142893590"!=e.toUpperCase()?"10.15151/ESRF-DC-142915526"!=e.toUpperCase()?this.hasAcceptedPrefix(e)?($.ajax({headers:{Accept:"application/vnd.datacite.datacite+json"},type:"GET",timeout:15e3,url:this.doiServer+e,beforeSend:function(){t.view.setLoading("Retrieving data from Server")},complete:function(){t.view.setLoading(!1)}}).done(function(r){r&&t.render(e,r)}).fail(function(r,i,n){$.ajax({type:"GET",timeout:15e3,url:t.icatPlusServer+e+"/json-datacite",beforeSend:function(){try{$("logo").fadeIn().fadeOut().fadeIn().fadeOut().fadeIn().fadeOut()}catch(e){}t.view.setLoading("Retrieving data from Server")},complete:function(){t.view.setLoading(!1)}}).done(function(r){r&&t.render(e,r)}).fail(function(e,r,i){t.view.renderError(e,i,t.origin),t.view.setLoading(!1)})}),this.getDataForGoogleSearch(e)):t.view.renderError("Bad Prefix",t.origin):this.render(e,ESRF_DC_142915526):this.render(e,ESRF_DC_142893590)},DOIController.prototype.getDataForGoogleSearch=function(e){var t=this;e&&$.ajax({headers:{Accept:"application/vnd.schemaorg.ld+json"},type:"GET",timeout:15e3,url:"https://data.datacite.org/"+e,dataType:"text",success:function(e){e&&t.view.addDOIMetadataToHead(e),console.log("[GOOGLE SEARCH INDEXING] - No metadata recieved from datacite.")},error:function(e){console.log("[GOOGLE SEARCH INDEXING] - Failed getting metadata from datacite."),console.log(e.responseJSON)}})},DOIController.prototype.hasAcceptedPrefix=function(e){var t=e.split("/")[0];return-1!=_.findIndex(this.acceptedPrefix,function(e){return t==e})},DOIController.prototype.displayMainContent=function(e){"welcome-page"===this.origin&&dust.render("welcome_tpl",{},function(e,t){$("#main").html(t)}),"index"===this.origin&&this.getData(e)},DOIController.prototype.setOrigin=function(e){this.origin=e},DOIController.prototype.getBeamlineUrl=function(e,t,r){var i=[];return e.forEach(function(e){if(t){r===CONSTANTS.ES_RESOURCE_TYPE&&(t=moment(t)),r===CONSTANTS.DC_RESOURCE_TYPE&&(t=moment(t,"YYYY"));for(var n="",a=0;a<BEAMLINEURL.length;a++){var o=moment(BEAMLINEURL[a].startDate),s=moment(BEAMLINEURL[a].endDate);if(BEAMLINEURL[a].name.toLowerCase()===e.toLowerCase()&&t>=o&&t<=s){n=BEAMLINEURL[a].url;break}}""===n?i.push("noLink"):i.push(n)}else i.push("noLink")}),i},DOIController.prototype.createCitation=function(e){var t=new Citation(e);if(t.isBuildable){return t.getAuthorsForCitation(e.creators)+" ("+t.getDOIRegistrationYear(e)+"). "+e.title+". "+e.publisher+" (ESRF). <a href='https://doi.esrf.fr/"+e.doi+"'> doi:"+e.doi.toUpperCase()+"</a>"}return"The citation could not be generated."},DoiData.prototype.getAccessibilityStatus=function(e,t,r){if(e)if(e===CONSTANTS.ES_RESOURCE_TYPE){if(r&&t){var i=moment(r,"YYYY"),n=moment();if(n>i)return"Open access";if(n<=i)return"Restricted access"}}else if(e===CONSTANTS.DC_RESOURCE_TYPE)return"Open access";return console.log("Failed to determine whether the accessibility of the DOI."),"Accessibility status could not be determined"},DOIView.prototype.setLoading=function(e){0!=e?$("body").addClass("loading"):$("body").removeClass("loading")},DOIView.prototype.setDOIInTopBanner=function(e){$("#doiValue").text("DOI > "+e.toUpperCase())},DOIView.prototype.renderExperimentalReportData=function(e){if(e){var t=this;this.isDOIAlreadyRendered?dust.render("experimentalreport_tpl",{data:e},function(e,r){$("#"+t.reportPanelId).html(r)}):this.reportExperimentFileNames=e}},DOIView.prototype.renderDOIData=function(e){var t=this;dust.render("landingpage_tpl",{data:e,constants:CONSTANTS},function(r,i){$("#"+t.mainPanelId).html(i),t.isDOIAlreadyRendered=!0,t.renderBadges(e),t.renderMetadata(e),t.failedRecievingExpReport?t.renderErrorForExperimentalReport():t.reportExperimentFileNames&&t.renderExperimentalReportData(t.reportExperimentFileNames)})},DOIView.prototype.renderError=function(e,t,r){var i="welcome-page"===r?"doinotfound2_tpl":"doinotfound_tpl",n="";n="Bad Prefix"===t?"welcome-page"===r?'<h3> Not found ! </h3> <p> The DOI 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>':'<h2> Not found ! </h2> <p> The DOI 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>':"Not Found"===t?"welcome-page"===r?"<h3> Not found ! </h3> <p> Sorry, the requested DOI was not found. </p>":"<h2> Not found ! </h2> <p> Sorry, the requested DOI was not found. </p>":"timeout"===t?"welcome-page"===r?"<h3> Not found ! </h3> <p> Sorry, the server took too long to reply. Try again later. </p>":"<h2> Not found ! </h2> <p> Sorry, the server took too long to reply. Try again later. </p>":""===t&&"The resource you are looking for doesn't exist."===e.responseText?"welcome-page"===r?"<h3> Not found ! </h3> <p>It may take up to 24 hours for a newly generated DOI to become available. Please try again later.</p>":"<h2> Not found ! </h2> <p>It may take up to 24 hours for a newly generated DOI to become available. Please try again later.</p>":"welcome-page"===r?"<h3> Not found ! </h3> <p> Connexion problem to the datacite server. Please try again later.</p>":"<h2> Not found ! </h2> <p> Connexion problem to the datacite server. Please try again later.</p>",dust.render(i,{message:n},function(e,t){$("#error").html(t)})},DOIView.prototype.renderErrorForExperimentalReport=function(){this.failedRecievingExpReport=!0;$("#"+this.reportPanelId).html('<div class="card-header text-center"> <label>Experimental report </label> </div> <div class="card-body padding10"> <p> The filename list is not available. </p> </div>')},DOIView.prototype.renderBadges=function(e){if(e){var t=this;dust.render("badges_tpl",{data:e,constants:CONSTANTS},function(e,r){$("#"+t.badgePanelId).html(r)})}},DOIView.prototype.renderMetadata=function(e){if(e){var t=this;dust.render("metadata_tpl",{data:e,constants:CONSTANTS},function(e,r){$("#"+t.metadataDivId).html(r)})}},DOIView.prototype.setDataAccessMessage=function(e){return"Open access"===e.accessibility?"The data can be accessed by clicking on the link below":"Restricted access"===e.accessibility?"The data are under embargo until <b>"+e.publiclyAccessibleYear+"</b> but could be released earlier. Currently, they are only accessible to proposal team members.":void 0},DOIView.prototype.addDOIMetadataToHead=function(e){$("<script>").attr("type","application/ld+json").text(e).appendTo("head")};var ESRF_DC_142893590={id:"https://doi.org/10.15151/esrf-dc-142893590",doi:"10.15151/ESRF-DC-142893590",url:"https://doi.esrf.fr/10.15151/ESRF-DC-142893590",types:{ris:"DATA",bibtex:"misc",citeproc:"dataset",schemaOrg:"Dataset",resourceType:"Datacollection",resourceTypeGeneral:"Dataset"},creators:[{name:"Naschberger, Andreas",nameType:"Personal",givenName:"Andreas",familyName:"Naschberger"},{name:"Bowler, Matthew W.",nameType:"Personal",givenName:"Matthew W.",familyName:"Bowler"},{name:"Rupp, Bernhard",nameType:"Personal",givenName:"Bernhard",familyName:"Rupp"}],titles:[{title:"Structural Evidence for a Role of the Multi-functional Human Glycoprotein Afamin in Wnt Transport"}],publisher:"European Synchrotron Radiation Facility",container:{},subjects:[{subject:"OPID-1",subjectScheme:"Proposal"},{subject:"ID30A1",subjectScheme:"Instrument"}],contributors:[],dates:[{date:"2018",dateType:"Issued"}],publicationYear:2018,language:"en",identifiers:[{identifier:"https://doi.org/10.15151/esrf-dc-142893590",identifierType:"DOI"}],sizes:[],formats:[],rightsList:[],descriptions:[{description:"Afamin, a human plasma glycoprotein and putative transporter of hydrophobic molecules, has been shown to act as extracellular chaperone for poorly soluble, acylated Wnt proteins, forming a stable, soluble complex with functioning Wnt proteins. The 2.1-Å crystal structure of glycosylated human afamin reveals an almost exclusively hydrophobic binding cleft capable of harboring large hydrophobic moieties. Lipid analysis confirms the presence of lipids, and density in the primary binding pocket of afamin was modeled as palmitoleic acid, presenting the native O-acylation on serine 209 in human Wnt3a. The modeled complex between the experimental afamin structure and a Wnt3a homology model based on the XWnt8-Fz8-CRD fragment complex crystal structure is compelling, with favorable interactions comparable with the crystal structure complex. Afamin readily accommodates the conserved palmitoylated serine 209 of Wnt3a, providing a structural basis how afamin solubilizes hydrophobic and poorly soluble Wnt proteins.",descriptionType:"Abstract"}],geoLocations:[],fundingReferences:[],relatedIdentifiers:[],schemaVersion:"http://datacite.org/schema/kernel-3",providerId:"inist",clientId:"inist.esrf",state:"findable"},ESRF_DC_142915526={id:"https://doi.org/10.15151/esrf-dc-142915526",doi:"10.15151/ESRF-DC-142915526",url:"https://doi.esrf.fr/10.15151/ESRF-DC-142915526",types:{ris:"DATA",bibtex:"misc",citeproc:"dataset",schemaOrg:"Dataset",resourceType:"Datacollection",resourceTypeGeneral:"Dataset"},creators:[{name:"Naschberger, Andreas",nameType:"Personal",givenName:"Andreas",familyName:"Naschberger"},{name:"Bowler, Matthew W.",nameType:"Personal",givenName:"Matthew W.",familyName:"Bowler"},{name:"Rupp, Bernhard",nameType:"Personal",givenName:"Bernhard",familyName:"Rupp"}],titles:[{title:"Controlled dehydration, structural flexibility, and Gadolinium MRI contrast compound binding in human plasma glycoprotein afamin"}],publisher:"European Synchrotron Radiation Facility",container:{},subjects:[{subject:"OPID-1",subjectScheme:"Proposal"},{subject:"ID30A1",subjectScheme:"Instrument"}],contributors:[],dates:[{date:"2018",dateType:"Issued"}],publicationYear:2018,language:"en",identifiers:[{identifier:"https://doi.org/10.15151/esrf-dc-142915526",identifierType:"DOI"}],sizes:[],formats:[],rightsList:[],descriptions:[{description:"Afamin, a human blood plasma glycoprotein, a putative multi-functional transporter of hydrophobic molecules and a marker for metabolic syndrome, poses multiple challenges for crystallographic structure determination, both practically and in analysis of the models. Several hundred crystals were analysed, and unusual variability in cell volume and difficulty solving the structure despite a ~34% sequence identity with non-glycosylated human serum albumin indicated that the molecule exhibits variable and context-sensitive packing, despite greatly simplified glycosylation in insect cell expressed recombinant afamin. Controlled dehydration of the crystals was able to stabilise the orthorhombic crystal form reducing the number of molecules in the asymmetric unit from the monoclinic form and changing the conformational states of the protein. An iterative strategy using fully automatic experiments available on MASSIF-1 was used to quickly determine the optimal protocol to achieve the phase transition that should be readily applicable to many types of sample. The study also highlights the drawback of using a single crystallographic structure model for computation modelling purposes given that conformational state of the binding sites and electron density in the binding site, likely resulting from PEGs, greatly varies between models. This also holds for the analysis of unspecific low-affinity ligands, where often a variety fragments with similar uncertainty can be modelled, inviting interpretative bias. As a promiscuous transporter, afamin can also bind Gadoteridol, a magnetic resonance imaging contrast compound in two sites, one near the human albumin Sudlow-site and a second hitherto unknown binding site.",descriptionType:"Abstract"}],geoLocations:[],fundingReferences:[],relatedIdentifiers:[],schemaVersion:"http://datacite.org/schema/kernel-3",providerId:"inist",clientId:"inist.esrf",state:"findable"};Event.prototype={attach:function(e){this._listeners.push(e)},notify:function(e){for(var t=0;t<this._listeners.length;t++)this._listeners[t](this._sender,e)}},ExperimentalReportController.prototype.normalizeProposalName=function(e){var t;try{return t=new RegExp(/^(.*)-(.*)/),{categoryCode:t.exec(e)[1],categoryCounter:t.exec(e)[2]}}catch(r){t=new RegExp(/\d+$/);try{return{categoryCode:e.substring(0,e.length-t.exec(e)[0].length),categoryCounter:t.exec(e)[0]}}catch(e){return console.log(e),null}}},ExperimentalReportController.prototype.requestFilenameList=function(e){var t=this;if(e){var r=this.normalizeProposalName(e);r?$.ajax({type:"GET",timeout:this.timeout,url:this.server,data:r,dataType:"json",success:function(e){t.onSuccess.notify(e)},error:function(e){t.onError.notify(e)}}):t.onError.notify("Proposal could not be normalized: "+e)}else t.onError.notify("Proposal is null")},ExperimentalReportController.prototype.openFileInNewTab=function(e){if(e)try{window.open("ftp://www.esrf.eu/pub/UserReports/"+e,"_blank")}catch(t){alert("The requested file "+e+" could not be downloaded.")}},JsonExtractor.prototype.getTitle=function(e){return e&&e.titles&&e.titles.length>0&&e.titles[0].title?e.titles[0].title:(console.log("[JSON EXTRACTOR ERROR] title extraction failed."),null)},JsonExtractor.prototype.getDOI=function(e){return e&&e.doi?e.doi.toUpperCase():(console.log("[JSON EXTRACTOR ERROR] doi extraction failed."),null)},JsonExtractor.prototype.getPublisher=function(e){return e&&e.publisher?e.publisher:(console.log("[JSON EXTRACTOR ERROR] publisher extraction failed."),null)},JsonExtractor.prototype.getCreators=function(e){return e&&e.creators?_.map(e.creators,function(e){return e.givenName&&e.familyName||e.name?e:(console.log("[JSON EXTRACTOR ERROR] one of the creator could not be properly extracted."),{})}):(console.log("[JSON EXTRACTOR ERROR] Extraction of the creators failed."),null)},JsonExtractor.prototype.getPubliclyAccessibleYear=function(e){return e&&e.publicationYear?e.publicationYear:(console.log("[JSON EXTRACTOR ERROR] Extraction of the publication year failed."),null)},JsonExtractor.prototype.getInvestigationId=function(e){var t=RegExp(/\/\w*-*[Ee][Ss][Rr][Ff]-[Ee][Ss]-(\d+)$/);return t.exec(e.doi)?t.exec(e.doi)[1]:(console.log("[JSON EXTRACTOR ERROR] investigationId extraction failed."),null)},JsonExtractor.prototype.getFieldFromSubject=function(e,t){if(e)for(var r=new RegExp("^"+t+"$","i"),i=0;i<e.length;i++)if(r.test(e[i].subjectScheme)&&e[i].subject)return _.split(e[i].subject,",");return null},JsonExtractor.prototype.getMintingYear=function(e){},JsonExtractor.prototype.getSessionDate=function(e){if(e&&e.dates&&e.dates instanceof Array){var t=_.find(e.dates,function(e){if(e.dateType)return"collected"===e.dateType.toLowerCase()});if(t&&t.date)return moment(t.date).format("YYYY-M-D")}return console.log("[JSON EXTRACTOR ERROR] Extraction of session date failed."),null},JsonExtractor.prototype.getResourceTypeGeneral=function(e){if(e&&e.types)for(var t in e.types)if("resourceTypeGeneral"===t)return e.types[t];return console.log("[JSON EXTRACTOR ERROR] Extraction of resource type general failed."),null},JsonExtractor.prototype.getResourceType=function(e){if(e&&e.types)for(var t in e.types)if("resourceType"===t){if("Experiment Session"===e.types[t])return CONSTANTS.ES_RESOURCE_TYPE;if("Datacollection"===e.types[t])return CONSTANTS.DC_RESOURCE_TYPE}return console.log("[JSON EXTRACTOR ERROR] Extraction of resource type failed."),null},JsonExtractor.prototype.getAbstract=function(e){if(e&&e.descriptions){var t=_.find(e.descriptions,function(e){return"abstract"===e.descriptionType.toLowerCase()});if(t)return t.description}return console.log("[JSON EXTRACTOR ERROR] Extraction of the abstract failed."),null},JsonExtractor.prototype.getMergedProposalAndBeamline=function(e,t,r){if(e&&t&&r&&e.length===t.length&&e.length===r.length){for(var i=[],n=0;n<e.length;n++)i.push({proposal:e[n],beamline:t[n],beamlineUrl:r[n]});return _.uniqBy(i,function(e){return JSON.stringify(e)})}return null},dust.helpers.proposalBeamlineTable=proposalBeamlineTable,dust.helpers.abstract=abstract;
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -56,7 +56,7 @@ DOIController.prototype.render = function (doi, data) {
doiData.abstract = jsonExtractor.getAbstract(data);
doiData.investigationId = jsonExtractor.getInvestigationId(data);
doiData.resourceType = jsonExtractor.getResourceType(data);
doiData.proposalType = jsonExtractor.getFieldFromSubject(data.subjects, "Proposal Type Description");
......@@ -88,6 +88,7 @@ DOIController.prototype.render = function (doi, data) {
_this.view.renderDOIData(doiData);
}
};
DOIController.prototype.getData = function (doi) {
var _this = this;
......@@ -104,64 +105,93 @@ DOIController.prototype.getData = function (doi) {
}
if (this.hasAcceptedPrefix(doi)) {
$.ajax({
headers: {
Accept: "application/vnd.datacite.datacite+json"
},
type: "GET",
timeout: 15000, // triggers timeout when request pends longer than
// 5000ms
url: this.doiServer + doi,
beforeSend: function () {
_this.view.setLoading("Retrieving data from Server");
},
complete: function () {
_this.view.setLoading(false);
}
})
$.ajax({
headers: {
Accept: "application/vnd.datacite.datacite+json"
},
type: "GET",
timeout: 15000, // triggers timeout when request pends longer than
// 5000ms
url: this.doiServer + doi,
beforeSend: function () {
_this.view.setLoading("Retrieving data from Server");
},
complete: function () {
_this.view.setLoading(false);
}
})
.done(function (data) {
if (data) {
_this.render(doi, data);
}
}).fail(function (jqXHR, textStatus, errorThrown) {
/** Try with icat server **/
$.ajax({
}).fail(function (jqXHR, textStatus, errorThrown) {
/** Try with icat server **/
$.ajax({
type: "GET",
timeout: 15000, // triggers timeout when request pends longer than
// 5000ms
url: _this.icatPlusServer + doi + "/json-datacite",
url: _this.icatPlusServer + doi + "/json-datacite",
beforeSend: function () {
try{
$("logo").fadeIn().fadeOut().fadeIn().fadeOut().fadeIn().fadeOut();
try {
$("logo").fadeIn().fadeOut().fadeIn().fadeOut().fadeIn().fadeOut();
}
catch(e){}
catch (e) { }
_this.view.setLoading("Retrieving data from Server");
},
complete: function () {
_this.view.setLoading(false);
}
})
.done(function (data) {
if (data) {
_this.render(doi, data);
}
}).fail(function (jqXHR, textStatus, errorThrown) {
_this.view.renderError(jqXHR, errorThrown, _this.origin);
_this.view.setLoading(false);
});
.done(function (data) {
if (data) {
_this.render(doi, data);
}
}).fail(function (jqXHR, textStatus, errorThrown) {
_this.view.renderError(jqXHR, errorThrown, _this.origin);
_this.view.setLoading(false);
});
});
this.getDataForGoogleSearch(doi);
} else {
_this.view.renderError("Bad Prefix", _this.origin);
}
};
/**
* Get the DOI metadata in the ld+Json format as requested by google search engine for datasets.
* @param {string} doi in the format prefix/suffix
*/
DOIController.prototype.getDataForGoogleSearch = function (doi) {
var _this = this;
if (doi) {
$.ajax({
headers: {
Accept: "application/vnd.schemaorg.ld+json"
},
type: "GET",
timeout: 15000,
url: 'https://data.datacite.org/' + doi,
dataType: 'text', // don't convert JSON to Javascript object
success: function (data) {
if (data) {
_this.view.addDOIMetadataToHead(data);
}
console.log("[GOOGLE SEARCH INDEXING] - No metadata recieved from datacite.");
},
error: function (error) {
console.log("[GOOGLE SEARCH INDEXING] - Failed getting metadata from datacite.");
console.log(error.responseJSON);
}
});
}
};
/**
* Checks whether the requested doi prefix is an esrf prefix
*
* @param{string} doi The DOI number
* @return true if the prefix is an esrf prefix, false otherwise
*
*/
DOIController.prototype.hasAcceptedPrefix = function (doi) {
var prefix = doi.split('/')[0];
......
......@@ -20,8 +20,7 @@ DOIView.prototype.setLoading = function (message) {
};
/**
* Set the doi prefix/suffix text in the top banner of the doi landing page. This is done before the template is rendered.
*
* Set the doi prefix/suffix text in the top banner of the doi landing page. This is done before the template is rendered.
*/
DOIView.prototype.setDOIInTopBanner = function (doiCode) {
$("#doiValue").text("DOI > " + doiCode.toUpperCase());
......@@ -29,9 +28,7 @@ DOIView.prototype.setDOIInTopBanner = function (doiCode) {
/**
* Render experimental Report data
*
* @param {array}
* data The filename list to be displayed
* @param {array} data The filename list to be displayed
*/
DOIView.prototype.renderExperimentalReportData = function (data) {
if (data) {
......@@ -52,10 +49,10 @@ DOIView.prototype.renderExperimentalReportData = function (data) {
};
DOIView.prototype.renderDOIData = function (doiData) {
var _this = this;
var _this = this;
dust.render('landingpage_tpl', {
data: doiData,
constants : CONSTANTS
constants: CONSTANTS
}, function (err, out) {
$('#' + _this.mainPanelId).html(out);
_this.isDOIAlreadyRendered = true;
......@@ -76,11 +73,8 @@ DOIView.prototype.renderDOIData = function (doiData) {
/**
* Render the error message
*
* @param {string}
* error The error which was thrown
* @param {string}
* origin The page which caused this rendering. This directly
* influence the element id
* @param {string} errorThrown The error which was thrown
* @param {string} origin The page which caused this rendering. This directly influences the element id