Skip to content
Snippets Groups Projects
journal-search-result-grid-element.component.html 2.2 KiB
Newer Older
<ds-truncatable [id]="dso.id">
    <div class="card" [@focusShadow]="(isCollapsed$ | async)?'blur':'focus'">
        <a *ngIf="linkType != linkTypes.None" [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" rel="noopener noreferrer" [routerLink]="['/items/' + dso.id]" class="card-img-top full-width">
            <div>
                <ds-grid-thumbnail [thumbnail]="dso.getThumbnail() | async">
                </ds-grid-thumbnail>
            </div>
        </a>
        <span *ngIf="linkType == linkTypes.None" class="card-img-top full-width">
            <div>
                <ds-grid-thumbnail [thumbnail]="dso.getThumbnail() | async">
                </ds-grid-thumbnail>
            </div>
        </span>
        <div class="card-body">
lotte's avatar
lotte committed
            <ds-item-type-badge [object]="dso"></ds-item-type-badge>
            <ds-truncatable-part [id]="dso.id" [minLines]="3" type="h4">
                <h4 class="card-title" [innerHTML]="firstMetadataValue('dc.title')"></h4>
            </ds-truncatable-part>
            <p *ngIf="dso.hasMetadata('creativework.editor')"
               class="item-publisher card-text text-muted">
                <ds-truncatable-part [id]="dso.id" [minLines]="1">
                    <span class="item-editor">{{firstMetadataValue('creativework.editor')}}</span>
                    <span *ngIf="dso.hasMetadata('creativework.publisher')" class="item-publisher">
                        {{firstMetadataValue('creativework.publisher')}}
                </ds-truncatable-part>
            </p>
            <p *ngIf="dso.hasMetadata('dc.description')" class="item-description card-text">
                <ds-truncatable-part [id]="dso.id" [minLines]="3">
                    <span [innerHTML]="firstMetadataValue('dc.description')"></span>
                </ds-truncatable-part>
            </p>
            <div *ngIf="linkType != linkTypes.None" class="text-center">
                <a [target]="(linkType == linkTypes.ExternalLink) ? '_blank' : '_self'" rel="noopener noreferrer" [routerLink]="['/items/' + dso.id]"
                   class="lead btn btn-primary viewButton">View</a>
    </div>
</ds-truncatable>