Commits

Alexandre Vryghem authored b709ee03000
118944: Embed the accessStatus link on collection, browse, recent item submissions & the item page related items & delete tab when enabled
No tags

src/app/collection-page/collection-page.component.ts

Modified
21 21
22 22 import { fadeIn, fadeInOut } from '../shared/animations/fade';
23 23 import { hasValue, isNotEmpty } from '../shared/empty.util';
24 24 import { PaginationComponentOptions } from '../shared/pagination/pagination-component-options.model';
25 25 import { AuthService } from '../core/auth/auth.service';
26 26 import { PaginationService } from '../core/pagination/pagination.service';
27 27 import { AuthorizationDataService } from '../core/data/feature-authorization/authorization-data.service';
28 28 import { FeatureID } from '../core/data/feature-authorization/feature-id';
29 29 import { getCollectionPageRoute } from './collection-page-routing-paths';
30 30 import { redirectOn4xx } from '../core/shared/authorized.operators';
31 -import { BROWSE_LINKS_TO_FOLLOW } from '../core/browse/browse.service';
31 +import { getBrowseLinksToFollow } from '../core/browse/browse.service';
32 32 import { DSONameService } from '../core/breadcrumbs/dso-name.service';
33 33 import { APP_CONFIG, AppConfig } from '../../../src/config/app-config.interface';
34 34
35 35 @Component({
36 36 selector: 'ds-collection-page',
37 37 styleUrls: ['./collection-page.component.scss'],
38 38 templateUrl: './collection-page.component.html',
39 39 changeDetection: ChangeDetectionStrategy.OnPush,
40 40 animations: [
41 41 fadeIn,
108 108 switchMap(([currentPagination, currentSort]) => this.collectionRD$.pipe(
109 109 getFirstSucceededRemoteData(),
110 110 map((rd) => rd.payload.id),
111 111 switchMap((id: string) => {
112 112 return this.searchService.search<Item>(
113 113 new PaginatedSearchOptions({
114 114 scope: id,
115 115 pagination: currentPagination,
116 116 sort: currentSort,
117 117 dsoTypes: [DSpaceObjectType.ITEM]
118 - }), null, true, true, ...BROWSE_LINKS_TO_FOLLOW)
118 + }), null, true, true, ...getBrowseLinksToFollow())
119 119 .pipe(toDSpaceObjectListRD()) as Observable<RemoteData<PaginatedList<Item>>>;
120 120 }),
121 121 startWith(undefined) // Make sure switching pages shows loading component
122 122 )
123 123 )
124 124 );
125 125
126 126 this.collectionPageRoute$ = this.collectionRD$.pipe(
127 127 getAllSucceededRemoteDataPayload(),
128 128 map((collection) => getCollectionPageRoute(collection.id))

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut