Skip to content

Commit

Permalink
Workflow / Edit action / Fix link in search results (#8031)
Browse files Browse the repository at this point in the history
Follow up of #6321

This was noticed because then when an approved record is found, the edit
action in the search result page was opening the editor with a link
http://localhost:8080/geonetwork/srv/eng/catalog.edit#/metadata/ApprovedID

Then the editor was opening the editor form with the UUID.

And in such case the editor does not do the redirection (in
MetadataEditingApi.java#L153).
  • Loading branch information
fxprunayre committed May 16, 2024
1 parent 889d36a commit 9e4b7ec
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
"resourceTitle*",
"resourceAbstract*",
"draft",
"draftId",
"owner",
"link",
"status*",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,16 @@

module.directive("gnLinksBtn", [
"gnTplResultlistLinksbtn",
function (gnTplResultlistLinksbtn) {
"gnMetadataActions",
function (gnTplResultlistLinksbtn, gnMetadataActions) {
return {
restrict: "E",
replace: true,
scope: true,
templateUrl: gnTplResultlistLinksbtn
templateUrl: gnTplResultlistLinksbtn,
link: function linkFn(scope) {
scope.gnMetadataActions = gnMetadataActions;
}
};
}
]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<a
class="gn-md-edit-btn btn btn-default btn-sm"
data-ng-show="user.canEditRecord(md)"
data-ng-href="catalog.edit#/metadata/{{md.id}}?redirectUrl=catalog.search%23%2Fmetadata%2F{{md.uuid}}"
data-ng-href="catalog.edit#/metadata/{{gnMetadataActions.getMetadataIdToEdit(md)}}?redirectUrl=catalog.search%23%2Fmetadata%2F{{md.uuid}}"
title="{{'edit' | translate}}"
aria-label="{{'edit' | translate}}"
>
Expand Down

0 comments on commit 9e4b7ec

Please sign in to comment.