Skip to content

Commit

Permalink
Admin / DOI server / Clarify labels for record group (#8496)
Browse files Browse the repository at this point in the history
Follow up of #8098

DOI server are associated with record group (and not publication group).
  • Loading branch information
fxprunayre authored Nov 14, 2024
1 parent d672a4c commit 4cd0930
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion docs/manual/docs/user-guide/associating-resources/doi.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Providing the following information:
- `Final DOI URL prefix`: (Optional) Keep it empty to use the default https://doi.org prefix. Use https://mds.test.datacite.org/doi when using the test API.
- `DOI pattern`: Default is `{{uuid}}` but the DOI structure can be customized with database id and/or record group eg. `example-{{groupOwner}}-{{id}}`.
- `DataCite prefix`: Usually looks like `10.xxxx`. You will be allowed to register DOI names only under the prefixes that have been assigned to you.
- `Publication groups`: (Optional) 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.
- `Record groups`: (Optional) 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.

A record can be downloaded using the DataCite format from the API using: <http://localhost:8080/geonetwork/srv/api/records/da165110-88fd-11da-a88f-000d939bc5d8/formatters/datacite?output=xml>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
},
Expand Down Expand Up @@ -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);
}
}

Expand All @@ -113,7 +113,7 @@

$scope.addDoiServer = function () {
$scope.isUpdate = false;
$scope.selectedPublicationGroups = [];
$scope.selectedRecordGroups = [];
$scope.doiServerSelected = {
id: "",
name: "",
Expand All @@ -131,7 +131,7 @@
};
$scope.saveDoiServer = function () {
$scope.doiServerSelected.publicationGroups = _.map(
$scope.selectedPublicationGroups,
$scope.selectedRecordGroups,
"id"
);

Expand Down
4 changes: 2 additions & 2 deletions web-ui/src/main/resources/catalog/locales/en-admin.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,17 +406,17 @@

<div class="form-group">
<label class="control-label col-sm-3" data-translate=""
>doiserver-publicationGroups</label
>doiserver-recordGroups</label
>
<div class="col-sm-9">
<div
data-gn-multiselect="selectedPublicationGroups"
data-choices="groupsForPublication"
data-gn-multiselect="selectedRecordGroups"
data-choices="recordGroups"
></div>
</div>

<div class="col-sm-9 col-sm-offset-3">
<p class="help-block" data-translate="">doiserver-publicationGroups-help</p>
<p class="help-block" data-translate="">doiserver-recordGroups-help</p>
</div>
</div>
</form>
Expand Down

0 comments on commit 4cd0930

Please sign in to comment.