mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-13 21:13:07 +00:00
94481: Use DSONameService in all other remaining place where dc.title, person.familyName, person.givenName or organization.legalName is used
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
<div class="card-body">
|
||||
<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>
|
||||
<h4 class="card-title" [innerHTML]="dsoTitle"></h4>
|
||||
</ds-truncatable-part>
|
||||
<p *ngIf="dso.hasMetadata(['dc.contributor.author', 'dc.creator', 'dc.contributor.*'])"
|
||||
class="item-authors card-text text-muted">
|
||||
|
@@ -1,11 +1,16 @@
|
||||
import { Component } from '@angular/core';
|
||||
import { focusShadow } from '../../../../animations/focus';
|
||||
import { ViewMode } from '../../../../../core/shared/view-mode.model';
|
||||
import { listableObjectComponent } from '../../../../object-collection/shared/listable-object/listable-object.decorator';
|
||||
import {
|
||||
listableObjectComponent
|
||||
} from '../../../../object-collection/shared/listable-object/listable-object.decorator';
|
||||
import { SearchResultGridElementComponent } from '../../search-result-grid-element.component';
|
||||
import { Item } from '../../../../../core/shared/item.model';
|
||||
import { ItemSearchResult } from '../../../../object-collection/shared/item-search-result.model';
|
||||
import { getItemPageRoute } from '../../../../../item-page/item-page-routing-paths';
|
||||
import { DSONameService } from '../../../../../core/breadcrumbs/dso-name.service';
|
||||
import { TruncatableService } from '../../../../truncatable/truncatable.service';
|
||||
import { BitstreamDataService } from '../../../../../core/data/bitstream-data.service';
|
||||
|
||||
@listableObjectComponent('PublicationSearchResult', ViewMode.GridElement)
|
||||
@listableObjectComponent(ItemSearchResult, ViewMode.GridElement)
|
||||
@@ -24,8 +29,19 @@ export class ItemSearchResultGridElementComponent extends SearchResultGridElemen
|
||||
*/
|
||||
itemPageRoute: string;
|
||||
|
||||
dsoTitle: string;
|
||||
|
||||
constructor(
|
||||
protected truncatableService: TruncatableService,
|
||||
protected bitstreamDataService: BitstreamDataService,
|
||||
private dsoNameService: DSONameService,
|
||||
) {
|
||||
super(truncatableService, bitstreamDataService);
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
super.ngOnInit();
|
||||
this.itemPageRoute = getItemPageRoute(this.dso);
|
||||
this.dsoTitle = this.dsoNameService.getName(this.dso);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user