diff --git a/invenio_theme_tugraz/assets/semantic-ui/js/invenio_theme_tugraz/deposit/DoiMint.js b/invenio_theme_tugraz/assets/semantic-ui/js/invenio_theme_tugraz/deposit/DoiMint.js index c9c4b4b..8f3d579 100644 --- a/invenio_theme_tugraz/assets/semantic-ui/js/invenio_theme_tugraz/deposit/DoiMint.js +++ b/invenio_theme_tugraz/assets/semantic-ui/js/invenio_theme_tugraz/deposit/DoiMint.js @@ -53,10 +53,11 @@ export class DoiMint extends Component { // get the prefix from backend const prefix = this.configs.datacite_prefix; + const suffix = this.configs.datacite_suffix; - if (prefix !== null) { + if (prefix !== null && suffix !== null) { // 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"); diff --git a/invenio_theme_tugraz/views.py b/invenio_theme_tugraz/views.py index 1a617cc..44258be 100644 --- a/invenio_theme_tugraz/views.py +++ b/invenio_theme_tugraz/views.py @@ -85,9 +85,11 @@ def comingsoon(): def get_datacite_details(): """Application credentials for DOI.""" prefix = environ.get("INVENIO_DATACITE_PREFIX") + suffix = environ.get("INVENIO_DATACITE_SUFFIX") details = { "datacite_prefix": prefix, + "datacite_suffix": suffix, } return details diff --git a/invenio_theme_tugraz/webpack.py b/invenio_theme_tugraz/webpack.py index d623dac..87839e7 100644 --- a/invenio_theme_tugraz/webpack.py +++ b/invenio_theme_tugraz/webpack.py @@ -40,7 +40,7 @@ theme = WebpackThemeBundle( '@ckeditor/ckeditor5-react': '^2.1.0', # datacite - rest api plugin - 'datacite-rest': '^0.1.6', + 'datacite-rest': '^0.1.7', }, )