Commit 2e64806f authored by Maxime Chaillet's avatar Maxime Chaillet
Browse files

Merge branch 'issue80' into 'master'

Issue80

Closes #80

See merge request icat/doi-landing-page!101
parents 0acf900d a5024e32
This diff is collapsed.
......@@ -80,6 +80,10 @@ DOIController.prototype.render = function (doi, data) {
// Create a table containing unique tuples [proposal, beamline, beamlineUrl]
doiData.mergedProposalBeamlines = jsonExtractor.getMergedProposalAndBeamline(proposalNames, beamlines, doiData.beamlineUrls);
// Set user specific canonical URL for this page.
_this.view.addCanonicalURLToHead('https://doi.esrf.fr/' + doiData.doi);
// send to dust render
_this.view.renderDOIData(doiData);
}
......
......@@ -185,3 +185,14 @@ DOIView.prototype.addDOIMetadataToHead = function (data) {
.text(data)
.appendTo('head');
};
/**
* Add a link html element to specify the user-selected canonical URL for this page.
* @param {String} doiURL URL to the DOI
*/
DOIView.prototype.addCanonicalURLToHead = function (doiURL) {
$('<link>')
.attr('rel', 'canonical')
.attr('href', doiURL)
.appendTo('head');
};
\ 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