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

View File

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