Skip to content

Commit

Permalink
Merged in DSC-1446-main (pull request DSpace#1228)
Browse files Browse the repository at this point in the history
[DSC-1446] added default file thumbnail

Approved-by: Stefano Maffei
  • Loading branch information
alisaismailati authored and steph-ieffam committed Jan 26, 2024
2 parents 4cd3982 + 054d05e commit 0a02da1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,13 @@ export class ThumbnailComponent extends BitstreamRenderingModelComponent impleme
*/
setDefaultImage(): void {
const eType = this.item.firstMetadataValue('dspace.entity.type');
this.default = 'assets/images/person-placeholder.svg';
this.default = 'assets/images/file-placeholder.svg';
if (hasValue(eType) && eType.toUpperCase() === 'PROJECT') {
this.default = 'assets/images/project-placeholder.svg';
} else if (hasValue(eType) && eType.toUpperCase() === 'ORGUNIT') {
this.default = 'assets/images/orgunit-placeholder.svg';
} else if (hasValue(eType) && eType.toUpperCase() === 'PERSON') {
this.default = 'assets/images/person-placeholder.svg';
}
}
}
8 changes: 8 additions & 0 deletions src/assets/images/file-placeholder.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0a02da1

Please sign in to comment.