Merge remote-tracking branch 'remotes/origin/main' into upgrade_angular10

# Conflicts:
#	src/app/+item-page/item-page.module.ts
#	src/app/core/shared/item.model.ts
#	src/app/shared/object-grid/item-grid-element/item-types/item/item-grid-element.component.spec.ts
#	src/app/shared/search/search-filters/search-filter/search-authority-filter/search-authority-filter.component.ts
#	src/app/shared/search/search-filters/search-filter/search-facet-filter-options/search-facet-option/search-facet-option.component.ts
#	src/app/shared/search/search-filters/search-filter/search-facet-filter-options/search-facet-selected-option/search-facet-selected-option.component.ts
#	src/app/shared/search/search-filters/search-filter/search-facet-filter/search-facet-filter.component.ts
#	src/app/shared/shared.module.ts
This commit is contained in:
Giuseppe Digilio
2020-12-11 18:13:47 +01:00
97 changed files with 991 additions and 202 deletions

View File

@@ -8,6 +8,7 @@
</ds-grid-thumbnail>
</span>
<div class="card-body">
<ds-type-badge *ngIf="showLabel" [object]="dso"></ds-type-badge>
<h4 class="card-title">{{dso.name}}</h4>
<p *ngIf="dso.shortDescription" class="card-text">{{dso.shortDescription}}</p>
<div *ngIf="linkType != linkTypes.None" class="text-center">

View File

@@ -8,6 +8,7 @@
</ds-grid-thumbnail>
</span>
<div class="card-body">
<ds-type-badge *ngIf="showLabel" [object]="dso"></ds-type-badge>
<h4 class="card-title">{{dso.name}}</h4>
<p *ngIf="dso.shortDescription" class="card-text">{{dso.shortDescription}}</p>
<div *ngIf="linkType != linkTypes.None" class="text-center">

View File

@@ -15,7 +15,7 @@
</div>
</span>
<div class="card-body">
<ds-item-type-badge *ngIf="showLabel" [object]="dso"></ds-item-type-badge>
<ds-type-badge *ngIf="showLabel" [object]="dso"></ds-type-badge>
<ds-truncatable-part [id]="dso.id" [minLines]="3" type="h4">
<h4 class="card-title" [innerHTML]="firstMetadataValue('dc.title')"></h4>
</ds-truncatable-part>

View File

@@ -23,7 +23,7 @@ import { ItemSearchResult } from '../../../../object-collection/shared/item-sear
import { createSuccessfulRemoteDataObject$ } from '../../../../remote-data.utils';
import { TruncatableService } from '../../../../truncatable/truncatable.service';
import { TruncatePipe } from '../../../../utils/truncate.pipe';
import { PublicationSearchResultGridElementComponent } from './publication-search-result-grid-element.component';
import { ItemSearchResultGridElementComponent } from './item-search-result-grid-element.component';
const mockItemWithMetadata: ItemSearchResult = new ItemSearchResult();
mockItemWithMetadata.hitHighlights = {};
@@ -71,7 +71,7 @@ mockItemWithoutMetadata.indexableObject = Object.assign(new Item(), {
}
});
describe('PublicationGridElementComponent', getEntityGridElementTestComponent(PublicationSearchResultGridElementComponent, mockItemWithMetadata, mockItemWithoutMetadata, ['authors', 'date', 'abstract']));
describe('ItemGridElementComponent', getEntityGridElementTestComponent(ItemSearchResultGridElementComponent, mockItemWithMetadata, mockItemWithoutMetadata, ['authors', 'date', 'abstract']));
/**
* Create test cases for a grid component of an entity.

View File

@@ -9,13 +9,13 @@ import { ItemSearchResult } from '../../../../object-collection/shared/item-sear
@listableObjectComponent('PublicationSearchResult', ViewMode.GridElement)
@listableObjectComponent(ItemSearchResult, ViewMode.GridElement)
@Component({
selector: 'ds-publication-search-result-grid-element',
styleUrls: ['./publication-search-result-grid-element.component.scss'],
templateUrl: './publication-search-result-grid-element.component.html',
selector: 'ds-item-search-result-grid-element',
styleUrls: ['./item-search-result-grid-element.component.scss'],
templateUrl: './item-search-result-grid-element.component.html',
animations: [focusShadow]
})
/**
* The component for displaying a grid element for an item search result of the type Publication
*/
export class PublicationSearchResultGridElementComponent extends SearchResultGridElementComponent<ItemSearchResult, Item> {
export class ItemSearchResultGridElementComponent extends SearchResultGridElementComponent<ItemSearchResult, Item> {
}