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