Skip to content

Commit

Permalink
document: display cover thumbnail
Browse files Browse the repository at this point in the history
* Moves thumbnail logic in 'shared' library as it's used in both admin
and public-search projects.
* Adds thumbnails in professional brief and detailed view.
* Moves 'type' field below the thumbnail in admin detailed view.
* Closes rero/rero-ils#1188.

Co-Authored-by: Alicia Zangger <alicia.zangger@rero.ch>
  • Loading branch information
Alicia Zangger committed Jan 18, 2021
1 parent 9d28f41 commit beeee0e
Showing 1 changed file with 48 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,17 @@ <h3 id="{{'doc-altgr-title-' + i}}">{{ altgr_title }}</h3>
</ul>
</ng-container>

<!-- PUBLICATION STATEMENT -->
<ng-container *ngFor="let provision of provisionActivity | keyvalue | callbackArrayFilter: filterPublicationProvisionActivity">
<ul class="list-unstyled mb-0">
<li *ngFor="let value of provision.value; let i = index"
[attr.id]="i | idAttribute:{prefix: 'doc-publication-statement'}">
{{ value }}
</li>
</ul>
</ng-container>
<!-- PUBLICATION STATEMENT -->
<ng-container *ngFor="let provision of provisionActivity | keyvalue | callbackArrayFilter: filterPublicationProvisionActivity">
<ng-container *ngIf="provision.key === 'bf:Publication'">
<ul class="list-unstyled mb-0">
<li *ngFor="let value of provision.value; let i = index"
[attr.id]="i | idAttribute:{prefix: 'doc-publication-statement'}">
{{ value }}
</li>
</ul>
</ng-container>
</ng-container>

<!-- EXTENT-->
<ng-container *ngIf="record.metadata.extent">
Expand All @@ -99,48 +101,43 @@ <h3 id="{{'doc-altgr-title-' + i}}">{{ altgr_title }}</h3>
</ul>
</ng-container>

<!-- IS PART OF -->
<ng-container *ngFor="let document of record.metadata.partOf; let i = index">
<ng-container *ngIf="document.document.pid | getRecord: 'documents' : 'object' : '': { 'Content-Type': 'application/rero+json' } | async as hostDocument">
<dl class="row mb-0">
<dt id="{{'doc-part-of-label-' + i}}" class="col-auto">
{{ getPartOfLabel(hostDocument) }}
</dt>
<dd class="col mb-0">
<div class="row">
<a id="{{'doc-part-of-' + i}}" [routerLink]="['/records', 'documents', 'detail', document.document.pid]">
{{ getShortMainTitle(hostDocument.metadata.title) }}
</a>
<ng-container *ngIf="document.numbering">
<span>;</span>
<ul class="list-unstyled mb-0 ml-1">
<li *ngFor="let numbering of document.numbering">
<span id="{{'doc-part-of-numbering-' + i}}" *ngIf="formatNumbering(numbering) as num">{{ num }}</span>
</li>
</ul>
</ng-container>
</div>
</dd>
</dl>
</ng-container>
</ng-container>

<!-- ABSTRACT -->
<ng-container *ngIf=" record.metadata.abstracts && record.metadata.abstracts.length > 0">
<ul class="list-unstyled my-3">
<li *ngFor="let abstract of record.metadata.abstracts; let i = index"
[attr.id]="i | idAttribute:{prefix: 'doc-abstract'}">
<ng-core-text-read-more
[text]="abstract"
[unit]="'word'"
[limit]="100"
[showMoreLabel]="'Show more' | translate"
[showLessLabel]="'Show less' | translate"
>
</ng-core-text-read-more>
</li>
</ul>
</ng-container>
<!-- IS PART OF -->
<ng-container *ngFor="let document of record.metadata.partOf; let i = index">
<ng-container *ngIf="document.document.pid | getRecord: 'documents' : 'object' : '': { 'Content-Type': 'application/rero+json' } | async as hostDocument">
<dl class="row mb-0">
<dt id="{{'doc-part-of-label-' + i}}" class="col-auto">
{{ getPartOfLabel(hostDocument) }}
</dt>
<dd class="col mb-0">
<div class="row">
<a id="{{'doc-part-of-' + i}}"[routerLink]="['/records', 'documents', 'detail', document.document.pid]">
{{ getShortMainTitle(hostDocument.metadata.title) }}
</a>
<ng-container *ngIf="document.numbering">
<span>;</span>
<ul class="list-unstyled mb-0 ml-1">
<li *ngFor="let numbering of document.numbering">
<span id="{{'doc-part-of-numbering-' + i}}" *ngIf="formatNumbering(numbering) as num">{{ num }}</span>
</li>
</ul>
</ng-container>
</div>
</dd>
</dl>
</ng-container>
</ng-container>

<!-- ABSTRACT -->
<ng-container *ngIf=" record.metadata.abstracts && record.metadata.abstracts.length > 0">
<ul class="list-unstyled mb-0">
<li *ngFor="let abstract of record.metadata.abstracts; let i = index"
[attr.id]="i | idAttribute:{prefix: 'doc-abstract'}">
<ng-core-text-read-more [text]="abstract" [unit]="'word'" [limit]="100"
[showMoreLabel]="'Show more' | translate" [showLessLabel]="'Show less' | translate">
</ng-core-text-read-more>
</li>
</ul>
</ng-container>

<!-- SUBJECTS -->
<div class="row" *ngIf="record.metadata.subjects">
Expand Down

0 comments on commit beeee0e

Please sign in to comment.