mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-13 04:53:06 +00:00
80369: Add thumbnail link to Item & Bitstream models
This commit is contained in:
@@ -43,13 +43,14 @@ export class Bitstream extends DSpaceObject implements HALResource {
|
|||||||
bundle: HALLink;
|
bundle: HALLink;
|
||||||
format: HALLink;
|
format: HALLink;
|
||||||
content: HALLink;
|
content: HALLink;
|
||||||
|
thumbnail: HALLink;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The thumbnail for this Bitstream
|
* The thumbnail for this Bitstream
|
||||||
* Needs to be resolved first, but isn't available as a {@link HALLink} yet
|
* Will be undefined unless the thumbnail {@link HALLink} has been resolved.
|
||||||
* Use BitstreamDataService.getThumbnailFor(…) for now.
|
|
||||||
*/
|
*/
|
||||||
|
@link(BITSTREAM, false, 'thumbnail')
|
||||||
thumbnail?: Observable<RemoteData<Bitstream>>;
|
thumbnail?: Observable<RemoteData<Bitstream>>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -19,6 +19,8 @@ import { ITEM } from './item.resource-type';
|
|||||||
import { ChildHALResource } from './child-hal-resource.model';
|
import { ChildHALResource } from './child-hal-resource.model';
|
||||||
import { Version } from './version.model';
|
import { Version } from './version.model';
|
||||||
import { VERSION } from './version.resource-type';
|
import { VERSION } from './version.resource-type';
|
||||||
|
import { BITSTREAM } from './bitstream.resource-type';
|
||||||
|
import { Bitstream } from './bitstream.model';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class representing a DSpace Item
|
* Class representing a DSpace Item
|
||||||
@@ -69,6 +71,7 @@ export class Item extends DSpaceObject implements ChildHALResource {
|
|||||||
owningCollection: HALLink;
|
owningCollection: HALLink;
|
||||||
templateItemOf: HALLink;
|
templateItemOf: HALLink;
|
||||||
version: HALLink;
|
version: HALLink;
|
||||||
|
thumbnail: HALLink;
|
||||||
self: HALLink;
|
self: HALLink;
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -100,6 +103,13 @@ export class Item extends DSpaceObject implements ChildHALResource {
|
|||||||
@link(RELATIONSHIP, true)
|
@link(RELATIONSHIP, true)
|
||||||
relationships?: Observable<RemoteData<PaginatedList<Relationship>>>;
|
relationships?: Observable<RemoteData<PaginatedList<Relationship>>>;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The thumbnail for this Item
|
||||||
|
* Will be undefined unless the thumbnail {@link HALLink} has been resolved.
|
||||||
|
*/
|
||||||
|
@link(BITSTREAM, false, 'thumbnail')
|
||||||
|
thumbnail?: Observable<RemoteData<Bitstream>>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method that returns as which type of object this object should be rendered
|
* Method that returns as which type of object this object should be rendered
|
||||||
*/
|
*/
|
||||||
|
@@ -78,6 +78,7 @@ describe('ThumbnailComponent', () => {
|
|||||||
bundle: { href: 'bundle.url' },
|
bundle: { href: 'bundle.url' },
|
||||||
format: { href: 'format.url' },
|
format: { href: 'format.url' },
|
||||||
content: { href: 'content.url' },
|
content: { href: 'content.url' },
|
||||||
|
thumbnail: undefined,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -126,6 +127,7 @@ describe('ThumbnailComponent', () => {
|
|||||||
bundle: { href: 'bundle.url' },
|
bundle: { href: 'bundle.url' },
|
||||||
format: { href: 'format.url' },
|
format: { href: 'format.url' },
|
||||||
content: { href: 'content.url' },
|
content: { href: 'content.url' },
|
||||||
|
thumbnail: undefined,
|
||||||
};
|
};
|
||||||
thumbnail = createSuccessfulRemoteDataObject(bitstream);
|
thumbnail = createSuccessfulRemoteDataObject(bitstream);
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user