1
|
<ng-template #selected_filters_pills let-margin="margin">
|
2
|
<!-- <div class="uk-grid uk-grid-small uk-text-small" uk-grid>-->
|
3
|
<span *ngIf="periodFilter.selectedFromAndToValues.length > 0" class="uk-grid-margin">
|
4
|
<a (click)="clearPeriodFilter()" [class]="((loading)?' uk-disabled':' ')+' uk-link-text '"> <span
|
5
|
class="selectedFilterLabel" [class.uk-margin-small-left]="margin"
|
6
|
title="Remove {{periodFilter.selectedFromAndToValues}}">
|
7
|
<i uk-icon="close"></i>
|
8
|
<span class="uk-margin-small-left">{{periodFilter.selectedFromAndToValues}}</span>
|
9
|
</span></a>
|
10
|
</span>
|
11
|
<ng-container *ngFor="let filter of filters ">
|
12
|
<ng-container *ngIf="filter.countSelectedValues > 0">
|
13
|
<ng-container *ngFor="let value of filter.values; let i = index; let end = last; ">
|
14
|
<ng-container *ngIf="value.selected">
|
15
|
<span class="uk-grid-margin">
|
16
|
<!-- if no grid on the div above, remove it and move class 'selectedFilterLabel' on top span -->
|
17
|
<span class="selectedFilterLabel " [class.uk-margin-small-left]="margin" [title]="'Remove '+value.name"
|
18
|
(click)="value.selected = false; filter.radioValue=''; filter.countSelectedValues=
|
19
|
filter.countSelectedValues -1;
|
20
|
filterChanged({value:filter}) ">
|
21
|
<a [class]="((loading)?' uk-disabled':' ')+' uk-link-text '">
|
22
|
<span class=" clickable" aria-hidden="true">
|
23
|
<span class="uk-icon">
|
24
|
<svg width="16" height="16" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"
|
25
|
icon="close" ratio="0.8"><path fill="none" stroke="#000" stroke-width="1.6"
|
26
|
d="M16,16 L4,4"></path><path fill="none"
|
27
|
stroke="#000"
|
28
|
stroke-width="1.6"
|
29
|
d="M16,4 L4,16"></path></svg>
|
30
|
</span>
|
31
|
</span>
|
32
|
<span class="uk-margin-small-left"
|
33
|
[innerHtml]="(value.name.length > 34)?value.name.substring(0,34)+'...':value.name"></span>
|
34
|
</a>
|
35
|
</span>
|
36
|
</span>
|
37
|
</ng-container>
|
38
|
</ng-container>
|
39
|
</ng-container>
|
40
|
</ng-container>
|
41
|
<!-- </div>-->
|
42
|
</ng-template>
|
43
|
<div page-content [class.greyOut]="filterToggle" (click)=" (filterToggle)?filterToggle = false:filterToggle">
|
44
|
<div *ngIf="activeTopic && activeTopic.categories.length > 1" header>
|
45
|
<nav class=" ">
|
46
|
<div *ngIf="stakeholder && status === errorCodes.DONE && activeTopic" class="">
|
47
|
<ul
|
48
|
class="customTabs uk-tab ">
|
49
|
<ng-template ngFor [ngForOf]="activeTopic.categories" let-category let-i="index">
|
50
|
<li *ngIf="isPublicOrIsMember(category.visibility)"
|
51
|
[class.uk-active]="category.alias ===
|
52
|
activeCategory.alias">
|
53
|
<a (click)="navigateTo(stakeholder.alias,activeTopic.alias, category.alias)"
|
54
|
class="uk-margin-remove-bottom uk-h4"
|
55
|
><span class="title">{{category.name}}</span></a>
|
56
|
</li>
|
57
|
</ng-template>
|
58
|
</ul>
|
59
|
</div>
|
60
|
</nav>
|
61
|
<ul *ngIf="activeCategory && countSubCategoriesToShow(activeCategory) > 1"
|
62
|
class="uk-subnav uk-subnav-pill subCategoriesTabs ">
|
63
|
<ng-template ngFor [ngForOf]="activeCategory.subCategories" let-subCategory let-i="index">
|
64
|
<li *ngIf="isPublicOrIsMember(subCategory.visibility)"
|
65
|
[ngClass]="(subCategory.alias === activeSubCategory.alias)?'uk-active':''">
|
66
|
<a (click)="navigateTo(stakeholder.alias,activeTopic.alias,activeCategory.alias, subCategory.alias)"
|
67
|
class="uk-margin-remove-bottom uk-h3"
|
68
|
><span>{{subCategory.name}}</span></a>
|
69
|
</li>
|
70
|
</ng-template>
|
71
|
</ul>
|
72
|
<div *ngIf="countSelectedFilters() > 0" class="uk-grid uk-grid-small uk-margin-bottom">
|
73
|
<span class="uk-grid-margin">Filters: </span>
|
74
|
<ng-container *ngTemplateOutlet="selected_filters_pills; context: {margin:true}"></ng-container>
|
75
|
</div>
|
76
|
</div>
|
77
|
<div id="page_content_inner" inner>
|
78
|
<div class=" indicators">
|
79
|
<div *ngIf="privateStakeholder">
|
80
|
<div class="uk-text-center uk-height-medium">
|
81
|
<div class="uk-h3 "><i>
|
82
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="black" width="24px" height="24px">
|
83
|
<path d="M0 0h24v24H0z" fill="none"/>
|
84
|
<path
|
85
|
d="M18 8h-1V6c0-2.76-2.24-5-5-5S7 3.24 7 6v2H6c-1.1 0-2 .9-2 2v10c0 1.1.9 2 2 2h12c1.1 0 2-.9 2-2V10c0-1.1-.9-2-2-2zm-6 9c-1.1 0-2-.9-2-2s.9-2 2-2 2 .9 2 2-.9 2-2 2zm3.1-9H8.9V6c0-1.71 1.39-3.1 3.1-3.1 1.71 0 3.1 1.39 3.1 3.1v2z"/>
|
86
|
</svg>
|
87
|
</i>
|
88
|
Private data
|
89
|
</div>
|
90
|
<div class="uk-text-large "></div>
|
91
|
</div>
|
92
|
</div>
|
93
|
<div *ngIf="!privateStakeholder">
|
94
|
<div
|
95
|
*ngIf="(activeSubCategory && (activeSubCategory.charts.length == 0 ||
|
96
|
(activeSubCategory.charts.length == 1 && activeSubCategory.charts[0].indicators.length == 0)))
|
97
|
&& ((activeSubCategory &&
|
98
|
activeSubCategory.description &&
|
99
|
activeSubCategory.description.length > 0) ||
|
100
|
(activeCategory && activeCategory.description && activeCategory.description.length > 0) ||
|
101
|
(activeTopic && activeTopic.description && activeTopic.description.length > 0))"
|
102
|
class="uk-text-center">
|
103
|
<div class="uk-h5 uk-height-small uk-margin-large-top uk-margin-xlarge-right uk-margin-xlarge-left">
|
104
|
{{activeSubCategory && activeSubCategory.description && activeSubCategory.description.length > 0 ? activeSubCategory.description
|
105
|
: (activeCategory && activeCategory.description && activeCategory.description.length > 0 ? activeCategory.description :
|
106
|
(activeTopic.description && activeTopic.description.length > 0 ? activeTopic.description : ""))}}
|
107
|
</div>
|
108
|
|
109
|
</div>
|
110
|
<div *ngIf="!loading && !privateStakeholder &&
|
111
|
(!activeSubCategory ||
|
112
|
(
|
113
|
(activeSubCategory.numbers.length == 0 || (activeSubCategory.numbers.length == 1 && activeSubCategory.numbers[0].indicators.length == 0))
|
114
|
&&
|
115
|
(activeSubCategory.charts.length == 0 || (activeSubCategory.charts.length == 1 && activeSubCategory.charts[0].indicators.length == 0))
|
116
|
) || !activeTopic || !activeCategory || !activeSubCategory)">
|
117
|
<div class=" uk-text-center">
|
118
|
<div class="uk-h3">
|
119
|
No indicators available yet. Stay tuned!
|
120
|
</div>
|
121
|
</div>
|
122
|
</div>
|
123
|
<div *ngIf="activeSubCategory" class="uk-grid uk-grid-medium uk-margin-bottom uk-margin-top"
|
124
|
uk-height-match="target: div.uk-card">
|
125
|
<ng-template ngFor [ngForOf]="activeSubCategory.numbers" let-number let-i="index">
|
126
|
<h4 class="uk-width-1-1">{{number.title}}</h4>
|
127
|
<ng-template ngFor [ngForOf]="number.indicators" let-indicator let-j="index">
|
128
|
<div *ngIf="isPublicOrIsMember(indicator.visibility)"
|
129
|
[class.uk-width-1-3@m]="indicator.width === 'small'"
|
130
|
[class.uk-width-1-2@m]="indicator.width === 'medium'"
|
131
|
[class.uk-width-1-1]="indicator.width === 'large'" class=" uk-margin-bottom">
|
132
|
<div class="uk-card uk-card-default"
|
133
|
[class.uk-disabled]="indicator.indicatorPaths[0].filtersApplied < countSelectedFilters()"
|
134
|
[class.semiFiltered]="indicator.indicatorPaths[0].filtersApplied < countSelectedFilters()">
|
135
|
<div class="uk-card-body uk-text-center">
|
136
|
<div *ngIf="properties.environment == 'development'">Filtered:
|
137
|
{{indicator.indicatorPaths[0].filtersApplied}}
|
138
|
out of
|
139
|
{{countSelectedFilters()}}</div>
|
140
|
<div class="uk-text-bold ">{{indicator.name}}</div>
|
141
|
<h3 *ngIf="numberResults.get(i + '-' + j)" class="uk-margin-medium-top uk-text-bold">
|
142
|
<span>{{numberResults.get(i + '-' + j) | number}}</span>
|
143
|
</h3>
|
144
|
<ng-container *ngTemplateOutlet="description; context: {indicator:indicator}"></ng-container>
|
145
|
</div>
|
146
|
</div>
|
147
|
</div>
|
148
|
</ng-template>
|
149
|
</ng-template>
|
150
|
</div>
|
151
|
<div *ngIf="activeSubCategory">
|
152
|
<div *ngFor="let chart of activeSubCategory.charts; let i = index;"
|
153
|
class="uk-grid uk-grid-medium uk-margin-bottom uk-flex uk-flex-bottom "
|
154
|
uk-height-match="target: div > div > .chartTitle">
|
155
|
|
156
|
<h3 *ngIf="chart.title && chart.title.length > 0" class="uk-width-1-1 uk-margin-top">{{chart.title}}</h3>
|
157
|
<ng-template ngFor [ngForOf]="chart.indicators" let-indicator let-j="index">
|
158
|
<div
|
159
|
*ngIf="isPublicOrIsMember(indicator.visibility) && chartsActiveType.get(i + '-' + j)"
|
160
|
[class.uk-width-1-3@m]="indicator.width === 'small'"
|
161
|
[class.uk-width-1-2@m]="indicator.width === 'medium'"
|
162
|
[class.uk-width-1-1]="indicator.width === 'large'" class="uk-margin-bottom">
|
163
|
<div class="indicatorBox">
|
164
|
<h4 class="uk-margin-bottom chartTitle uk-flex uk-flex-bottom ">
|
165
|
<div>{{indicator.name + " "}}</div>
|
166
|
</h4>
|
167
|
<div class="uk-card uk-card-default"
|
168
|
[class.uk-disabled]="chartsActiveType.get(i + '-' + j).filtersApplied < countSelectedFilters()"
|
169
|
[class.semiFiltered]="chartsActiveType.get(i + '-' + j).filtersApplied < countSelectedFilters()"
|
170
|
>
|
171
|
<div class="uk-card-body uk-text-center">
|
172
|
<div *ngIf="indicator.indicatorPaths.length > 1" class="uk-button-group">
|
173
|
<button *ngFor="let indicatorPath of indicator.indicatorPaths;"
|
174
|
class="uk-button"
|
175
|
(click)="setActiveChart(i, j, indicatorPath.type)"
|
176
|
[class.uk-button-secondary]="chartsActiveType.get(i + '-' + j).url === indicatorPath.url">
|
177
|
{{indicatorPath.type}}
|
178
|
</button>
|
179
|
</div>
|
180
|
<div *ngIf="properties.environment == 'development'">
|
181
|
Filtered: {{chartsActiveType.get(i + '-' + j).filtersApplied}} out of
|
182
|
{{countSelectedFilters()}}</div>
|
183
|
<iframe *ngIf="chartsActiveType.get(i + '-' + j).source !== 'image'"
|
184
|
[src]="chartsActiveType.get(i + '-' + j).safeResourceUrl"
|
185
|
class="uk-width-1-1 uk-height-medium"></iframe>
|
186
|
<!-- {{chartsActiveType.get(i).safeResourceUrl}}-->
|
187
|
<!-- <a [href]="chartsActiveType.get(i).safeResourceUrl" target="_blank" > ChartuURL</a>-->
|
188
|
<img *ngIf="chartsActiveType.get(i + '-' + j).source === 'image'"
|
189
|
[src]="chartsActiveType.get(i + '-' + j).safeResourceUrl"
|
190
|
class="uk-width-1-1 uk-height-medium">
|
191
|
<ng-container *ngTemplateOutlet="description; context: {indicator:indicator}"></ng-container>
|
192
|
</div>
|
193
|
</div>
|
194
|
</div>
|
195
|
</div>
|
196
|
</ng-template>
|
197
|
</div>
|
198
|
</div>
|
199
|
<div *ngIf="!loading && !privateStakeholder && (activeSubCategory || activeTopic.categories == null || activeTopic.categories.length == 0)"
|
200
|
class="uk-width-1-1 uk-text-center uk-text-muted">
|
201
|
<span>Send us your <a [href]="mailText" target="_self" (click)="mailMe()">feedback</a>.</span>
|
202
|
|
203
|
</div>
|
204
|
</div>
|
205
|
</div>
|
206
|
</div>
|
207
|
</div>
|
208
|
<!--(click)="filterToggle= !filterToggle"
|
209
|
[style.display]="(filterToggle?'none':'inherit')"-->
|
210
|
<div *ngIf="stakeholder && !privateStakeholder" href="#style_switcher" uk-toggle="" id="filters_switcher_toggle">
|
211
|
<i class=" uk-text-muted">
|
212
|
<svg style="margin-top: 8px;" xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24"
|
213
|
viewBox="0 0 20 20"
|
214
|
fill="white" width="24px" height="16px">
|
215
|
<g>
|
216
|
<path d="M0,0h24 M24,24H0" fill="none"/>
|
217
|
<path
|
218
|
d="M4.25,5.61C6.57,8.59,10,13,10,13v5c0,1.1,0.9,2,2,2h0c1.1,0,2-0.9,2-2v-5c0,0,3.43-4.41,5.75-7.39 C20.26,4.95,19.79,4,18.95,4H5.04C4.21,4,3.74,4.95,4.25,5.61z"/>
|
219
|
<path d="M0,0h24v24H0V0z" fill="none"/>
|
220
|
</g>
|
221
|
</svg>
|
222
|
</i>
|
223
|
</div>
|
224
|
<div *ngIf="stakeholder && !privateStakeholder" id="style_switcher" class=" uk-offcanvas filters_switcher"
|
225
|
uk-offcanvas="flip:true" mode="slide" overlay="" style="z-index:982;">
|
226
|
|
227
|
<div class="uk-offcanvas-bar offcanvas-white">
|
228
|
<div class="uk-float-right">
|
229
|
<button class="uk-offcanvas-close uk-close uk-icon" type="button" uk-close=""></button>
|
230
|
|
231
|
</div>
|
232
|
<div class="uk-padding">
|
233
|
<div class="uk-grid uk-flex uk-flex-middle">
|
234
|
<div class="uk-h4 ">Filters</div>
|
235
|
<a *ngIf="countSelectedFilters() > 1"
|
236
|
class=" portal-link uk-width-1-2" (click)="clearAll()"> Clear All </a></div>
|
237
|
<div class="uk-grid uk-grid-small uk-text-small" uk-grid>
|
238
|
<ng-container *ngTemplateOutlet="selected_filters_pills; context: {margin:false}"></ng-container>
|
239
|
</div>
|
240
|
<div class="uk-margin-small-top"><i class="uk-text-muted uk-text-small"> If your filter selection cannot be
|
241
|
applied to a chart, that chart will appear grayed-out.</i></div>
|
242
|
<ul class="uk-list uk-list-divider uk-margin-medium">
|
243
|
<li>
|
244
|
<range-filter [filter]="periodFilter" yearMin="2000" yearMax="2020" [mandatoryRange]="true"
|
245
|
(onFilterChange)="filter()"></range-filter>
|
246
|
</li>
|
247
|
<ng-container *ngFor="let filter of filters ">
|
248
|
<li *ngIf="filter.values.length >0">
|
249
|
<search-filter [filter]="filter" [showResultCount]=false
|
250
|
(onFilterChange)="filterChanged($event)"></search-filter>
|
251
|
</li>
|
252
|
</ng-container>
|
253
|
</ul>
|
254
|
|
255
|
</div>
|
256
|
</div>
|
257
|
</div>
|
258
|
|
259
|
<ng-template #description let-indicator="indicator">
|
260
|
<span class="descriptionIcon"
|
261
|
*ngIf="(indicator.description && indicator.description.length > 0)
|
262
|
|| (indicator.additionalDescription && indicator.additionalDescription.length > 0)"
|
263
|
uk-icon="info"
|
264
|
[attr.uk-tooltip]="'title:<div class=\'uk-padding-small\'>'+
|
265
|
(indicator.description&& indicator.description.length > 0?indicator.description:'') +'<br>'+
|
266
|
(indicator.additionalDescription && indicator.additionalDescription.length?indicator.additionalDescription:'')
|
267
|
+'</div>'">
|
268
|
</span>
|
269
|
</ng-template>
|