1
|
<ng-template #filters_column>
|
2
|
<div *ngIf="filters.length > 0" class=" search-filters ">
|
3
|
<div *ngIf="filters.length > 0">
|
4
|
<div class="uk-grid uk-flex uk-flex-bottom">
|
5
|
<h5 class="uk-text-bold">Filters</h5>
|
6
|
<a *ngIf="countFilters()>1" (click)="clearFilters()"
|
7
|
[class]="((disableForms)?'uk-disabled uk-link-muted':'')+' portal-link ' + 'uk-width-1-2'">
|
8
|
Clear All
|
9
|
</a>
|
10
|
</div>
|
11
|
<div *ngIf="countFilters()>0" class="uk-grid uk-grid-small uk-text-small uk-margin-medium-bottom" uk-grid>
|
12
|
<ng-container *ngFor="let filter of filters " >
|
13
|
<ng-container *ngIf = "filter.countSelectedValues > 0">
|
14
|
<span *ngFor="let value of getSelectedValues(filter); let i = index; let end = last; "
|
15
|
[title]="'Remove '+value.name" (click) = "removeFilter(value, filter) " >
|
16
|
<!-- if no grid on the div above, remove it and move class 'selectedFilterLabel' on top span -->
|
17
|
<span class="selectedFilterLabel ">
|
18
|
<a [class]="((disableForms)?' uk-disabled':' ')+' uk-link-text '">
|
19
|
<span class=" clickable" aria-hidden="true">
|
20
|
<span class="uk-icon">
|
21
|
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="close" ratio="0.8"><path fill="none" stroke="#000" stroke-width="1.6" d="M16,16 L4,4"></path><path fill="none" stroke="#000" stroke-width="1.6" d="M16,4 L4,16"></path></svg>
|
22
|
</span>
|
23
|
</span>
|
24
|
<span class="uk-margin-small-left" [innerHtml]="(value.name.length > 34)?value.name.substring(0,34)+'...':value.name"></span>
|
25
|
</a>
|
26
|
</span>
|
27
|
</span>
|
28
|
</ng-container>
|
29
|
</ng-container>
|
30
|
</div>
|
31
|
</div>
|
32
|
|
33
|
<div class="uk-margin-top">
|
34
|
<search-filter *ngFor="let filter of filters " [isDisabled]="disableForms" [filter]="filter" [showResultCount]=showResultCount (change)="filterChanged($event)" (toggleModal)="toggleModal($event)"></search-filter>
|
35
|
</div>
|
36
|
</div>
|
37
|
</ng-template>
|
38
|
<ng-template #paging>
|
39
|
<div *ngIf="searchUtils.totalResults > 0" >
|
40
|
|
41
|
<div class= "paging-hr searchPaging uk-margin-small-bottom"
|
42
|
*ngIf="(results && searchUtils.totalResults > 0) || (searchUtils.status == errorCodes.LOADING)">
|
43
|
<div class="uk-panel uk-margin-small-top uk-grid uk-flex uk-flex-middle">
|
44
|
<div class="uk-width-1-1@s uk-width-1-2@m uk-text-uppercase"
|
45
|
*ngIf="results && searchUtils.totalResults > 0">
|
46
|
{{searchUtils.totalResults|number}}
|
47
|
<span class="uk-text-muted uk-text-uppercase"> {{type}}, page </span>
|
48
|
{{searchUtils.page | number}}
|
49
|
<span class="uk-text-muted uk-text-uppercase"> of </span>
|
50
|
{{(totalPages()|number)}}
|
51
|
</div>
|
52
|
<div class="float-children-right-at-medium margin-small-top-at-small uk-width-expand" *ngIf=" searchUtils.status != errorCodes.LOADING">
|
53
|
<paging-no-load [currentPage]="searchUtils.page" [totalResults]="searchUtils.totalResults" [size]="searchUtils.size" (pageChange)="goTo($event.value)"></paging-no-load>
|
54
|
</div>
|
55
|
</div>
|
56
|
</div>
|
57
|
</div>
|
58
|
</ng-template>
|
59
|
|
60
|
<div *ngIf="!includeOnlyResultsAndFilter"
|
61
|
[class]=" (!customFilter || customFilter.queryFieldName != 'communityId') ?
|
62
|
' image-front-topbar uk-section-default uk-position-relative ' :
|
63
|
(' uk-padding-remove-bottom uk-padding-remove-top ')"
|
64
|
class="image-front-topbar uk-section-default uk-position-relative"
|
65
|
uk-scrollspy="{"target":"[uk-scrollspy-class]","cls":"uk-animation-fade","delay":false}" tm-header-transparent="light">
|
66
|
<div style=" min-height: 220px; "
|
67
|
[class]="' uk-background-norepeat uk-background-cover uk-background-bottom-center uk-padding-remove-bottom uk-flex uk-flex-middle uk-background-fixed '+searchFormClass">
|
68
|
|
69
|
<div [class]="(!customFilter || customFilter.queryFieldName != 'communityId')?'uk-position-cover':''" ></div>
|
70
|
<div class="uk-width-1-1">
|
71
|
<breadcrumbs *ngIf="showBreadcrumb && !includeOnlyResultsAndFilter"
|
72
|
addClass=" uk-margin-large-left uk-margin-remove-bottom uk-margin-small-top" [breadcrumbs]="breadcrumbs"></breadcrumbs>
|
73
|
<div class="uk-position-relative">
|
74
|
|
75
|
|
76
|
<div class="uk-container ">
|
77
|
<div class="uk-width-1-1">
|
78
|
|
79
|
<!-- <search-form [isDisabled]="disableForms" [(keyword)]="searchUtils.keyword" (keywordChange)="keywordChanged($event)" [placeholderText]="formPlaceholderText"></search-form>-->
|
80
|
<form class=" uk-margin uk-margin-top ">
|
81
|
<div class="uk-grid uk-margin-small-left">
|
82
|
<div *ngIf="enableEntitySelection" class="uk-margin-small-top uk-padding-remove-left">
|
83
|
<entities-selection [simpleView]="true" [currentEntity]="entityType"
|
84
|
[properties]="properties" [onChangeNavigate]="true" [customFilter]="customFilter"
|
85
|
|
86
|
></entities-selection>
|
87
|
</div>
|
88
|
<div class=" uk-padding-remove-left uk-margin-small-top" >
|
89
|
<div class="uk-inline">
|
90
|
<a *ngIf="searchUtils.keyword.length > 0" class="uk-form-icon uk-form-icon-flip"
|
91
|
(click)="searchUtils.keyword = ''; goTo(1);"
|
92
|
uk-icon="icon: close"></a>
|
93
|
<input type="text" class="uk-input uk-width-xlarge@l uk-width-large@m uk-width-medium"
|
94
|
[placeholder]="formPlaceholderText"
|
95
|
[(ngModel)]="searchUtils.keyword"
|
96
|
name="keyword">
|
97
|
</div>
|
98
|
|
99
|
</div>
|
100
|
|
101
|
<div class="uk-padding-remove-left uk-margin-small-top">
|
102
|
|
103
|
<button (click)="goTo(1)" type="submit"
|
104
|
class="uk-button portal-button uk-text-bold uk-padding uk-padding-remove-vertical uk-margin-small-left">
|
105
|
Search
|
106
|
</button>
|
107
|
|
108
|
</div>
|
109
|
</div>
|
110
|
</form>
|
111
|
</div>
|
112
|
|
113
|
|
114
|
</div>
|
115
|
</div>
|
116
|
|
117
|
</div>
|
118
|
</div>
|
119
|
<schema2jsonld *ngIf="url" [URL]="url" type="search" [name]=pageTitle [searchAction]=false></schema2jsonld>
|
120
|
|
121
|
<div id="tm-main" class=" uk-section uk-padding-remove-top tm-middle " >
|
122
|
<div uk-grid>
|
123
|
<div class="tm-main uk-width-1-1@s uk-width-1-1@m uk-width-1-1@l uk-row-first ">
|
124
|
<breadcrumbs *ngIf="showBreadcrumb && includeOnlyResultsAndFilter"
|
125
|
addClass="uk-margin-large-left uk-margin-remove-bottom uk-margin-small-top" [breadcrumbs]="breadcrumbs"></breadcrumbs>
|
126
|
<div class="uk-container uk-container-large">
|
127
|
<helper *ngIf="pageContents && pageContents['top'] && pageContents['top'].length > 0" [texts]="pageContents['top']"></helper>
|
128
|
<div class="uk-width-2-3@m uk-width-2-3@l uk-width-1-1@s">
|
129
|
<div *ngIf="filters.length > 0" class="uk-offcanvas-content uk-hidden@m">
|
130
|
<a href="#offcanvas-usage" uk-toggle>
|
131
|
<span class="uk-icon uk-margin-small-right uk-margin-small-left">
|
132
|
<svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" data-svg="settings">
|
133
|
<ellipse fill="none" stroke="#000" cx="6.11" cy="3.55" rx="2.11" ry="2.15"></ellipse>
|
134
|
<ellipse fill="none" stroke="#000" cx="6.11" cy="15.55" rx="2.11" ry="2.15"></ellipse>
|
135
|
<circle fill="none" stroke="#000" cx="13.15" cy="9.55" r="2.15"></circle>
|
136
|
<rect x="1" y="3" width="3" height="1"></rect>
|
137
|
<rect x="10" y="3" width="8" height="1"></rect>
|
138
|
<rect x="1" y="9" width="8" height="1"></rect>
|
139
|
<rect x="15" y="9" width="3" height="1"></rect>
|
140
|
<rect x="1" y="15" width="3" height="1"></rect>
|
141
|
<rect x="10" y="15" width="8" height="1"></rect>
|
142
|
</svg>
|
143
|
</span>
|
144
|
<span>Filters <span *ngIf="countFilters()>1">({{(countFilters())}})</span></span>
|
145
|
|
146
|
</a>
|
147
|
<div id="offcanvas-usage" uk-offcanvas overlay style="z-index:10000;">
|
148
|
<div class="uk-offcanvas-bar offcanvas-white">
|
149
|
<button class="uk-offcanvas-close" type="button" uk-close></button>
|
150
|
<ng-container *ngTemplateOutlet="filters_column; context: {}"></ng-container>
|
151
|
</div>
|
152
|
</div>
|
153
|
</div>
|
154
|
</div>
|
155
|
|
156
|
<div class="uk-grid uk-width-1-1 uk-margin-top">
|
157
|
<div *ngIf="filters.length > 0" class="uk-width-1-5@m search-filters uk-visible@m ">
|
158
|
<ng-container *ngTemplateOutlet="filters_column; context: {}" class=""></ng-container>
|
159
|
</div>
|
160
|
|
161
|
<div class="uk-width-expand@m uk-width-1-1@s uk-first-column custom-dataTable-content" >
|
162
|
<div *ngIf="openaireLink && (searchUtils.totalResults > 0 || !disableForms )">
|
163
|
<a class="uk-button uk-button-text" [href]=openaireLink target="_blank">Results in OpenAIRE</a>
|
164
|
</div>
|
165
|
<div *ngIf="searchUtils.totalResults > 0" class="uk-align-center uk-margin-remove-bottom ">
|
166
|
<div class="uk-grid">
|
167
|
<div class="uk-width-expand@m uk-grid uk-grid-medium uk-margin-small-bottom">
|
168
|
<search-results-per-page class="uk-width-1-1" [(size)]="searchUtils.size" (sizeChange)="sizeChanged($event)"></search-results-per-page>
|
169
|
</div>
|
170
|
<div class="uk-flex uk-flex-middle uk-width-auto@m uk-margin-small-bottom">
|
171
|
<span *ngIf="searchViewLink" class="uk-width-expand">
|
172
|
<a uk-tooltip="title: List view" routerLinkActive="router-link-active" [class]="((disableForms
|
173
|
&& !enableSearchView)?'uk-disabled uk-link-muted':'') +'uk-link-text'"
|
174
|
[routerLink]=searchViewLink >
|
175
|
<span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="table" ratio="1"><rect x="1" y="3" width="18" height="1"></rect><rect x="1" y="7" width="18" height="1"></rect><rect x="1" y="11" width="18" height="1"></rect><rect x="1" y="15" width="18" height="1"></rect></svg></span>
|
176
|
List view
|
177
|
</a>
|
178
|
</span>
|
179
|
</div>
|
180
|
</div>
|
181
|
<ng-container *ngTemplateOutlet="paging; context: {}"></ng-container>
|
182
|
</div>
|
183
|
|
184
|
<!-- <div *ngIf="searchViewLink" class="uk-width-1-1@s uk-hidden@m">
|
185
|
<p>
|
186
|
<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>
|
187
|
|
188
|
<a routerLinkActive="router-link-active" [class]="(disableForms && !enableSearchView)?'uk-disabled uk-link-muted':''" [routerLink]=searchViewLink >
|
189
|
<span class="uk-icon"><svg width="20" height="20" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" icon="table" ratio="1"><rect x="1" y="3" width="18" height="1"></rect><rect x="1" y="7" width="18" height="1"></rect><rect x="1" y="11" width="18" height="1"></rect><rect x="1" y="15" width="18" height="1"></rect></svg></span>
|
190
|
</a>
|
191
|
</p>
|
192
|
</div> -->
|
193
|
|
194
|
<div *ngIf="searchUtils.totalResults <= 0" class="errors-in-searchTableView">
|
195
|
<errorMessages [status]="[searchUtils.status]" [type]="'results'"></errorMessages>
|
196
|
</div>
|
197
|
|
198
|
<div *ngIf="searchUtils.status == errorCodes.LOADING || searchUtils.status == errorCodes.DONE" class="uk-overflow-auto">
|
199
|
<!-- #mf="mfDataTable" [mfRowsOnPage]="rowsOnPage"
|
200
|
[mfData]="results | contentProvidersDatatable : [searchUtils, filters, triggerPipe, cd]"
|
201
|
|
202
|
-->
|
203
|
<table datatable class="uk-table uk-table-striped divider-table" [dtOptions]="dtOptions" id="dpTable" [dtTrigger]="dtTrigger" dtInstance="dtInstanceCallback">
|
204
|
<thead >
|
205
|
<tr>
|
206
|
<th *ngFor="let column of columnNames" class="uk-text-center">{{column}}</th>
|
207
|
</tr>
|
208
|
</thead>
|
209
|
<tbody>
|
210
|
<tr class="uk-table-middle" *ngFor="let result of results">
|
211
|
<td *ngIf="result.hasOwnProperty('title')" [class]="'uk-text-center uk-width-1-'+columnNames.length">
|
212
|
<a [queryParams]="{datasourceId: result.id}" routerLinkActive="router-link-active" routerLink="/search/dataprovider">
|
213
|
<span *ngIf="result.title.name"
|
214
|
[innerHTML]="result.title.name">
|
215
|
</span>
|
216
|
<span *ngIf="!result.title.name">
|
217
|
[no title available]
|
218
|
</span>
|
219
|
</a>
|
220
|
</td>
|
221
|
<td *ngIf="result.hasOwnProperty('type')" [class]="'uk-text-center uk-width-1-'+columnNames.length">
|
222
|
<span *ngIf="result.type">{{result.type}}</span>
|
223
|
<span *ngIf="!result.type">-</span>
|
224
|
</td>
|
225
|
<td *ngIf="result.hasOwnProperty('countries')" [class]="'uk-text-center uk-width-1-'+columnNames.length">
|
226
|
<span *ngFor="let country of result['countries'].slice(0,5) let i = index">{{country}}{{(i < ( result['countries'].slice(0,5).length-1))?", ":""}}{{(i == result['countries'].slice(0,5).length-1 && result['countries'].length > 5)?"...":""}}</span>
|
227
|
<span *ngIf="result.countries.length == 0">-</span>
|
228
|
</td>
|
229
|
<td *ngIf="result.hasOwnProperty('organizations')" [class]="'uk-text-center uk-width-1-'+columnNames.length">
|
230
|
<span *ngFor="let org of result['organizations'].slice(0,5) let i = index">
|
231
|
<a *ngIf="org.id" [queryParams]="{organizationId: org.id}" routerLinkActive="router-link-active" routerLink="/search/organization">{{org.name}}</a><span *ngIf="!org.id">{{org.name}}</span>{{(i < ( result['organizations'].slice(0,5).length-1))?", ":""}}{{(i == result['organizations'].slice(0,5).length-1 && result['organizations'].length > 5)?"...":""}}
|
232
|
</span>
|
233
|
<span *ngIf="result.organizations.length == 0">-</span>
|
234
|
</td>
|
235
|
<td *ngIf="result.hasOwnProperty('compatibility')" [class]="'uk-text-center uk-width-1-'+columnNames.length">
|
236
|
<span *ngIf="result.compatibility">{{result.compatibility}}</span>
|
237
|
<span *ngIf="!result.compatibility">-</span>
|
238
|
</td>
|
239
|
|
240
|
<!--Community Projects-->
|
241
|
<td *ngIf="result.hasOwnProperty('acronym') && result.hasOwnProperty('name')" [class]="'uk-text-center uk-width-1-'+columnNames.length">
|
242
|
<a [queryParams]="(result.openaireId) ? {projectId: result.openaireId} : {grantId: encode(result.grantId), funder: encode(result.funder)}"
|
243
|
routerLinkActive="router-link-active" routerLink="/search/project">
|
244
|
<span *ngIf="result.name">{{result.name}}</span>
|
245
|
<span *ngIf="result.name && result.acronym">(</span
|
246
|
><span *ngIf="result.acronym">{{result.acronym}}</span
|
247
|
><span *ngIf="result.name && result.acronym">)</span>
|
248
|
<span *ngIf="!result.name && !result.acronym">[no title available]</span>
|
249
|
</a>
|
250
|
</td>
|
251
|
<td *ngIf="result.hasOwnProperty('grantId')" [class]="'uk-text-center uk-width-1-'+columnNames.length">
|
252
|
<span *ngIf="result.grantId">{{result.grantId}}</span>
|
253
|
<span *ngIf="!result.grantId">-</span>
|
254
|
</td>
|
255
|
<td *ngIf="result.hasOwnProperty('funder')" [class]="'uk-text-center uk-width-1-'+columnNames.length">
|
256
|
<span *ngIf="result.funder">{{result.funder}}</span>
|
257
|
<span *ngIf="!result.funder">-</span>
|
258
|
</td>
|
259
|
|
260
|
<!--Community Content Providers-->
|
261
|
<td *ngIf="!result.hasOwnProperty('acronym') && result.hasOwnProperty('name')" [class]="'uk-text-center uk-width-1-'+columnNames.length">
|
262
|
<a [queryParams]="{datasourceId: result.openaireId}" routerLinkActive="router-link-active" routerLink="/search/dataprovider">
|
263
|
<span *ngIf="result.name">{{result.name}}</span>
|
264
|
<span *ngIf="!result.name">[no name available]</span>
|
265
|
</a>
|
266
|
</td>
|
267
|
<td *ngIf="result.hasOwnProperty('officialname')" [class]="'uk-text-center uk-width-1-'+columnNames.length">
|
268
|
<span *ngIf="result.officialname">{{result.officialname}}</span>
|
269
|
<span *ngIf="!result.officialname">-</span>
|
270
|
</td>
|
271
|
</tr>
|
272
|
</tbody>
|
273
|
<!-- <thead *ngIf="searchUtils.totalResults > 0">
|
274
|
<tr><td colspan="5" class="uk-padding-remove-horizontal">
|
275
|
<span class="uk-h6">
|
276
|
{{searchUtils.totalResults}} content providers, page {{searchUtils.page}} of {{(totalPages())}}
|
277
|
</span>
|
278
|
<paging-no-load class="uk-float-right" [currentPage]="searchUtils.page" [totalResults]="searchUtils.totalResults" [size]="rowsOnPage" (pageChange)="goTo($event.value, false)"></paging-no-load>
|
279
|
</td></tr>
|
280
|
</thead> -->
|
281
|
</table>
|
282
|
</div>
|
283
|
|
284
|
<div *ngIf="searchUtils.totalResults > 0" class="uk-align-center uk-margin-remove-bottom">
|
285
|
<ng-container *ngTemplateOutlet="paging; context: {}"></ng-container>
|
286
|
</div>
|
287
|
<a *ngIf="properties.showLastIndexInformationLink" class="last_index_info uk-button-text uk-button"
|
288
|
[href]="properties.lastIndexInformationLink" target="_blank">
|
289
|
Last index information
|
290
|
</a>
|
291
|
</div>
|
292
|
</div>
|
293
|
</div>
|
294
|
<modal-search-filter [filter]="currentFilter" [showResultCount]=showResultCount (modalChange)="filterChanged($event)"></modal-search-filter>
|
295
|
</div>
|
296
|
</div>
|
297
|
</div>
|