Skip to content

Commit

Permalink
Display metadata user and group owner in the transfer ownership dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
josegar74 authored and fxprunayre committed Sep 21, 2023
1 parent 40d1e09 commit 5d175f1
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@
return this.ownerId;
},
getGroupOwner: function () {
return this.owner;
return this.groupOwner;
},
getSchema: function () {
return this.schema;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,21 @@
scope.userGroupDefined = false;
scope.userGroups = null;

scope.ownerUserName = "";
scope.ownerGroupName = "";

if (ownerId) {
$http.get("../api/users/" + ownerId).then(function (response) {
scope.ownerUserName = response.data.username;
});
}

if (groupOwner) {
$http.get("../api/groups/" + groupOwner).then(function (response) {
scope.ownerGroupName = response.data.name;
});
}

scope.selectGroup = function (group) {
scope.selectedGroup = group;
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
<div class="row">
<div class="col-md-12" data-ng-show="userGroupDefined">
<p data-ng-if="ownerUserName">
<span data-translate="">recordOwner</span>: <span>{{ ownerUserName }}</span>
</p>
<p data-ng-if="ownerGroupName">
<span data-translate="">groupRecordOwner</span>: <span>{{ ownerGroupName }}</span>
</p>

<hr data-ng-if="ownerUserName || ownerGroupName" />

<select
class="form-control"
data-ng-model="selectedUserGroup"
Expand Down
1 change: 1 addition & 0 deletions web-ui/src/main/resources/catalog/locales/en-core.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@
"keywordFilter": "Filter keyword",
"keywords": "Keywords",
"recordOwner": "Record owner",
"groupRecordOwner": "Group record owner",
"map": "Map",
"makeYourMap": "Map",
"metadataPOCs": "Contact for the metadata",
Expand Down

0 comments on commit 5d175f1

Please sign in to comment.