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