Skip to content

Commit

Permalink
Merged in DSC-1500-hide-the-possibility-to-download-maintenance (pull…
Browse files Browse the repository at this point in the history
… request DSpace#1300)

[GLAM-640] hide download link for non-downloadable bitstreams on full view

Approved-by: Davide Negretti
  • Loading branch information
vNovski authored and Davide Negretti committed Feb 6, 2024
2 parents b1e0abb + f903ad4 commit d4566fa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ <h5 class="simple-view-element-header">{{"item.page.filesection.original.bundle"
</ng-container>
</dl>
</div>
<div class="col-2">
<div *ngIf="!hasNoDownload(file)" class="col-2">
<ds-themed-file-download-link [bitstream]="file" [item]="item">
{{"item.page.filesection.download" | translate}}
</ds-themed-file-download-link>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,10 @@ export class FullFileSectionComponent extends FileSectionComponent implements On
return hasValue(bundle) && !isEmpty(bundle.page);
}

hasNoDownload(bitstream: Bitstream) {
return bitstream?.allMetadataValues('bitstream.viewer.provider').includes('nodownload');
}

ngOnDestroy(): void {
this.paginationService.clearPagination(this.originalOptions.id);
this.paginationService.clearPagination(this.licenseOptions.id);
Expand Down

0 comments on commit d4566fa

Please sign in to comment.