mirror of
https://github.com/Cian-H/invenio-theme-iform.git
synced 2025-12-22 20:51:58 +00:00
doimint: adds suffix config
This commit is contained in:
@@ -53,10 +53,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;
|
||||||
|
|
||||||
if (prefix !== null) {
|
if (prefix !== null && suffix !== null) {
|
||||||
// get mapped DOI
|
// get mapped DOI
|
||||||
const mapped = MapDatacite(this.metadata, this.record.id, prefix);
|
const mapped = MapDatacite(this.metadata, this.record.id, prefix, suffix);
|
||||||
|
|
||||||
const _fetchdoi = new FetchDoi("/getdoi");
|
const _fetchdoi = new FetchDoi("/getdoi");
|
||||||
|
|
||||||
|
|||||||
@@ -85,9 +85,11 @@ def comingsoon():
|
|||||||
def get_datacite_details():
|
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")
|
||||||
|
|
||||||
details = {
|
details = {
|
||||||
"datacite_prefix": prefix,
|
"datacite_prefix": prefix,
|
||||||
|
"datacite_suffix": suffix,
|
||||||
}
|
}
|
||||||
return details
|
return details
|
||||||
|
|
||||||
|
|||||||
@@ -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.6',
|
'datacite-rest': '^0.1.7',
|
||||||
|
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user