Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Maxime Chaillet
doi-landing-page
Commits
aa589a3d
Commit
aa589a3d
authored
Feb 21, 2019
by
Maxime Chaillet
Browse files
Merge branch 'issue66' into 'master'
Issue66 Closes #66 See merge request
icat/doi-landing-page!76
parents
ed833524
8cd378cc
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
www/dev.html
View file @
aa589a3d
<!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>
<head>
<meta
charset=
"UTF-8"
>
<title>
ESRF - DOI
</title>
<link
rel=
"icon"
href=
"/src/images/favicon.ico"
>
<!-- bower:css -->
<link
rel=
"stylesheet"
href=
"bower_components/bootstrap/dist/css/bootstrap.css"
/>
<!-- endbower -->
<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>
<!-- 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>
\ No newline at end of file
</div>
</footer>
</body>
</html>
www/min/doi.min.js
View file @
aa589a3d
This diff is collapsed.
Click to expand it.
www/src/doicontroller.js
View file @
aa589a3d
...
...
@@ -173,11 +173,19 @@ DOIController.prototype.getDataForGoogleSearch = function (doi) {
type
:
"
GET
"
,
timeout
:
15000
,
url
:
'
https://data.datacite.org/
'
+
doi
,
dataType
:
'
text
'
,
// don't convert JSON to Javascript object
//
dataType: 'text', // don't convert JSON to Javascript object
success
:
function
(
data
)
{
if
(
data
)
{
_this
.
view
.
addDOIMetadataToHead
(
data
);
}
else
{
// Here we add the documentation field in the recieved object because 'name' and 'documentation' fileds are required by google dataset search.
if
(
data
.
name
)
{
if
(
!
data
.
documentation
)
{
data
.
documentation
=
data
.
name
;
}
_this
.
view
.
addDOIMetadataToHead
(
JSON
.
stringify
(
data
));
}
else
{
console
.
log
(
"
[GOOGLE SEARCH INDEXING] - The data required by Google is missing the 'name' field. This is required by Google for indexing.
"
);
}
}
else
{
console
.
log
(
"
[GOOGLE SEARCH INDEXING] - No metadata recieved from datacite.
"
);
}
},
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment