[Explore | develop]: funders.component.html: [Bug fix] Updated height-match cases and added uk-grid-match to fix and align heights of cards and their contents | funders.component.ts: Added check to not show when there is just one project for a funder (it is the custom unidentified project added for the data).
This commit is contained in:
parent
185344d878
commit
20ac495013
|
@ -74,7 +74,7 @@
|
|||
</div>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="!showLoading && funders?.length">
|
||||
<div class="uk-container uk-container-large" uk-height-match="target: .percentage;">
|
||||
<div class="uk-container uk-container-large">
|
||||
<div id="target" class="uk-section uk-padding-remove-top uk-margin-top" uk-height-match="target: .alias;">
|
||||
<div>
|
||||
<div *ngIf="funders" class="uk-padding-small uk-padding-remove-vertical uk-margin-medium-bottom uk-flex uk-flex-wrap uk-flex-middle uk-flex-between">
|
||||
|
@ -120,14 +120,15 @@
|
|||
<div *ngIf="!displayedFunders || displayedFunders?.length == 0" class="uk-text-center uk-margin-large-top">
|
||||
No funders available
|
||||
</div>
|
||||
<div class="uk-grid uk-padding-small" [ngClass]="gridView ? 'uk-child-width-1-2@m uk-child-width-1-3@l' : 'uk-child-width-1-1'"
|
||||
<div class="uk-grid uk-grid-match uk-padding-small" [ngClass]="gridView ? 'uk-child-width-1-2@m uk-child-width-1-3@l' : 'uk-child-width-1-1'"
|
||||
uk-grid uk-height-match="target: .info;">
|
||||
<div *ngFor="let funder of displayedFunders.slice((currentPage-1)*pageSize, currentPage*pageSize)">
|
||||
<!-- funder's card for GRID view -->
|
||||
<ng-container *ngIf="gridView || isMobile; else elseBlock">
|
||||
<div class="uk-card uk-card-default uk-card-hover uk-card-body funder-grid">
|
||||
<div class="uk-card uk-card-default uk-card-hover funder-grid">
|
||||
<!-- OA % -->
|
||||
<div class="percentage uk-flex uk-flex-right uk-margin-bottom">
|
||||
<!-- <div class="percentage uk-flex uk-flex-right uk-margin-bottom">-->
|
||||
<div class="uk-position-top-right uk-padding-small">
|
||||
<div *ngIf="funder.openAccessResearchProducts && funder.researchProducts" class="uk-text-center">
|
||||
<div class="uk-flex uk-flex-middle uk-flex-center">
|
||||
<span class="uk-margin-xsmall-right open-access">
|
||||
|
@ -138,8 +139,9 @@
|
|||
<span class="uk-h6 uk-text-small">Open Access</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="uk-card-body">
|
||||
<!-- funder logo -->
|
||||
<div class="uk-card-media-top uk-padding-large uk-padding-remove-vertical uk-flex uk-flex-center uk-flex-middle uk-height-xsmall">
|
||||
<div class="uk-card-media-top uk-margin-medium-top uk-padding-large uk-padding-remove-vertical uk-flex uk-flex-center uk-flex-middle uk-height-xsmall">
|
||||
<img *ngIf="funder.logoUrl; else elseBlock" [src]="funder | logoUrl" [alt]="funder.name + ' logo'" class="uk-height-max-xsmall uk-blend-multiply">
|
||||
<ng-template #elseBlock>
|
||||
<img src="assets/common-assets/placeholder.png" alt="OpenAIRE placeholder logo" class="uk-height-max-xsmall uk-blend-multiply">
|
||||
|
@ -159,7 +161,7 @@
|
|||
</div>
|
||||
<div class="info uk-margin-medium-top">
|
||||
<!-- Monitor dashboard -->
|
||||
<div>
|
||||
<div class="monitor-dashboard">
|
||||
<!-- PUBLIC status -->
|
||||
<a *ngIf="funder.monitorDashboard && funder.monitorDashboardStatus != 'PRIVATE' && funder.monitorDashboardStatus != 'RESTRICTED'"
|
||||
class="uk-display-inline-block uk-text-uppercase uk-button uk-button-text"
|
||||
|
@ -201,6 +203,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ng-container>
|
||||
<!-- funder's card for LIST view -->
|
||||
<ng-template #elseBlock>
|
||||
|
|
|
@ -164,7 +164,8 @@ export class FundersComponent implements OnInit {
|
|||
// 3rd call
|
||||
let queriedFunders3 = data[2][1][0].values;
|
||||
queriedFunders3.forEach(queriedFunder => {
|
||||
if(this.fundersMap.has(queriedFunder.id)) {
|
||||
if(+queriedFunder.number > 1) {
|
||||
if (this.fundersMap.has(queriedFunder.id)) {
|
||||
this.fundersMap.get(queriedFunder.id).projects = +queriedFunder.number;
|
||||
} else {
|
||||
this.fundersMap.set(queriedFunder.id, {
|
||||
|
@ -180,6 +181,7 @@ export class FundersComponent implements OnInit {
|
|||
"logoUrl": ''
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
// 4th call
|
||||
|
|
Loading…
Reference in New Issue