Skip to content

Commit e5cd675

Browse files
alisaismailatisteph-ieffam
authored andcommitted
Merged in DSC-1323 (pull request DSpace#969)
[CST-11855] Display Format and the Checksum for advanced attachment the information Approved-by: Stefano Maffei
2 parents df78167 + a095e74 commit e5cd675

5 files changed

Lines changed: 22 additions & 2 deletions

File tree

src/app/cris-layout/cris-layout-matrix/cris-layout-box-container/boxes/metadata/rendering-types/advanced-attachment/advanced-attachment.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export class AdvancedAttachmentComponent extends AttachmentComponent implements
4949

5050
getBitstreamsByItem(options?: FindListOptions): Observable<PaginatedList<Bitstream>> {
5151
return this.bitstreamDataService
52-
.showableByItem(this.item.uuid, this.field.bitstream.bundle, this.getMetadataFilters(), options, false, false, followLink('thumbnail'))
52+
.showableByItem(this.item.uuid, this.field.bitstream.bundle, this.getMetadataFilters(), options, false, false, followLink('thumbnail'), followLink('format'))
5353
.pipe(
5454
getFirstCompletedRemoteData(),
5555
map((response: RemoteData<PaginatedList<Bitstream>>) => {

src/app/cris-layout/cris-layout-matrix/cris-layout-box-container/boxes/metadata/rendering-types/advanced-attachment/bitstream-attachment/bitstream-attachment.component.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,22 @@
4242

4343
<ng-container *ngIf="attachmentConf.type == AdvancedAttachmentElementType.Attribute">
4444
<ng-container *ngIf="attachmentConf.name == 'format'">
45+
<p *ngIf="!(getFormat(attachment) | async) "class="text-muted">
46+
{{'cris-layout.advanced-attachment.label.not-present' | translate}}
47+
</p>
4548
<p class="word-break m-0">{{getFormat(attachment) | async}}</p>
4649
</ng-container>
4750

4851
<ng-container *ngIf="attachmentConf.name == 'size'">
4952
<p class="word-break m-0">{{getSize(attachment) | dsFileSize}}</p>
5053
</ng-container>
54+
55+
<ng-container *ngIf="attachmentConf.name == 'checksum'">
56+
<p *ngIf="!(getChecksum(attachment)?.value) "class="text-muted">
57+
{{'cris-layout.advanced-attachment.label.not-present' | translate}}
58+
</p>
59+
<p class="word-break m-0">({{getChecksum(attachment).checkSumAlgorithm}}):{{ getChecksum(attachment).value }}</p>
60+
</ng-container>
5161
</ng-container>
5262

5363
</div>

src/assets/i18n/de.json5

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3024,6 +3024,10 @@
30243024
// TODO New key - Add a translation
30253025
"cris-layout.attachment.viewMore": "View More",
30263026

3027+
// "cris-layout.advanced-attachment.label.not-present": "(not present)",
3028+
// TODO New key - Add a translation
3029+
"cris-layout.advanced-attachment.label.not-present":"(not present)",
3030+
30273031
// "cris-layout.rendering.collections.owning-collection.label": "Owning collection",
30283032
// TODO New key - Add a translation
30293033
"cris-layout.rendering.collections.owning-collection.label": "Owning collection",
@@ -12451,4 +12455,4 @@
1245112455
"admin.system-wide-alert.title": "System-wide Alerts"
1245212456

1245312457

12454-
}
12458+
}

src/assets/i18n/en.json5

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1802,6 +1802,8 @@
18021802

18031803
"cris-layout.advanced-attachment.viewMore": "View More",
18041804

1805+
"cris-layout.advanced-attachment.label.not-present": "(not present)",
1806+
18051807
"cris-layout.attachment.viewMore": "View More",
18061808

18071809
"cris-layout.rendering.collections.owning-collection.label": "Owning collection",

src/assets/i18n/it.json5

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2670,6 +2670,10 @@
26702670
// "cris-layout.advanced-attachment.viewMore": "View More",
26712671
"cris-layout.advanced-attachment.viewMore": "Vedi altro",
26722672

2673+
// "cris-layout.advanced-attachment.label.not-present":"(not present)",
2674+
// TODO New key - Add a translation
2675+
"cris-layout.advanced-attachment.label.not-present":"(not present)",
2676+
26732677
// "cris-layout.attachment.viewMore": "View More",
26742678
"cris-layout.attachment.viewMore": "Vedi altro",
26752679

0 commit comments

Comments
 (0)