mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
#674 fix
This commit is contained in:
@@ -8,8 +8,6 @@ import { LinkService } from '../../../core/cache/builders/link.service';
|
||||
let collectionGridElementComponent: CollectionGridElementComponent;
|
||||
let fixture: ComponentFixture<CollectionGridElementComponent>;
|
||||
|
||||
|
||||
|
||||
const mockCollectionWithAbstract: Collection = Object.assign(new Collection(), {
|
||||
metadata: {
|
||||
'dc.description.abstract': [
|
||||
|
@@ -1,5 +1,4 @@
|
||||
import { Component, Input } from '@angular/core';
|
||||
|
||||
import { Collection } from '../../../core/shared/collection.model';
|
||||
import { AbstractListableElementComponent } from '../../object-collection/shared/object-collection-element/abstract-listable-element.component';
|
||||
import { ViewMode } from '../../../core/shared/view-mode.model';
|
||||
@@ -14,21 +13,25 @@ import { LinkService } from '../../../core/cache/builders/link.service';
|
||||
@Component({
|
||||
selector: 'ds-collection-grid-element',
|
||||
styleUrls: ['./collection-grid-element.component.scss'],
|
||||
templateUrl: './collection-grid-element.component.html'
|
||||
templateUrl: './collection-grid-element.component.html',
|
||||
})
|
||||
|
||||
@listableObjectComponent(Collection, ViewMode.GridElement)
|
||||
export class CollectionGridElementComponent extends AbstractListableElementComponent<Collection> {
|
||||
export class CollectionGridElementComponent extends AbstractListableElementComponent<
|
||||
Collection
|
||||
> {
|
||||
private _object: Collection;
|
||||
|
||||
constructor( private linkService: LinkService){
|
||||
constructor(private linkService: LinkService) {
|
||||
super();
|
||||
}
|
||||
|
||||
@Input() set object(object: Collection) {
|
||||
this._object = object;
|
||||
if (hasValue(this._object) && hasNoValue(this._object.logo)) {
|
||||
this.linkService.resolveLink<Collection>(this._object, followLink('logo'))
|
||||
this.linkService.resolveLink<Collection>(
|
||||
this._object,
|
||||
followLink('logo')
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,4 @@
|
||||
import { Component, Input } from '@angular/core';
|
||||
|
||||
import { Community } from '../../../core/shared/community.model';
|
||||
import { AbstractListableElementComponent } from '../../object-collection/shared/object-collection-element/abstract-listable-element.component';
|
||||
import { ViewMode } from '../../../core/shared/view-mode.model';
|
||||
@@ -21,7 +20,7 @@ import { hasNoValue, hasValue } from '../../empty.util';
|
||||
export class CommunityGridElementComponent extends AbstractListableElementComponent<Community> {
|
||||
private _object: Community;
|
||||
|
||||
constructor( private linkService: LinkService){
|
||||
constructor( private linkService: LinkService) {
|
||||
super();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user