Skip to content

Commit ab64414

Browse files
fxprunayreDelawen
authored andcommitted
When user click a link to a private record and is not yet authenticated, suggest the user to sign in and redirect to requested record.
1 parent 9f5fc3a commit ab64414

File tree

3 files changed

+3
-2
lines changed

3 files changed

+3
-2
lines changed

web-ui/src/main/resources/catalog/components/search/mdview/mdviewModule.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
$scope.formatter = gnSearchSettings.formatter;
5151
$scope.gnMetadataActions = gnMetadataActions;
5252
$scope.usingFormatter = false;
53+
$scope.url = location.href;
5354
$scope.compileScope = $scope.$new();
5455
$scope.recordIdentifierRequested = gnSearchLocation.getUuid();
5556

web-ui/src/main/resources/catalog/locales/en-search.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@
348348
"shareOnLinkedIn": "Share on LinkedIn",
349349
"shareByEmail": "Share by email",
350350
"zoomto": "Zoom To",
351-
"recordNotFound": "The record with identifier <strong>{{uuid}}</strong> was not found or is not shared with you",
351+
"recordNotFound": "The record with identifier <strong>{{uuid}}</strong> was not found or is not shared with you. Try to <a href=\"catalog.signin?redirect={{url}}\">sign in</a> if you've an account.",
352352
"intersectWith": "Intersects with",
353353
"fullyOutsideOf": "Fully outside of",
354354
"encloses": "Enclosing",

web-ui/src/main/resources/catalog/views/default/templates/recordView.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div class="alert alert-warning"
33
data-ng-hide="mdView.current.record"
44
data-translate=""
5-
data-translate-values="{uuid: '{{recordIdentifierRequested | htmlToPlaintext}}'}">
5+
data-translate-values="{uuid: '{{recordIdentifierRequested | htmlToPlaintext}}', url: '{{url | encodeURIComponent}}'}">
66
recordNotFound
77
</div>
88

0 commit comments

Comments
 (0)