|
4 | 4 | [showContent]="!!record?.title"
|
5 | 5 | >
|
6 | 6 | <div class="font-title text-[28px] line-clamp-3 mb-4">
|
7 |
| - {{ record.title }} |
| 7 | + {{ record?.title || 'No Title Available' }} |
8 | 8 | </div>
|
9 |
| - <gn-ui-metadata-info [metadata]="record"></gn-ui-metadata-info> |
| 9 | + |
| 10 | + <gn-ui-metadata-info *ngIf="record" [metadata]="record"></gn-ui-metadata-info> |
10 | 11 |
|
11 | 12 | <gn-ui-image-overlay-preview
|
12 | 13 | class="block h-[185px] mb-5"
|
| 14 | + *ngIf="record?.overviews?.length > 0" |
13 | 15 | [imageUrl]="record?.overviews?.[0]?.url"
|
14 | 16 | >
|
15 | 17 | </gn-ui-image-overlay-preview>
|
16 |
| - <gn-ui-metadata-contact [metadata]="record"> </gn-ui-metadata-contact> |
17 | 18 |
|
18 |
| - <div class="font-title text-lg mt-4 mb-2 flex flex-row gap-4 items-center"> |
19 |
| - <span translate> record.metadata.download</span> |
20 |
| - <gn-ui-previous-next-buttons |
21 |
| - *ngIf="downloads.pagesCount > 1" |
22 |
| - [listComponent]="downloads" |
23 |
| - ></gn-ui-previous-next-buttons> |
| 19 | + <gn-ui-metadata-contact *ngIf="record" [metadata]="record"></gn-ui-metadata-contact> |
| 20 | + |
| 21 | + <div *ngIf="getDownloads(record?.onlineResources)?.length > 0"> |
| 22 | + <div class="font-title text-lg mt-4 mb-2 flex flex-row gap-4 items-center"> |
| 23 | + <span translate>record.metadata.download</span> |
| 24 | + <gn-ui-previous-next-buttons |
| 25 | + *ngIf="downloads?.pagesCount > 1" |
| 26 | + [listComponent]="downloads" |
| 27 | + ></gn-ui-previous-next-buttons> |
| 28 | + </div> |
| 29 | + <gn-ui-block-list |
| 30 | + [pageSize]="4" |
| 31 | + containerClass="gap-4 pt-3 pb-6" |
| 32 | + #downloads |
| 33 | + > |
| 34 | + <gn-ui-download-item |
| 35 | + *ngFor="let otherLink of getDownloads(record?.onlineResources)" |
| 36 | + [link]="otherLink" |
| 37 | + ></gn-ui-download-item> |
| 38 | + </gn-ui-block-list> |
24 | 39 | </div>
|
25 |
| - <gn-ui-block-list |
26 |
| - [pageSize]="4" |
27 |
| - containerClass="gap-4 pt-3 pb-6" |
28 |
| - #downloads |
29 |
| - > |
30 |
| - <gn-ui-download-item |
31 |
| - #block |
32 |
| - *ngFor="let otherLink of getDownloads(record.onlineResources)" |
33 |
| - [link]="otherLink" |
34 |
| - ></gn-ui-download-item> |
35 |
| - </gn-ui-block-list> |
36 | 40 |
|
37 |
| - <div class="font-title text-lg mt-4 mb-2 flex flex-row gap-4 items-center"> |
38 |
| - <span translate>record.metadata.links</span> |
39 |
| - <gn-ui-previous-next-buttons |
40 |
| - *ngIf="links.pagesCount > 1" |
41 |
| - [listComponent]="links" |
42 |
| - ></gn-ui-previous-next-buttons> |
| 41 | + <div *ngIf="getLinks(record?.onlineResources)?.length > 0"> |
| 42 | + <div class="font-title text-lg mt-4 mb-2 flex flex-row gap-4 items-center"> |
| 43 | + <span translate>record.metadata.links</span> |
| 44 | + <gn-ui-previous-next-buttons |
| 45 | + *ngIf="links?.pagesCount > 1" |
| 46 | + [listComponent]="links" |
| 47 | + ></gn-ui-previous-next-buttons> |
| 48 | + </div> |
| 49 | + <gn-ui-block-list [pageSize]="4" containerClass="gap-4 pt-3 pb-6" #links> |
| 50 | + <gn-ui-link-card |
| 51 | + *ngFor="let otherLink of getLinks(record?.onlineResources)" |
| 52 | + [link]="otherLink" |
| 53 | + [compact]="true" |
| 54 | + ></gn-ui-link-card> |
| 55 | + </gn-ui-block-list> |
43 | 56 | </div>
|
44 |
| - <gn-ui-block-list [pageSize]="4" containerClass="gap-4 pt-3 pb-6" #links> |
45 |
| - <gn-ui-link-card |
46 |
| - #block |
47 |
| - *ngFor="let otherLink of getLinks(record.onlineResources)" |
48 |
| - [link]="otherLink" |
49 |
| - [compact]="true" |
50 |
| - ></gn-ui-link-card> |
51 |
| - </gn-ui-block-list> |
52 | 57 |
|
53 |
| - <div class="font-title text-lg mt-4 mb-2 flex flex-row gap-4 items-center"> |
54 |
| - <span translate>record.metadata.api</span> |
55 |
| - <gn-ui-previous-next-buttons |
56 |
| - *ngIf="apis.pagesCount > 1" |
57 |
| - [listComponent]="apis" |
58 |
| - ></gn-ui-previous-next-buttons> |
| 58 | + <div *ngIf="getAPIs(record?.onlineResources)?.length > 0"> |
| 59 | + <div class="font-title text-lg mt-4 mb-2 flex flex-row gap-4 items-center"> |
| 60 | + <span translate>record.metadata.api</span> |
| 61 | + <gn-ui-previous-next-buttons |
| 62 | + *ngIf="apis?.pagesCount > 1" |
| 63 | + [listComponent]="apis" |
| 64 | + ></gn-ui-previous-next-buttons> |
| 65 | + </div> |
| 66 | + <gn-ui-block-list [pageSize]="4" containerClass="gap-4 pt-3 pb-6" #apis> |
| 67 | + <gn-ui-api-card |
| 68 | + *ngFor="let otherLink of getAPIs(record?.onlineResources)" |
| 69 | + [link]="otherLink" |
| 70 | + ></gn-ui-api-card> |
| 71 | + </gn-ui-block-list> |
59 | 72 | </div>
|
60 |
| - <gn-ui-block-list [pageSize]="4" containerClass="gap-4 pt-3 pb-6" #apis> |
61 |
| - <gn-ui-api-card |
62 |
| - #block |
63 |
| - *ngFor="let otherLink of getAPIs(record.onlineResources)" |
64 |
| - [link]="otherLink" |
65 |
| - ></gn-ui-api-card> |
66 |
| - </gn-ui-block-list> |
67 | 73 | </gn-ui-content-ghost>
|
68 | 74 | </ng-container>
|
| 75 | + |
| 76 | +<ng-template #loadingOrError> |
| 77 | + <p *ngIf="(record$ | async) === null">No record found for the provided ID.</p> |
| 78 | +</ng-template> |
0 commit comments