Show CSV button always in search and advanced search pages. In case of >csvLimit results it is disabled (cursor: not-allowed) with appropriate tooltip.
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@53225 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
e14e81269d
commit
c946e668f1
|
@ -31,7 +31,7 @@
|
|||
<search-paging [type]="type" [loadPaging]="loadPaging" [oldTotalResults]="oldTotalResults" [(searchUtils)] = "searchUtils" [(results)] = "results" [(baseUrl)] = "searchUtils.baseUrl" [(parameterNames)] = "parameterNames" [(parameterValues)] = "parameterValues" ></search-paging>
|
||||
</div>
|
||||
|
||||
<search-download *ngIf="searchUtils.totalResults <= csvLimit" class="uk-width-1-1@s uk-hidden@m" [type]="csvPath" [csvParams]="csvParams" [totalResults]="searchUtils.totalResults" ></search-download>
|
||||
<search-download class="uk-width-1-1@s uk-hidden@m" [type]="csvPath" [csvParams]="csvParams" [totalResults]="searchUtils.totalResults" ></search-download>
|
||||
|
||||
<div *ngIf="(searchUtils.page <= pagingLimit)" class="uk-margin-top">
|
||||
<search-result [results]="results"
|
||||
|
@ -52,12 +52,12 @@
|
|||
<helper class="uk-hidden@m" position="left" styleName="uk-width-1-1@s"></helper>
|
||||
<helper class="uk-hidden@m" position="right" styleName="uk-width-1-1@s"></helper>
|
||||
</div>
|
||||
<div *ngIf="searchUtils.totalResults <= csvLimit" class="uk-visible@m helper-left-right">
|
||||
<div class="uk-visible@m helper-left-right">
|
||||
<helper position="right" before="true"></helper>
|
||||
<search-download [type]="csvPath" [csvParams]="csvParams" [totalResults]="searchUtils.totalResults" ></search-download>
|
||||
<helper position="right" before="false"></helper>
|
||||
</div>
|
||||
<helper *ngIf="searchUtils.totalResults > csvLimit" class="helper-left-right uk-visible@m" position="right"></helper>
|
||||
<!-- <helper *ngIf="searchUtils.totalResults > csvLimit" class="helper-left-right uk-visible@m" position="right"></helper> -->
|
||||
</div>
|
||||
|
||||
<div class="uk-width-1-1">
|
||||
|
|
|
@ -11,13 +11,17 @@ import{EnvProperties} from '../../utils/properties/env-properties';
|
|||
selector: 'search-download',
|
||||
template: `
|
||||
<span class="uk-margin-large-right" *ngIf="totalResults > 0 && totalResults <= csvLimit">
|
||||
<!--span class="clickable" (click)="downloadfile(downloadURLAPI+type+'?format=csv&page=0&size='+totalResults+csvParams,type+'-report-'+totalResults)"-->
|
||||
<span class="clickable" (click)="downloadfile(downloadURLAPI+'?type='+type+'&format=csv'+csvParams,type+'-report-'+totalResults)">
|
||||
<span aria-hidden="true" class="glyphicon glyphicon-download"></span>
|
||||
<span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="download" ratio="1"><polyline fill="none" stroke="#000" points="14,10 9.5,14.5 5,10"></polyline><rect x="3" y="17" width="13" height="1"></rect><line fill="none" stroke="#000" x1="9.5" y1="13.91" x2="9.5" y2="3"></line></svg></span> (CSV)
|
||||
</span>
|
||||
</span>
|
||||
<!--modal-alert></modal-alert-->
|
||||
<span class="uk-margin-large-right cursor-not-allowed" *ngIf="totalResults > csvLimit"
|
||||
[attr.uk-tooltip]="'pos:right'"
|
||||
[title]="'Download up to '+csvLimit+' results'">
|
||||
<span aria-hidden="true" class="glyphicon glyphicon-download"></span>
|
||||
<span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="download" ratio="1"><polyline fill="none" stroke="#000" points="14,10 9.5,14.5 5,10"></polyline><rect x="3" y="17" width="13" height="1"></rect><line fill="none" stroke="#000" x1="9.5" y1="13.91" x2="9.5" y2="3"></line></svg></span> (CSV)
|
||||
</span>
|
||||
<modal-loading></modal-loading>
|
||||
<modal-alert #AlertModalCsvError></modal-alert>
|
||||
`
|
||||
|
|
|
@ -77,8 +77,8 @@
|
|||
<div class="uk-align-center uk-margin-remove-bottom">
|
||||
<search-paging [type]="type" [loadPaging]="loadPaging" [oldTotalResults]="oldTotalResults" [(searchUtils)] = "searchUtils" [(results)] = "results" [(baseUrl)] = "baseUrl" [(parameterNames)] = "parameterNames" [(parameterValues)] = "parameterValues" ></search-paging>
|
||||
</div>
|
||||
|
||||
<div *ngIf="tableViewLink || searchUtils.totalResults <= csvLimit" class="uk-width-1-1@s uk-hidden@m">
|
||||
<!-- *ngIf="tableViewLink || searchUtils.totalResults <= csvLimit" -->
|
||||
<div class="uk-width-1-1@s uk-hidden@m">
|
||||
<span *ngIf="tableViewLink" class="uk-margin-medium-right">
|
||||
<a routerLinkActive="router-link-active" [class]="(disableForms)?'uk-disabled uk-link-muted':''" [routerLink]=tableViewLink >
|
||||
<span class="uk-margin-small-right uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" ratio="1"><rect x="2" y="2" width="3" height="3"></rect><rect x="8" y="2" width="3" height="3"></rect><rect x="14" y="2" width="3" height="3"></rect><rect x="2" y="8" width="3" height="3"></rect><rect x="8" y="8" width="3" height="3"></rect><rect x="14" y="8" width="3" height="3"></rect><rect x="2" y="14" width="3" height="3"></rect><rect x="8" y="14" width="3" height="3"></rect><rect x="14" y="14" width="3" height="3"></rect></svg></span>
|
||||
|
@ -109,8 +109,8 @@
|
|||
<helper class="uk-hidden@m" position="left" styleName="uk-width-1-1@s"></helper>
|
||||
<helper class="uk-hidden@m" position="right" styleName="uk-width-1-1@s"></helper>
|
||||
</div>
|
||||
|
||||
<div *ngIf="tableViewLink || searchUtils.totalResults <= csvLimit" class="helper-left-right uk-visible@m">
|
||||
<!-- *ngIf="tableViewLink || searchUtils.totalResults <= csvLimit" -->
|
||||
<div class="helper-left-right uk-visible@m">
|
||||
<helper position="right" before="true"></helper>
|
||||
<div>
|
||||
<span *ngIf="tableViewLink" class="uk-margin-medium-right">
|
||||
|
@ -124,7 +124,7 @@
|
|||
</div>
|
||||
<helper position="right" before="false"></helper>
|
||||
</div>
|
||||
<helper *ngIf="!tableViewLink && searchUtils.totalResults > csvLimit" class="helper-left-right uk-visible@m" position="right"></helper>
|
||||
<!-- <helper *ngIf="!tableViewLink && searchUtils.totalResults > csvLimit" class="helper-left-right uk-visible@m" position="right"></helper> -->
|
||||
</div>
|
||||
<!-- <div [class]="(showRefine)? 'uk-width-3-5@m uk-width-3-5@l uk-width-1-1@s uk-align-center uk-margin-remove-bottom' : 'uk-width-1-1'">
|
||||
<search-paging [loadPaging]="loadPaging" [type]="type" [oldTotalResults]="oldTotalResults" [(searchUtils)] = "searchUtils" [(results)] = "results" [(baseUrl)] = "baseUrl" [(parameterNames)] = "parameterNames" [(parameterValues)] = "parameterValues" ></search-paging>
|
||||
|
|
Loading…
Reference in New Issue