Commit 7cde4905 authored by Maxime Chaillet's avatar Maxime Chaillet

send constants to template. Test with ES and DC doi from 10.5072 prefix....

send constants to template. Test with ES and DC doi from 10.5072 prefix. recompile for production. It fixes #57
parent 5165f6ca
This diff is collapsed.
This diff is collapsed.
......@@ -3,7 +3,6 @@ function DOIController(view) {
// 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"];
......
......@@ -54,7 +54,8 @@ DOIView.prototype.renderExperimentalReportData = function (data) {
DOIView.prototype.renderDOIData = function (doiData) {
var _this = this;
dust.render('landingpage_tpl', {
data: doiData
data: doiData,
constants : CONSTANTS
}, function (err, out) {
$('#' + _this.mainPanelId).html(out);
_this.isDOIAlreadyRendered = true;
......
......@@ -83,6 +83,8 @@
<div class="row">
<div class="col-1"> </div>
<div class="col-10">
{data.resourceType}
{constants.ES_RESOURCE_TYPE}
{@eq key=data.resourceType value=constants.ES_RESOURCE_TYPE}
<form action="https://icat.esrf.fr/#/browse/facility/ESRF/proposal/{data.proposalName}/investigation/{data.investigationId}/dataset" target="_blank">
{:else}
......
Below are doi created for the tests:
- 10.5072/TEST-ESRF-MAX3 : data collection DOI
- DOI=10.5072/ESRF-ES-130884741 : experiment session DOI
\ No newline at end of file
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