[Trunk | Library]: organization.component.html & project.component.html:

For download reports sections: Show all types (disabled if no results with tooltip "No report available"),  or show message "No reports available" if no results.


git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@58357 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
konstantina.galouni 2020-03-30 19:25:16 +00:00
parent 59753e1eeb
commit 519998e887
2 changed files with 40 additions and 17 deletions

View File

@ -132,22 +132,28 @@
<div class="sideInfoTitle uk-margin-small-bottom uk-margin-small-top">Share - Bookmark</div>
<addThis></addThis>
</div>
<div *ngIf="total.results > 0" class="uk-margin-top">
<div class="uk-margin-top">
<div class="sideInfoTitle uk-margin-small-bottom uk-margin-small-top">
Download report - based on the affiliation information
</div>
<div class="app-box uk-padding-small uk-margin-small-left uk-margin-small-right">
<div class="uk-animation-slide-top-small">
<ul class="uk-padding-remove-bottom uk-list">
<div class="uk-animation-slide-top-small uk-padding-small uk-padding-remove-vertical">
<ul *ngIf="total.results > 0" class="uk-margin-remove-bottom uk-list">
<ng-container *ngFor="let contentType of contentTypes">
<li *ngIf="total[contentType[0]] > 0">
<a class="clickable" (click)="downloadFile(getCSVAffiliated(contentType[0]), contentType[0] + '-report')">
<li [attr.uk-tooltip]="total[contentType[0]] > 0 ? 'cls: uk-invisible' : 'cls: uk-active'"
title="No report available">
<a [class]="total[contentType[0]] > 0 ? 'clickable' : 'uk-disabled uk-link-muted'"
(click)="downloadFile(getCSVAffiliated(contentType[0]), contentType[0] + '-report')">
<span uk-icon="download"></span>
<span class="uk-text-capitalize uk-margin-small-left">{{contentType[1]}} (CSV)</span>
</a>
</li>
</ng-container>
</ul>
<div *ngIf="total.results == 0"
class="uk-text-muted">
No reports available
</div>
</div>
</div>
</div>
@ -170,7 +176,7 @@
</div>
<div *ngIf="funder && funder != ''"
class="uk-animation-slide-top-small uk-margin-top">
<ul class="uk-padding-remove-bottom uk-list">
<ul class="uk-margin-remove-bottom uk-list">
<li>
<a class="clickable"
(click)="downloadFile(getFunderProjects(), funder.name + '-projects-report')">

View File

@ -576,12 +576,7 @@
</div>
</div>
</div>
<div *ngIf="projectInfo.funding &&
(fetchPublications.searchUtils.totalResults > 0 ||
fetchDatasets.searchUtils.totalResults > 0 ||
fetchSoftware.searchUtils.totalResults > 0 ||
fetchOrps.searchUtils.totalResults > 0)"
class="uk-margin-top">
<div class="uk-margin-top">
<div class="sideInfoTitle uk-margin-small-bottom uk-margin-small-top">Download report</div>
<div class="app-box uk-padding-small uk-margin-small-left uk-margin-small-right">
<!-- <select class="select" id="download_report" name="download_report"-->
@ -594,26 +589,39 @@
<!-- <option value="other">Other research products</option>-->
<!-- </select>-->
<div class="uk-padding-small uk-padding-remove-vertical">
<mat-select [(value)]="download_research_results_type"
<mat-select *ngIf="projectInfo.funding &&
(fetchPublications.searchUtils.totalResults > 0 ||
fetchDatasets.searchUtils.totalResults > 0 ||
fetchSoftware.searchUtils.totalResults > 0 ||
fetchOrps.searchUtils.totalResults > 0)"
[(value)]="download_research_results_type"
[disableOptionCentering]="true"
panelClass="entitiesSelectionPanel"
class="matSelection">
<mat-option value="">Select content type</mat-option>
<mat-option value="results">All research outcomes</mat-option>
<mat-option value="publications"
[disabled]="fetchPublications.searchUtils.totalResults == 0 || fetchPublications.searchUtils.status != errorCodes.DONE">
[disabled]="fetchPublications.searchUtils.totalResults == 0 || fetchPublications.searchUtils.status != errorCodes.DONE"
[attr.uk-tooltip]="(fetchPublications.searchUtils.totalResults == 0 || fetchPublications.searchUtils.status != errorCodes.DONE) ? 'cls: uk-active' : 'cls: uk-invisible'"
title="No report available">
Publications
</mat-option>
<mat-option value="datasets"
[disabled]="fetchDatasets.searchUtils.totalResults == 0 || fetchDatasets.searchUtils.status != errorCodes.DONE">
[disabled]="fetchDatasets.searchUtils.totalResults == 0 || fetchDatasets.searchUtils.status != errorCodes.DONE"
[attr.uk-tooltip]="(fetchDatasets.searchUtils.totalResults == 0 || fetchDatasets.searchUtils.status != errorCodes.DONE) ? 'cls: uk-active' : 'cls: uk-invisible'"
title="No report available">
Research data
</mat-option>
<mat-option value="software"
[disabled]="fetchSoftware.searchUtils.totalResults == 0 || fetchSoftware.searchUtils.status != errorCodes.DONE">
[disabled]="fetchSoftware.searchUtils.totalResults == 0 || fetchSoftware.searchUtils.status != errorCodes.DONE"
[attr.uk-tooltip]="(fetchSoftware.searchUtils.totalResults == 0 || fetchSoftware.searchUtils.status != errorCodes.DONE) ? 'cls: uk-active' : 'cls: uk-invisible'"
title="No report available">
Software
</mat-option>
<mat-option value="other"
[disabled]="fetchOrps.searchUtils.totalResults == 0 || fetchOrps.searchUtils.status != errorCodes.DONE">
[disabled]="fetchOrps.searchUtils.totalResults == 0 || fetchOrps.searchUtils.status != errorCodes.DONE"
[attr.uk-tooltip]="(fetchOrps.searchUtils.totalResults == 0 || fetchOrps.searchUtils.status != errorCodes.DONE) ? 'cls: uk-active' : 'cls: uk-invisible'"
title="No report available">
Other research products
</mat-option>
</mat-select>
@ -624,6 +632,15 @@
csvParams: getCsvParams(download_research_results_type) }">
</ng-container>
</div>
<div *ngIf="!projectInfo.funding ||
(fetchPublications.searchUtils.totalResults == 0 &&
fetchDatasets.searchUtils.totalResults == 0 &&
fetchSoftware.searchUtils.totalResults == 0 &&
fetchOrps.searchUtils.totalResults == 0)"
class="uk-text-muted">
No reports available
</div>
</div>
</div>
</div>