From 7aeb1288b349631b01c53a725b521ce0c4a17bcc Mon Sep 17 00:00:00 2001 From: Francois Prunayre Date: Tue, 12 Nov 2024 17:17:41 +0100 Subject: [PATCH] Admin / DOI server / Clarify labels for record group Follow up of https://github.com/geonetwork/core-geonetwork/pull/8098 DOI server are associated with record group (and not publication group). --- .../catalog/js/admin/DoiServerController.js | 18 +++++++++--------- .../resources/catalog/locales/en-admin.json | 4 ++-- .../templates/admin/settings/doiservers.html | 8 ++++---- 3 files changed, 15 insertions(+), 15 deletions(-) diff --git a/web-ui/src/main/resources/catalog/js/admin/DoiServerController.js b/web-ui/src/main/resources/catalog/js/admin/DoiServerController.js index eb773b5fc15..bea21b4369f 100644 --- a/web-ui/src/main/resources/catalog/js/admin/DoiServerController.js +++ b/web-ui/src/main/resources/catalog/js/admin/DoiServerController.js @@ -42,20 +42,20 @@ $scope.doiServerUpdated = false; $scope.doiServerSearch = ""; $scope.isUpdate = null; - $scope.selectedPublicationGroups = []; - $scope.groupsForPublication = []; + $scope.selectedRecordGroups = []; + $scope.recordGroups = []; // Load groups function loadGroups() { $http.get("../api/groups").then( function (response) { - $scope.groupsForPublication = response.data; + $scope.recordGroups = response.data; var getLabel = function (g) { return g.label[$scope.lang] || g.name; }; - angular.forEach($scope.groupsForPublication, function (u) { + angular.forEach($scope.recordGroups, function (u) { u.langlabel = getLabel(u); }); }, @@ -99,12 +99,12 @@ $scope.isUpdate = true; $scope.doiServerUpdated = false; $scope.doiServerSelected = v; - $scope.selectedPublicationGroups = []; + $scope.selectedRecordGroups = []; for (var i = 0; i < v.publicationGroups.length; i++) { - var group = _.find($scope.groupsForPublication, { id: v.publicationGroups[i] }); + var group = _.find($scope.recordGroups, { id: v.publicationGroups[i] }); if (group !== undefined) { - $scope.selectedPublicationGroups.push(group); + $scope.selectedRecordGroups.push(group); } } @@ -113,7 +113,7 @@ $scope.addDoiServer = function () { $scope.isUpdate = false; - $scope.selectedPublicationGroups = []; + $scope.selectedRecordGroups = []; $scope.doiServerSelected = { id: "", name: "", @@ -131,7 +131,7 @@ }; $scope.saveDoiServer = function () { $scope.doiServerSelected.publicationGroups = _.map( - $scope.selectedPublicationGroups, + $scope.selectedRecordGroups, "id" ); diff --git a/web-ui/src/main/resources/catalog/locales/en-admin.json b/web-ui/src/main/resources/catalog/locales/en-admin.json index 18eba6e7a79..80aa1114b60 100644 --- a/web-ui/src/main/resources/catalog/locales/en-admin.json +++ b/web-ui/src/main/resources/catalog/locales/en-admin.json @@ -1521,8 +1521,8 @@ "doiserver-pattern-help": "Default is '\\{\\{uuid\\}\\}' but the DOI structure can be customized with database id and/or record group eg. 'example-\\{\\{groupOwner\\}\\}-\\{\\{id\\}\\}'", "doiserver-prefix": "DataCite prefix", "doiserver-prefix-help": "Usually looks like 10.xxxx. You will be allowed to register DOI names only under the prefixes that have been assigned to you.", - "doiserver-publicationGroups": "Publication groups", - "doiserver-publicationGroups-help": "Select the groups which metadata should be published to the DOI server. If no groups are selected, the server will be provided to publish the metadata that has no other DOI servers related to the metadata owner group.", + "doiserver-recordGroups": "Record groups", + "doiserver-recordGroups-help": "When creating a DOI, only DOI server(s) associated with the record group are proposed. If record group is not associated with any DOI servers, then DOI servers with no group are proposed.", "doiserver-defaultApiText": "DataCite API", "doiserver-testApiText": "DataCite API test", "doiserver-euApiText": "Publication Office of the European Union", diff --git a/web-ui/src/main/resources/catalog/templates/admin/settings/doiservers.html b/web-ui/src/main/resources/catalog/templates/admin/settings/doiservers.html index dfb2ca9ba0c..6b6628751ca 100644 --- a/web-ui/src/main/resources/catalog/templates/admin/settings/doiservers.html +++ b/web-ui/src/main/resources/catalog/templates/admin/settings/doiservers.html @@ -406,17 +406,17 @@
doiserver-recordGroups
-

doiserver-publicationGroups-help

+

doiserver-recordGroups-help