[develop | DONE | FIXED]: availableOn.component.ts: Added field "@Input() inModal: boolean = false;" and display download sources when in modal - e.g. versions. | result-preview.component.html: Display download sources (<availableOn>) in versions (isDeletedByInferenceModal).
This commit is contained in:
parent
92f43c280e
commit
09960fda9e
|
@ -14,6 +14,14 @@ import {RouterHelper} from "../../utils/routerHelper.class";
|
|||
<div class="uk-flex uk-flex-middle"
|
||||
[ngClass]="isMobile ? ('uk-flex-column ' + (!(usedBy == 'landing') ? 'uk-margin-left uk-margin-xsmall-bottom' : '')) : 'uk-grid uk-grid-small uk-child-width-auto'"
|
||||
[attr.uk-grid]="!isMobile ? '' : null">
|
||||
|
||||
<ng-container *ngIf="inModal">
|
||||
<div class="uk-text-small uk-height-max-small uk-overflow-auto">
|
||||
<ng-container *ngTemplateOutlet="availableOnList"></ng-container>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="!inModal">
|
||||
<div *ngIf="properties.environment != 'production' && availableOn[0].fulltext" class="uk-flex uk-flex-middle"
|
||||
[ngClass]="isMobile ? 'uk-width-1-1' : 'uk-text-bolder'">
|
||||
<a [href]="availableOn[0].fulltext" target="_blank"
|
||||
|
@ -24,8 +32,8 @@ import {RouterHelper} from "../../utils/routerHelper.class";
|
|||
<span class="uk-margin-xsmall-left">Full-Text</span>
|
||||
</a>
|
||||
</div>
|
||||
<div *ngIf="properties.environment != 'production' && isMobile && (usedBy == 'landing') && availableOn[0].fulltext" class="uk-width-1-1"><hr></div>
|
||||
<div *ngIf="availableOn[0].downloadUrl" [ngClass]="isMobile ? 'uk-width-1-1' : ''">
|
||||
|
||||
<div *ngIf="properties.environment != 'production' && isMobile && (usedBy == 'landing') && availableOn[0].fulltext" class="uk-width-1-1"><hr></div><div *ngIf="availableOn[0].downloadUrl" [ngClass]="isMobile ? 'uk-width-1-1' : ''">
|
||||
<div class="uk-flex uk-flex-middle" [ngClass]="isMobile ? ((usedBy == 'landing') ? 'uk-padding-small uk-padding-remove-horizontal' : '') : ''">
|
||||
<span [class]="'uk-margin-xsmall-right ' + (availableOn[0].accessRightIcon == 'open_access' ? 'open-access' : 'closed-access')"
|
||||
uk-tooltip [title]="getAccessLabel(availableOn[0].accessRight)">
|
||||
|
@ -65,17 +73,20 @@ import {RouterHelper} from "../../utils/routerHelper.class";
|
|||
</ng-container>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
||||
<ng-template #availableOnList>
|
||||
<div *ngFor="let instance of availableOn let i=index" class="download-drop-item uk-flex uk-flex-top">
|
||||
<div *ngFor="let instance of availableOn let i=index" class="download-drop-item uk-flex uk-flex-top"
|
||||
[ngClass]="inModal ? 'uk-margin-small-bottom' : ''">
|
||||
<span
|
||||
[class]="'uk-margin-small-right ' + (instance.accessRightIcon == 'open_access' ? 'open-access' : 'closed-access')"
|
||||
uk-tooltip [title]="getAccessLabel(instance.accessRight)">
|
||||
<icon [name]="instance.accessRightIcon" [flex]="true"></icon>
|
||||
<icon [name]="instance.accessRightIcon" [flex]="true" [ratio]="inModal ? 0.8 : 1"></icon>
|
||||
</span>
|
||||
<div class="uk-width-expand uk-padding-small uk-padding-remove-left uk-padding-remove-vertical">
|
||||
<div class="uk-padding-small uk-padding-remove-left uk-padding-remove-vertical"
|
||||
[ngClass]="inModal ? 'uk-grid' : 'uk-width-expand'">
|
||||
<span class="uk-text-emphasis">
|
||||
<a *ngIf="instance.downloadUrl" [href]="instance.downloadUrl" target="_blank"
|
||||
class="title uk-link-text uk-text-bold custom-external uk-display-inline-block">
|
||||
|
@ -118,6 +129,7 @@ import {RouterHelper} from "../../utils/routerHelper.class";
|
|||
|
||||
export class AvailableOnComponent {
|
||||
@Input() isMobile: boolean = false;
|
||||
@Input() inModal: boolean = false;
|
||||
@Input() usedBy: "search" | "landing" = "search";
|
||||
@Input() prevPath: string = "";
|
||||
@Input() availableOn: HostedByCollectedFrom[];
|
||||
|
|
|
@ -185,16 +185,16 @@
|
|||
<!-- </div>-->
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="(result.hostedBy_collectedFrom || hasActions || result.measure?.bip.length || result.measure?.counts.length) && !isDeletedByInferenceModal"
|
||||
<div *ngIf="(result.hostedBy_collectedFrom || ((hasActions || result.measure?.bip.length || result.measure?.counts.length) && !isDeletedByInferenceModal))"
|
||||
class="uk-text-small uk-margin-top" [class.uk-border-bottom]="!isMobile">
|
||||
<div uk-grid class="uk-grid uk-grid-small uk-text-xsmall uk-flex-middle uk-margin-xsmall-bottom"
|
||||
[class.uk-flex-between]="(result.measure?.bip.length || result.measure?.counts.length) && (result.hostedBy_collectedFrom?.length || hasActions)"
|
||||
[class.uk-flex-right]="!(result.measure?.bip.length || result.measure?.counts.length) && (result.hostedBy_collectedFrom?.length || hasActions)"
|
||||
[class.uk-flex-between]="!isDeletedByInferenceModal && (result.measure?.bip.length || result.measure?.counts.length) && (result.hostedBy_collectedFrom?.length || hasActions)"
|
||||
[class.uk-flex-right]="!isDeletedByInferenceModal && !(result.measure?.bip.length || result.measure?.counts.length) && (result.hostedBy_collectedFrom?.length || hasActions)"
|
||||
[class.uk-grid-divider]="!isMobile">
|
||||
<div *ngIf="result.hostedBy_collectedFrom?.length" class="uk-width-auto uk-visible@m">
|
||||
<availableOn [availableOn]="result.hostedBy_collectedFrom"></availableOn>
|
||||
<availableOn [availableOn]="result.hostedBy_collectedFrom" [inModal]="isDeletedByInferenceModal"></availableOn>
|
||||
</div>
|
||||
<div *ngIf="hasActions && result.id" class="uk-width-expand uk-visible@m">
|
||||
<div *ngIf="!isDeletedByInferenceModal && hasActions && result.id" class="uk-width-expand uk-visible@m">
|
||||
<entity-actions [cite]="cite" [share]="share" [linking]="linking"
|
||||
[deposit]="deposit" [embed]="embed"
|
||||
[type]="result.resultType"
|
||||
|
@ -222,7 +222,7 @@
|
|||
</span>
|
||||
</entity-actions>
|
||||
</div>
|
||||
<div *ngIf="result.measure?.bip.length || result.measure?.counts.length"
|
||||
<div *ngIf="!isDeletedByInferenceModal && (result.measure?.bip.length || result.measure?.counts.length)"
|
||||
class="uk-text-xsmall uk-width-auto metrics uk-flex uk-flex-middle uk-flex-right uk-text-meta">
|
||||
<ng-container *ngIf="result.measure?.bip.length">
|
||||
<a class="uk-flex uk-flex-middle uk-link-reset">
|
||||
|
@ -275,7 +275,13 @@
|
|||
</div>
|
||||
</ng-container>
|
||||
</div>
|
||||
<div *ngIf="result.hostedBy_collectedFrom?.length || hasActions" class="uk-hidden@m">
|
||||
<div *ngIf="result.hostedBy_collectedFrom?.length || (hasActions && !isDeletedByInferenceModal)" class="uk-hidden@m">
|
||||
<ng-container *ngIf="isDeletedByInferenceModal && result.hostedBy_collectedFrom?.length">
|
||||
<availableOn [availableOn]="result.hostedBy_collectedFrom" [inModal]="isDeletedByInferenceModal"></availableOn>
|
||||
<div class="uk-nav-divider"></div>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="!isDeletedByInferenceModal">
|
||||
<a class="uk-link-reset uk-flex uk-flex-middle">
|
||||
<icon [flex]="true" name="more_vert"></icon>
|
||||
</a>
|
||||
|
@ -317,6 +323,7 @@
|
|||
</ng-container>
|
||||
</ul>
|
||||
</div>
|
||||
</ng-container>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue