@@ -8,15 +8,14 @@ import { NgbModal } from '@ng-bootstrap/ng-bootstrap';
88import { AuthService } from '../../core/auth/auth.service' ;
99import { DSpaceObject } from '../../core/shared/dspace-object.model' ;
1010import { NotificationsService } from '../../shared/notifications/notifications.service' ;
11- import { NotificationOptions } from '../../shared/notifications/models/notification-options.model' ;
1211import { UploaderOptions } from '../../shared/uploader/uploader-options.model' ;
1312import { HALEndpointService } from '../../core/shared/hal-endpoint.service' ;
14- import { NotificationType } from '../../shared/notifications/models/notification-type' ;
1513import { hasValue } from '../../shared/empty.util' ;
1614import { SearchResult } from '../../shared/search/models/search-result.model' ;
1715import { CollectionSelectorComponent } from '../collection-selector/collection-selector.component' ;
1816import { UploaderComponent } from '../../shared/uploader/uploader.component' ;
1917import { UploaderError } from '../../shared/uploader/uploader-error.model' ;
18+ import { Router } from '@angular/router' ;
2019
2120/**
2221 * This component represents the whole mydspace page header
@@ -62,7 +61,8 @@ export class MyDSpaceNewSubmissionComponent implements OnDestroy, OnInit {
6261 private halService : HALEndpointService ,
6362 private notificationsService : NotificationsService ,
6463 private translate : TranslateService ,
65- private modalService : NgbModal ) {
64+ private modalService : NgbModal ,
65+ private router : Router ) {
6666 }
6767
6868 /**
@@ -87,16 +87,9 @@ export class MyDSpaceNewSubmissionComponent implements OnDestroy, OnInit {
8787 this . uploadEnd . emit ( workspaceitems ) ;
8888
8989 if ( workspaceitems . length === 1 ) {
90- const options = new NotificationOptions ( ) ;
91- options . timeOut = 0 ;
9290 const link = '/workspaceitems/' + workspaceitems [ 0 ] . id + '/edit' ;
93- this . notificationsService . notificationWithAnchor (
94- NotificationType . Success ,
95- options ,
96- link ,
97- 'mydspace.general.text-here' ,
98- 'mydspace.upload.upload-successful' ,
99- 'here' ) ;
91+ // To avoid confusion and ambiguity, redirect the user on the publication page.
92+ this . router . navigateByUrl ( link ) ;
10093 } else if ( workspaceitems . length > 1 ) {
10194 this . notificationsService . success ( null , this . translate . get ( 'mydspace.upload.upload-multiple-successful' , { qty : workspaceitems . length } ) ) ;
10295 }
0 commit comments