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