Skip to content

Commit

Permalink
Admin / DOI server / Clarify labels for record group
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 committed Nov 12, 2024
1 parent 56a4069 commit 7aeb128
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
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 7aeb128

Please sign in to comment.