1
0

breadcrumbs for DSOs

This commit is contained in:
lotte
2020-02-21 17:06:50 +01:00
committed by Art Lowel
parent 4ea264dd7f
commit 725f20a9d0
18 changed files with 197 additions and 39 deletions

View File

@@ -10,10 +10,11 @@ import { COLLECTION } from './collection.resource-type';
import { COMMUNITY } from './community.resource-type';
import { DSpaceObject } from './dspace-object.model';
import { HALLink } from './hal-link.model';
import { ChildHALResource } from './child-hal-resource.model';
@typedObject
@inheritSerialization(DSpaceObject)
export class Community extends DSpaceObject {
export class Community extends DSpaceObject implements ChildHALResource {
static type = COMMUNITY;
/**
@@ -30,6 +31,7 @@ export class Community extends DSpaceObject {
collections: HALLink;
logo: HALLink;
subcommunities: HALLink;
parentCommunity: HALLink;
self: HALLink;
};
@@ -54,6 +56,13 @@ export class Community extends DSpaceObject {
@link(COMMUNITY, true)
subcommunities?: Observable<RemoteData<PaginatedList<Community>>>;
/**
* The Community that is a direct parent of this Community
* Will be undefined unless the parent community HALLink has been resolved.
*/
@link(COMMUNITY, false)
parentCommunity?: Observable<RemoteData<Community>>;
/**
* The introductory text of this Community
* Corresponds to the metadata field dc.description
@@ -85,4 +94,8 @@ export class Community extends DSpaceObject {
get sidebarText(): string {
return this.firstMetadataValue('dc.description.tableofcontents');
}
getParentLinkKey(): keyof this['_links'] {
return 'parentCommunity';
}
}