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
|
<h6 class="uk-text-bold">Filters</h6>
|
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
|
<span class="uk-text-bold">{{searchUtils.totalResults|number}}</span>
|
47
|
<span class="uk-text-muted uk-text-uppercase"> {{type}}, page </span>
|
48
|
<span class="uk-text-bold">{{searchUtils.page | number}}</span>
|
49
|
<span class="uk-text-muted uk-text-uppercase"> of </span>
|
50
|
<span class="uk-text-bold">{{(totalPages()|number)}}</span>
|
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
|
class="uk-alert uk-text-center uk-margin-small-top ">
|
164
|
<span *ngIf="customFilter">The following results are related to <span class="portal-color"
|
165
|
>{{customFilter.valueName}}</span>.</span>
|
166
|
Are you interested to view more results? Visit
|
167
|
<a
|
168
|
class="uk-margin-top uk-link"
|
169
|
[href]="openaireLink"
|
170
|
target="_blank"> OpenAIRE - Explore</a>.
|
171
|
</div>
|
172
|
<div *ngIf="searchUtils.totalResults > 0" class="uk-align-center uk-margin-remove-bottom ">
|
173
|
<div class="uk-grid">
|
174
|
<div class="uk-width-expand@m uk-grid uk-grid-medium uk-margin-small-bottom">
|
175
|
<search-results-per-page class="uk-width-1-1" [(size)]="searchUtils.size" (sizeChange)="sizeChanged($event)"></search-results-per-page>
|
176
|
</div>
|
177
|
<div class="uk-flex uk-flex-middle uk-width-auto@m uk-margin-small-bottom">
|
178
|
<span *ngIf="searchViewLink" class="uk-width-expand">
|
179
|
<a uk-tooltip="title: List view" routerLinkActive="router-link-active" [class]="((disableForms
|
180
|
&& !enableSearchView)?'uk-disabled uk-link-muted':'') +'uk-link-text'"
|
181
|
[routerLink]=searchViewLink >
|
182
|
<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>
|
183
|
List view
|
184
|
</a>
|
185
|
</span>
|
186
|
</div>
|
187
|
</div>
|
188
|
<ng-container *ngTemplateOutlet="paging; context: {}"></ng-container>
|
189
|
</div>
|
190
|
|
191
|
<!-- <div *ngIf="searchViewLink" class="uk-width-1-1@s uk-hidden@m">
|
192
|
<p>
|
193
|
<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>
|
194
|
|
195
|
<a routerLinkActive="router-link-active" [class]="(disableForms && !enableSearchView)?'uk-disabled uk-link-muted':''" [routerLink]=searchViewLink >
|
196
|
<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>
|
197
|
</a>
|
198
|
</p>
|
199
|
</div> -->
|
200
|
|
201
|
<div *ngIf="searchUtils.totalResults <= 0" class="errors-in-searchTableView">
|
202
|
<errorMessages [status]="[searchUtils.status]" [type]="'results'"></errorMessages>
|
203
|
</div>
|
204
|
|
205
|
<div *ngIf="searchUtils.status == errorCodes.LOADING || searchUtils.status == errorCodes.DONE" class="uk-overflow-auto">
|
206
|
<!-- #mf="mfDataTable" [mfRowsOnPage]="rowsOnPage"
|
207
|
[mfData]="results | contentProvidersDatatable : [searchUtils, filters, triggerPipe, cd]"
|
208
|
|
209
|
-->
|
210
|
<table datatable class="uk-table uk-table-striped divider-table" [dtOptions]="dtOptions" id="dpTable" [dtTrigger]="dtTrigger" dtInstance="dtInstanceCallback">
|
211
|
<thead >
|
212
|
<tr>
|
213
|
<th *ngFor="let column of columnNames" class="uk-text-center">{{column}}</th>
|
214
|
</tr>
|
215
|
</thead>
|
216
|
<tbody>
|
217
|
<tr class="uk-table-middle" *ngFor="let result of results">
|
218
|
<td *ngIf="result.hasOwnProperty('title')" [class]="'uk-text-center uk-width-1-'+columnNames.length">
|
219
|
<a [queryParams]="{datasourceId: result.id}" routerLinkActive="router-link-active" routerLink="/search/dataprovider">
|
220
|
<span *ngIf="result.title.name"
|
221
|
[innerHTML]="result.title.name">
|
222
|
</span>
|
223
|
<span *ngIf="!result.title.name">
|
224
|
[no title available]
|
225
|
</span>
|
226
|
</a>
|
227
|
</td>
|
228
|
<td *ngIf="result.hasOwnProperty('type')" [class]="'uk-text-center uk-width-1-'+columnNames.length">
|
229
|
<span *ngIf="result.type">{{result.type}}</span>
|
230
|
<span *ngIf="!result.type">-</span>
|
231
|
</td>
|
232
|
<td *ngIf="result.hasOwnProperty('countries')" [class]="'uk-text-center uk-width-1-'+columnNames.length">
|
233
|
<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>
|
234
|
<span *ngIf="result.countries.length == 0">-</span>
|
235
|
</td>
|
236
|
<td *ngIf="result.hasOwnProperty('organizations')" [class]="'uk-text-center uk-width-1-'+columnNames.length">
|
237
|
<span *ngFor="let org of result['organizations'].slice(0,5) let i = index">
|
238
|
<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)?"...":""}}
|
239
|
</span>
|
240
|
<span *ngIf="result.organizations.length == 0">-</span>
|
241
|
</td>
|
242
|
<td *ngIf="result.hasOwnProperty('compatibility')" [class]="'uk-text-center uk-width-1-'+columnNames.length">
|
243
|
<span *ngIf="result.compatibility">{{result.compatibility}}</span>
|
244
|
<span *ngIf="!result.compatibility">-</span>
|
245
|
</td>
|
246
|
|
247
|
<!--Community Projects-->
|
248
|
<td *ngIf="result.hasOwnProperty('acronym') && result.hasOwnProperty('name')" [class]="'uk-text-center uk-width-1-'+columnNames.length">
|
249
|
<a [queryParams]="(result.openaireId) ? {projectId: result.openaireId} : {grantId: encode(result.grantId), funder: encode(result.funder)}"
|
250
|
routerLinkActive="router-link-active" routerLink="/search/project">
|
251
|
<span *ngIf="result.name">{{result.name}}</span>
|
252
|
<span *ngIf="result.name && result.acronym">(</span
|
253
|
><span *ngIf="result.acronym">{{result.acronym}}</span
|
254
|
><span *ngIf="result.name && result.acronym">)</span>
|
255
|
<span *ngIf="!result.name && !result.acronym">[no title available]</span>
|
256
|
</a>
|
257
|
</td>
|
258
|
<td *ngIf="result.hasOwnProperty('grantId')" [class]="'uk-text-center uk-width-1-'+columnNames.length">
|
259
|
<span *ngIf="result.grantId">{{result.grantId}}</span>
|
260
|
<span *ngIf="!result.grantId">-</span>
|
261
|
</td>
|
262
|
<td *ngIf="result.hasOwnProperty('funder')" [class]="'uk-text-center uk-width-1-'+columnNames.length">
|
263
|
<span *ngIf="result.funder">{{result.funder}}</span>
|
264
|
<span *ngIf="!result.funder">-</span>
|
265
|
</td>
|
266
|
|
267
|
<!--Community Content Providers-->
|
268
|
<td *ngIf="!result.hasOwnProperty('acronym') && result.hasOwnProperty('name')" [class]="'uk-text-center uk-width-1-'+columnNames.length">
|
269
|
<a [queryParams]="{datasourceId: result.openaireId}" routerLinkActive="router-link-active" routerLink="/search/dataprovider">
|
270
|
<span *ngIf="result.name">{{result.name}}</span>
|
271
|
<span *ngIf="!result.name">[no name available]</span>
|
272
|
</a>
|
273
|
</td>
|
274
|
<td *ngIf="result.hasOwnProperty('officialname')" [class]="'uk-text-center uk-width-1-'+columnNames.length">
|
275
|
<span *ngIf="result.officialname">{{result.officialname}}</span>
|
276
|
<span *ngIf="!result.officialname">-</span>
|
277
|
</td>
|
278
|
</tr>
|
279
|
</tbody>
|
280
|
<!-- <thead *ngIf="searchUtils.totalResults > 0">
|
281
|
<tr><td colspan="5" class="uk-padding-remove-horizontal">
|
282
|
<span class="uk-h6">
|
283
|
{{searchUtils.totalResults}} content providers, page {{searchUtils.page}} of {{(totalPages())}}
|
284
|
</span>
|
285
|
<paging-no-load class="uk-float-right" [currentPage]="searchUtils.page" [totalResults]="searchUtils.totalResults" [size]="rowsOnPage" (pageChange)="goTo($event.value, false)"></paging-no-load>
|
286
|
</td></tr>
|
287
|
</thead> -->
|
288
|
</table>
|
289
|
</div>
|
290
|
|
291
|
<div *ngIf="searchUtils.totalResults > 0" class="uk-align-center uk-margin-remove-bottom">
|
292
|
<ng-container *ngTemplateOutlet="paging; context: {}"></ng-container>
|
293
|
</div>
|
294
|
<!--<a *ngIf="properties.showLastIndexInformationLink" class="last_index_info uk-button-text uk-button"
|
295
|
[href]="properties.lastIndexInformationLink" target="_blank">
|
296
|
Last index information
|
297
|
</a>-->
|
298
|
</div>
|
299
|
</div>
|
300
|
</div>
|
301
|
<modal-search-filter [filter]="currentFilter" [showResultCount]=showResultCount (modalChange)="filterChanged($event)"></modal-search-filter>
|
302
|
</div>
|
303
|
</div>
|
304
|
</div>
|