@@ -9,43 +9,9 @@ <h3 class="h5 simple-view-element-header">
99 < ds-pagination [hideGear] ="true " [hidePagerWhenSinglePage] ="true " [paginationOptions] ="originalOptions "
1010 [collectionSize] ="originals?.totalElements " [retainScrollPosition] ="true ">
1111 @for (file of originals?.page; track file) {
12- < div class ="file-section row mb-3 ">
13- < div class ="col-3 ">
14- < ds-thumbnail [thumbnail] ="(file.thumbnail | async)?.payload "> </ ds-thumbnail >
15- </ div >
16- < div class ="col-7 ">
17- < dl class ="row dont-break-out ">
18- < dt class ="col-md-4 ">
19- {{ "item.page.filesection.name" | translate }}
20- </ dt >
21- < dd class ="col-md-8 "> {{ dsoNameService.getName(file) }}</ dd >
22- < dt class ="col-md-4 ">
23- {{ "item.page.filesection.size" | translate }}
24- </ dt >
25- < dd class ="col-md-8 "> {{ file.sizeBytes | dsFileSize }}</ dd >
26- < dt class ="col-md-4 ">
27- {{ "item.page.filesection.format" | translate }}
28- </ dt >
29- < dd class ="col-md-8 ">
30- {{ (file.format | async)?.payload?.description }}
31- </ dd >
32- @if (file.hasMetadata('dc.description')) {
33- < dt class ="col-md-4 ">
34- {{ "item.page.filesection.description" | translate }}
35- </ dt >
36- < dd class ="col-md-8 " [dsMetadata] ="file.firstMetadata('dc.description') ">
37- </ dd >
38- }
39- </ dl >
40- </ div >
41- < div class ="col-2 ">
42- < ds-file-download-link [showIcon] ="true " [bitstream] ="file " [item] ="item " cssClasses ="btn btn-outline-primary btn-download ">
43- < span class ="d-none d-md-inline ">
44- {{ "item.page.filesection.download" | translate }}
45- </ span >
46- </ ds-file-download-link >
47- </ div >
48- </ div >
12+ < ng-container [ngTemplateOutlet] ="fileSection "
13+ [ngTemplateOutletContext] ="{ file : file } ">
14+ </ ng-container >
4915 }
5016 </ ds-pagination >
5117 }
@@ -62,45 +28,53 @@ <h3 class="h5 simple-view-element-header">
6228 < ds-pagination [hideGear] ="true " [hidePagerWhenSinglePage] ="true " [paginationOptions] ="licenseOptions "
6329 [collectionSize] ="licenses?.totalElements " [retainScrollPosition] ="true ">
6430 @for (file of licenses?.page; track file) {
65- < div class ="file-section row ">
66- < div class ="col-3 ">
67- < ds-thumbnail [thumbnail] ="(file.thumbnail | async)?.payload "> </ ds-thumbnail >
68- </ div >
69- < div class ="col-7 ">
70- < dl class ="row ">
71- < dt class ="col-md-4 ">
72- {{ "item.page.filesection.name" | translate }}
73- </ dt >
74- < dd class ="col-md-8 "> {{ dsoNameService.getName(file) }}</ dd >
75- < dt class ="col-md-4 ">
76- {{ "item.page.filesection.size" | translate }}
77- </ dt >
78- < dd class ="col-md-8 "> {{ file.sizeBytes | dsFileSize }}</ dd >
79- < dt class ="col-md-4 ">
80- {{ "item.page.filesection.format" | translate }}
81- </ dt >
82- < dd class ="col-md-8 ">
83- {{ (file.format | async)?.payload?.description }}
84- </ dd >
85- < dt class ="col-md-4 ">
86- {{ "item.page.filesection.description" | translate }}
87- </ dt >
88- < dd class ="col-md-8 " [dsMetadata] ="file.firstMetadata('dc.description') ">
89- </ dd >
90- </ dl >
91- </ div >
92- < div class ="col-2 ">
93- < ds-file-download-link [showIcon] ="true " [bitstream] ="file " [item] ="item " cssClasses ="btn btn-outline-primary btn-download ">
94- < span class ="d-none d-md-inline ">
95- {{ "item.page.filesection.download" | translate }}
96- </ span >
97- </ ds-file-download-link >
98- </ div >
99- </ div >
31+ < ng-container [ngTemplateOutlet] ="fileSection "
32+ [ngTemplateOutletContext] ="{ file : file } ">
33+ </ ng-container >
10034 }
10135 </ ds-pagination >
10236 }
10337 </ div >
10438 }
10539 </ div >
10640</ ds-metadata-field-wrapper >
41+
42+ < ng-template #fileSection let-file ="file ">
43+ < div class ="file-section row mb-3 ">
44+ < div class ="col-3 ">
45+ < ds-thumbnail [thumbnail] ="(file.thumbnail | async)?.payload "> </ ds-thumbnail >
46+ </ div >
47+ < div class ="col-7 ">
48+ < dl class ="row dont-break-out ">
49+ < dt class ="col-md-4 ">
50+ {{ "item.page.filesection.name" | translate }}
51+ </ dt >
52+ < dd class ="col-md-8 "> {{ dsoNameService.getName(file) }}</ dd >
53+ < dt class ="col-md-4 ">
54+ {{ "item.page.filesection.size" | translate }}
55+ </ dt >
56+ < dd class ="col-md-8 "> {{ file.sizeBytes | dsFileSize }}</ dd >
57+ < dt class ="col-md-4 ">
58+ {{ "item.page.filesection.format" | translate }}
59+ </ dt >
60+ < dd class ="col-md-8 ">
61+ {{ (file.format | async)?.payload?.description }}
62+ </ dd >
63+ @if (file.hasMetadata('dc.description')) {
64+ < dt class ="col-md-4 ">
65+ {{ "item.page.filesection.description" | translate }}
66+ </ dt >
67+ < dd class ="col-md-8 " [dsMetadata] ="file.firstMetadata('dc.description') ">
68+ </ dd >
69+ }
70+ </ dl >
71+ </ div >
72+ < div class ="col-2 ">
73+ < ds-file-download-link [showIcon] ="true " [bitstream] ="file " [item] ="item " cssClasses ="btn btn-outline-primary btn-download ">
74+ < span class ="d-none d-md-inline ">
75+ {{ "item.page.filesection.download" | translate }}
76+ </ span >
77+ </ ds-file-download-link >
78+ </ div >
79+ </ div >
80+ </ ng-template >
0 commit comments