mirror of
https://github.com/Cian-H/invenio-theme-iform.git
synced 2025-12-23 05:01:58 +00:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c4f80c42a1 | ||
|
|
4698c797b2 | ||
|
|
0e5f08768d | ||
|
|
e4d38632a9 | ||
|
|
4fa0e2851f | ||
|
|
2c10cc885d | ||
|
|
f993fda3f6 |
@@ -58,10 +58,11 @@ export class DoiMint extends Component {
|
|||||||
// get the prefix from backend
|
// get the prefix from backend
|
||||||
const prefix = this.configs.datacite_prefix;
|
const prefix = this.configs.datacite_prefix;
|
||||||
const suffix = this.configs.datacite_suffix;
|
const suffix = this.configs.datacite_suffix;
|
||||||
|
const host_url = this.configs.datacite_host_url
|
||||||
|
|
||||||
if (prefix !== null && suffix !== null) {
|
if (prefix !== null && suffix !== null) {
|
||||||
// get mapped DOI
|
// get mapped DOI
|
||||||
const mapped = MapDatacite(this.metadata, this.record.id, prefix, suffix);
|
const mapped = MapDatacite(this.metadata, this.record.id, prefix, suffix, host_url);
|
||||||
|
|
||||||
const _fetchdoi = new FetchDoi("/getdoi");
|
const _fetchdoi = new FetchDoi("/getdoi");
|
||||||
|
|
||||||
@@ -113,10 +114,10 @@ export class DoiMint extends Component {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// get a link of dio
|
// // get a link of dio
|
||||||
var doiLink = (doiId) => {
|
// var doiLink = (doiId) => {
|
||||||
window.open(`https://doi.org/${doiId}`, "_blank");
|
// window.open(`https://doi.org/${doiId}`, "_blank");
|
||||||
};
|
// };
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Card className="actions">
|
<Card className="actions">
|
||||||
@@ -187,13 +188,8 @@ export class DoiMint extends Component {
|
|||||||
</Message>
|
</Message>
|
||||||
)}
|
)}
|
||||||
<Label
|
<Label
|
||||||
style={{
|
|
||||||
cursor: "pointer",
|
|
||||||
}}
|
|
||||||
size="large"
|
size="large"
|
||||||
as="a"
|
|
||||||
color="blue"
|
color="blue"
|
||||||
onClick={() => doiLink(this.state.doi_id || this.id_doi)}
|
|
||||||
>
|
>
|
||||||
<strong>DOI: </strong>
|
<strong>DOI: </strong>
|
||||||
<Label.Detail>{this.state.doi_id || this.id_doi}</Label.Detail>
|
<Label.Detail>{this.state.doi_id || this.id_doi}</Label.Detail>
|
||||||
|
|||||||
@@ -12,4 +12,4 @@ This file is imported by ``invenio_theme_tugraz.__init__``,
|
|||||||
and parsed by ``setup.py``.
|
and parsed by ``setup.py``.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
__version__ = "2.0.2"
|
__version__ = "2.0.5"
|
||||||
|
|||||||
@@ -86,10 +86,12 @@ def get_datacite_details():
|
|||||||
"""Application credentials for DOI."""
|
"""Application credentials for DOI."""
|
||||||
prefix = environ.get("INVENIO_DATACITE_PREFIX")
|
prefix = environ.get("INVENIO_DATACITE_PREFIX")
|
||||||
suffix = environ.get("INVENIO_DATACITE_SUFFIX")
|
suffix = environ.get("INVENIO_DATACITE_SUFFIX")
|
||||||
|
host_url = environ.get("INVENIO_SITE_HOSTNAME")
|
||||||
|
|
||||||
details = {
|
details = {
|
||||||
"datacite_prefix": prefix,
|
"datacite_prefix": prefix,
|
||||||
"datacite_suffix": suffix,
|
"datacite_suffix": suffix,
|
||||||
|
"datacite_host_url": host_url,
|
||||||
}
|
}
|
||||||
return details
|
return details
|
||||||
|
|
||||||
@@ -105,7 +107,7 @@ def retrieve_doi():
|
|||||||
|
|
||||||
doi_response = requests.post(
|
doi_response = requests.post(
|
||||||
url,
|
url,
|
||||||
auth=(username, password),
|
auth=(username, password.encode('utf-8')),
|
||||||
json=doi_metadata,
|
json=doi_metadata,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ theme = WebpackThemeBundle(
|
|||||||
'@ckeditor/ckeditor5-react': '^2.1.0',
|
'@ckeditor/ckeditor5-react': '^2.1.0',
|
||||||
|
|
||||||
# datacite - rest api plugin
|
# datacite - rest api plugin
|
||||||
'datacite-rest': '^0.1.7',
|
'datacite-rest': '^0.1.8',
|
||||||
|
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user