mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-14 21:43:04 +00:00
removed remaining normalized models and related services
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Component, Input } from '@angular/core';
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { Bitstream } from '../core/shared/bitstream.model';
|
||||
import { hasValue } from '../shared/empty.util';
|
||||
|
||||
@@ -13,16 +13,9 @@ import { hasValue } from '../shared/empty.util';
|
||||
styleUrls: ['./thumbnail.component.scss'],
|
||||
templateUrl: './thumbnail.component.html'
|
||||
})
|
||||
export class ThumbnailComponent {
|
||||
export class ThumbnailComponent implements OnInit {
|
||||
|
||||
private _thumbnail: Bitstream;
|
||||
|
||||
get thumbnail(): Bitstream {
|
||||
return this._thumbnail;
|
||||
};
|
||||
|
||||
@Input() set thumbnail(t: Bitstream) {
|
||||
this._thumbnail = t;
|
||||
ngOnInit(): void {
|
||||
if (hasValue(this.thumbnail) && hasValue(this.thumbnail._links) && hasValue(this.thumbnail._links.content) && this.thumbnail._links.content.href) {
|
||||
this.src = this.thumbnail._links.content.href;
|
||||
} else {
|
||||
@@ -30,6 +23,8 @@ export class ThumbnailComponent {
|
||||
}
|
||||
}
|
||||
|
||||
@Input() thumbnail: Bitstream;
|
||||
|
||||
/**
|
||||
* The default 'holder.js' image
|
||||
*/
|
||||
|
Reference in New Issue
Block a user