@@ -40,7 +40,7 @@ import { TranslateService } from '@ngx-translate/core';
4040import { ItemVersionsDeleteModalComponent } from './item-versions-delete-modal/item-versions-delete-modal.component' ;
4141import { VersionDataService } from '../../core/data/version-data.service' ;
4242import { ItemDataService } from '../../core/data/item-data.service' ;
43- import { Router } from '@angular/router' ;
43+ import { ActivatedRoute , Router } from '@angular/router' ;
4444import { AuthorizationDataService } from '../../core/data/feature-authorization/authorization-data.service' ;
4545import { FeatureID } from '../../core/data/feature-authorization/feature-id' ;
4646import { ItemVersionsSharedService } from './item-versions-shared.service' ;
@@ -49,7 +49,11 @@ import { WorkspaceitemDataService } from '../../core/submission/workspaceitem-da
4949import { WorkflowItemDataService } from '../../core/submission/workflowitem-data.service' ;
5050import { ConfigurationDataService } from '../../core/data/configuration-data.service' ;
5151import { UUIDService } from '../../core/shared/uuid.service' ;
52+ import { RenderCrisLayoutBoxFor } from '../../cris-layout/decorators/cris-layout-box.decorator' ;
53+ import { LayoutBox } from '../../cris-layout/enums/layout-box.enum' ;
5254
55+
56+ @RenderCrisLayoutBoxFor ( LayoutBox . VERSIONING )
5357@Component ( {
5458 selector : 'ds-item-versions' ,
5559 templateUrl : './item-versions.component.html' ,
@@ -182,7 +186,8 @@ export class ItemVersionsComponent implements OnDestroy, OnInit {
182186 private workspaceItemDataService : WorkspaceitemDataService ,
183187 private workflowItemDataService : WorkflowItemDataService ,
184188 private configurationService : ConfigurationDataService ,
185- private uuidService : UUIDService
189+ private uuidService : UUIDService ,
190+ private route : ActivatedRoute ,
186191 ) {
187192 }
188193
@@ -488,6 +493,21 @@ export class ItemVersionsComponent implements OnDestroy, OnInit {
488493 * Initialize all observables
489494 */
490495 ngOnInit ( ) : void {
496+ if ( ! hasValue ( this . item ) ) {
497+ this . subs . push ( this . route . data . pipe (
498+ map ( ( data ) => {
499+ return data . dso as RemoteData < Item > ;
500+ } ) ,
501+ getFirstCompletedRemoteData ( ) ,
502+ map ( data => data . payload )
503+ ) . subscribe ( ( item ) => {
504+ this . item = item ;
505+ this . ngOnInit ( ) ;
506+ } ) ) ;
507+
508+ return ;
509+ }
510+
491511 if ( hasValue ( this . item . version ) ) {
492512 this . versionRD$ = this . item . version ;
493513 this . versionHistoryRD$ = this . versionRD$ . pipe (
0 commit comments