diff --git a/src/app/my-dspace-page/my-dspace-new-submission/my-dspace-new-submission.component.ts b/src/app/my-dspace-page/my-dspace-new-submission/my-dspace-new-submission.component.ts index 127d266138..b2ba6fe2af 100644 --- a/src/app/my-dspace-page/my-dspace-new-submission/my-dspace-new-submission.component.ts +++ b/src/app/my-dspace-page/my-dspace-new-submission/my-dspace-new-submission.component.ts @@ -8,15 +8,14 @@ import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; import { AuthService } from '../../core/auth/auth.service'; import { DSpaceObject } from '../../core/shared/dspace-object.model'; import { NotificationsService } from '../../shared/notifications/notifications.service'; -import { NotificationOptions } from '../../shared/notifications/models/notification-options.model'; import { UploaderOptions } from '../../shared/uploader/uploader-options.model'; import { HALEndpointService } from '../../core/shared/hal-endpoint.service'; -import { NotificationType } from '../../shared/notifications/models/notification-type'; import { hasValue } from '../../shared/empty.util'; import { SearchResult } from '../../shared/search/models/search-result.model'; import { CollectionSelectorComponent } from '../collection-selector/collection-selector.component'; import { UploaderComponent } from '../../shared/uploader/uploader.component'; import { UploaderError } from '../../shared/uploader/uploader-error.model'; +import { Router } from '@angular/router'; /** * This component represents the whole mydspace page header @@ -56,13 +55,15 @@ export class MyDSpaceNewSubmissionComponent implements OnDestroy, OnInit { * @param {NotificationsService} notificationsService * @param {TranslateService} translate * @param {NgbModal} modalService + * @param {Router} router */ constructor(private authService: AuthService, private changeDetectorRef: ChangeDetectorRef, private halService: HALEndpointService, private notificationsService: NotificationsService, private translate: TranslateService, - private modalService: NgbModal) { + private modalService: NgbModal, + private router: Router) { } /** @@ -87,16 +88,9 @@ export class MyDSpaceNewSubmissionComponent implements OnDestroy, OnInit { this.uploadEnd.emit(workspaceitems); if (workspaceitems.length === 1) { - const options = new NotificationOptions(); - options.timeOut = 0; const link = '/workspaceitems/' + workspaceitems[0].id + '/edit'; - this.notificationsService.notificationWithAnchor( - NotificationType.Success, - options, - link, - 'mydspace.general.text-here', - 'mydspace.upload.upload-successful', - 'here'); + // To avoid confusion and ambiguity, redirect the user on the publication page. + this.router.navigateByUrl(link); } else if (workspaceitems.length > 1) { this.notificationsService.success(null, this.translate.get('mydspace.upload.upload-multiple-successful', {qty: workspaceitems.length})); } diff --git a/src/assets/i18n/en.json5 b/src/assets/i18n/en.json5 index 3d8362c601..31fbc72396 100644 --- a/src/assets/i18n/en.json5 +++ b/src/assets/i18n/en.json5 @@ -2734,8 +2734,6 @@ "mydspace.description": "", - "mydspace.general.text-here": "here", - "mydspace.messages.controller-help": "Select this option to send a message to item's submitter.", "mydspace.messages.description-placeholder": "Insert your message here...", @@ -2812,8 +2810,6 @@ "mydspace.upload.upload-multiple-successful": "{{qty}} new workspace items created.", - "mydspace.upload.upload-successful": "New workspace item created. Click {{here}} for edit it.", - "mydspace.view-btn": "View", diff --git a/src/assets/i18n/fr.json5 b/src/assets/i18n/fr.json5 index 5cfb7ff099..8cce148c9f 100644 --- a/src/assets/i18n/fr.json5 +++ b/src/assets/i18n/fr.json5 @@ -3627,9 +3627,6 @@ // "mydspace.description": "", "mydspace.description": "", - // "mydspace.general.text-here": "here", - "mydspace.general.text-here": "ici", - // "mydspace.messages.controller-help": "Select this option to send a message to item's submitter.", "mydspace.messages.controller-help": "Sélectionner cette option pour envoyer un message au déposant.", @@ -3744,9 +3741,6 @@ // "mydspace.upload.upload-multiple-successful": "{{qty}} new workspace items created.", "mydspace.upload.upload-multiple-successful": "{{qty}} nouveaux Items créés dans l'espace de travail.", - // "mydspace.upload.upload-successful": "New workspace item created. Click {{here}} for edit it.", - "mydspace.upload.upload-successful": "Nouvel item créé dans l'espace de travail. Cliquer {{here}} pour l'éditer.", - // "mydspace.view-btn": "View", "mydspace.view-btn": "Afficher",