-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlnrs-app-html.txt
361 lines (352 loc) · 21 KB
/
lnrs-app-html.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
<!-- template here https://codelibrary.opendatasoft.com/page-templates/map-refine/#code-use-a-map-as-a-selector-and-display-results-on-the-side-css-content-->
<ods-dataset-context context="areasgroupedtbl, areafundingschemestbl, apmg, focusareas, wecaboundary, lnrsspeciesarea, sssi"
areasgroupedtbl-dataset="lnrs-sub-areas-data"
areafundingschemestbl-dataset="lnrs-area-funding-schemes-tbl-testing"
apmg-dataset="area-measures-tbl"
focusareas-dataset="focus-areas-gridded"
wecaboundary-dataset="weca-boundary-line"
lnrsspeciesarea-dataset="species-area-tbl"
sssi-dataset="sites-of-special-scientific-interest">
<div class="donotcopy-specific"
ng-init="donotcopy = {'simulaterefineonclick' : false}">
<div class="map-drawer-container"
ng-class="{'map-drawer-container--active': areasgroupedtbl.parameters['refine.area_name'],
'map-drawer-container--active-full': drawer.status || speciesdrawer.status}"
ng-init="drawer = {'status':false}; speciesdrawer = {'status':false};">
<!-- this was in the dive before ng-class -->
<div class="map-drawer-container__map">
<div class="map-drawer-container__backdrop"
ng-click="areasgroupedtbl.parameters['refine.area_name'] = undefined;
apmg.parameters['refine.core_supplementary'] = undefined;
apmg.parameters['refine.measure_type'] = undefined;
apmg.parameters['refine.stakeholder'] = undefined;
drawer.status = false;"
ng-class="{'map-drawer-container__backdrop--active': areasgroupedtbl.parameters['refine.area_name']}">
</div>
<div ng-if="areasgroupedtbl.parameters['refine.area_name'] == undefined">
<h2>
Local Nature Recovery Toolkit: Select a Sub Area to see potential measures for nature recovery
</h2>
<h3>
<a href="https://experience.arcgis.com/experience/55ca9c7688e04336b86c01c2403d403c"
target="_blank">
View mapped measures for nature recovery
<i class="fa fa-external-link"
aria-hidden="true">
</i>
</a>
</h3>
</div>
<ods-pop-in
name="intro-pop-in"
title=""
display-after="1"
display-only-once="false"
>
<br>
<div style="text-align: center;">
<h2>
LNRS Toolkit
</h2>
<br>
Watch a
<a href="https://app.arcade.software/share/WDk0jbGqrBGTbja6zs11" target="_blank">short video </a>
to learn how to use it. <br>
<br>
Or go <a href="" ng-click="hidePopIn()">straight to the toolkit.</a>
</div>
</ods-pop-in>
<ods-map scroll-wheel-zoom="true"
location="10,51.47716,-2.63609"
basemap="mapbox.streets-satellite"
toolbar-drawing="false"
toolbar-fullscreen="false"
search-box="true">
<ods-map-layer context = "focusareas"
shape-opacity="0.5"
color="#93117F"
caption="false"
border-size=0
caption-title="Focus Areas for nature recovery"
exclude-from-refit="true">
</ods-map-layer>
<ods-map-layer context = "sssi"
shape-opacity="0.5"
color="#b38e2b"
caption="false"
border-size=0
caption-title="SSSI"
exclude-from-refit="true">
</ods-map-layer>
<ods-map-layer context="areasgroupedtbl"
display="raw"
shape-opacity="0.4"
color="#ED9899"
border-opacity="0.6"
border-color="grey"
caption="false"
refine-on-click-context="[areasgroupedtbl, areafundingschemestbl, apmg]"
refine-on-click-areasgroupedtbl-context-field="area_name"
refine-on-click-areasgroupedtbl-map-field="area_name"
refine-on-click-areasgroupedtbl-replace-refine="true"
refine-on-click-apmg-context-field="area_name"
refine-on-click-apmg-map-field="area_name"
refine-on-click-apmg-replace-refine="true"
refine-on-click-areafundingschemestbl-context-field="area_name"
refine-on-click-areafundingschemestbl-map-field="area_name"
refine-on-click-areafundingschemestbl-replace-refine="true"
exclude-from-refit="true"
>
</ods-map-layer>
<ods-map-layer context = "wecaboundary"
line-width="2"
color="#222222"
caption="false"
tooltip-disabled="false"
exclude-from-refit="true">
</ods-map-layer>
<div class="map-legend">
<div ng-if="!drawer.status">
<div>
<i class="fa fa-square focusareapurple" aria-hidden="true"> </i>
<strong ods-tooltip="Areas where action to recover nature will have the biggest impact">
Focus Areas for Nature Recovery
</strong>
</div>
<div>
<i class="fa fa-square sssiyellow" aria-hidden="true"> </i>
<strong ods-tooltip="Sites of Special Scientific Interest">
SSSI
</strong>
</div>
</div>
</div>
</ods-map>
<!--ng-click="donotcopy.simulaterefineonclick = false" \ drawer.status = false -->
</div>
<div class="map-drawer-container__drawer map-drawer-container__drawer__partial"
ng-if="areasgroupedtbl.parameters['refine.area_name']"
ng-class="{mobile:drawer.status}">
<div class="map-drawer-container__drawer__close"
ng-click="areasgroupedtbl.parameters['refine.area_name'] = undefined;
apmg.parameters['refine.core_supplementary'] = undefined;
apmg.parameters['refine.measure_type'] = undefined;
apmg.parameters['refine.stakeholder'] = undefined;
drawer.status = false;">
<!-- close the partial map drawer with the X top right -->
<i class="fa fa-times"></i>
</div>
<div ods-adv-analysis="area"
ods-adv-analysis-context="areasgroupedtbl"
ods-adv-analysis-select="area_name, area_description, area_link"
ods-adv-analysis-limit="1">
<!-- Select One of the areas - there can be multiple polygons with the same ID -->
<h2>
Sub Area: {{area[0].area_name}}
</h2>
<dl>
<!-- <dt>Name</dt>
<dd>
<span class="area-text">
<a ng-href="{{area[0].area_link}}"
target="_blank"
ods-tooltip="Area Guidance">
{{area[0].area_name}}
<i class="fa fa-external-link"
aria-hidden="true">
</i>
</a>
</span>
</dd> -->
<dt>Description</dt>
<dd class="description"
ng-style="{'white-space': 'pre-line'}">
<!-- ng-style converts line feeds /n to <br> -->
{{area_desc=area[0].area_description}}
</dd>
<dt>Resources</dt>
<dd ods-results="arealinks"
ods-results-context="areafundingschemestbl"
ods-results-max="10">
<div class="theme-container">
<div ng-repeat="record in arealinks" class="theme-box">
<a ng-href="{{ record.fields.local_funding_schemes }}" target="_blank">
Local funds
<i class="fa fa-external-link"
aria-hidden="true">
</i>
</a>
</div>
<div>
<span class="theme-box">
<a ng-href="{{area[0].area_link}}"
target="_blank"
ods-tooltip="Area Guidance">
Other relevant guidance
<i class="fa fa-external-link"
aria-hidden="true">
</i>
</a>
</span>
</div>
</div>
</dd>
</dl>
<div class="button-container">
<div class="ods-button"
ng-click="drawer.status = !drawer.status">
Priorities and Measures
</div>
<div class="ods-button"
ng-click="speciesdrawer.status = !speciesdrawer.status;
drawer.status = false;
lnrsspeciesarea.parameters['refine.area_name']=area[0].area_name">
Priority Species
</div>
</div>
</div>
</div>
<!-- start species -->
<div class="map-drawer-container__drawer map-drawer-container__drawer__full" ng-if="speciesdrawer.status">
<div class="map-drawer-container__drawer__close"
ng-click="speciesdrawer.status = false;">
<!-- close the partial map drawer with the X top right -->
<i class="fa fa-times"></i>
</div>
<div class="theme-box-container">
<!-- Table from here https://codelibrary.opendatasoft.com/components/table-module/ consider the use of table with detailed panel when we have photos -->
<div class="table-module">
<table class="table-basic"
ods-results="species"
ods-results-context="lnrsspeciesarea"
ods-results-max="51">
<thead>
<tr>
<th>Common name</th>
<th>Scientific name</th>
</tr>
</thead>
<tbody>
<tr ng-repeat="specie in species">
<th scope="row">
<a ng-href="{{ specie.fields.gbif_species_url }}" target="_blank">
{{ specie.fields.common_name | capitalize }}
</a>
</th>
<td>
{{ specie.fields.scientific_name }}
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
<!-- end species -->
<div class="map-drawer-container__drawer map-drawer-container__drawer__full" ng-if="drawer.status">
<div class="map-drawer-container__drawer__close"
ng-click="apmg.parameters['refine.core_supplementary'] = undefined;
apmg.parameters['refine.measure_type'] = undefined;
apmg.parameters['refine.stakeholder'] = undefined;
drawer.status = false;">
<!-- close the partial map drawer with the X top right -->
<i class="fa fa-times"></i>
</div>
<div> <!-- stop the facet boxes from scrolling class="sticky-content" -->
<ods-facets context="apmg">
<div class="box-container">
<div class="column box-column">
<ods-facet name="measure_type"
title="Measure Type"
disjunctive="true"><div ng-non-bindable>{{category.name}}</div>
</ods-facet>
</div>
<div class="column box-column">
<ods-facet name="core_supplementary"
title="Status"
disjunctive="true"
ods-tooltip="'Core' measures relate to key habitats and species; 'Core (BNG)' measures receive 15% BNG uplift in mapped focus areas"><div ng-non-bindable>{{category.name}}</div>
</ods-facet>
</div>
<div class="column box-column">
<ods-facet name="stakeholder"
title="Stakeholder"
disjunctive="true"><div ng-non-bindable>{{category.name}}</div>
</ods-facet>
</div>
</div>
<div class="ods-button"
ng-click="apmg.parameters['refine.core_supplementary'] = undefined;
apmg.parameters['refine.measure_type'] = undefined;
apmg.parameters['refine.stakeholder'] = undefined;">
Clear filters
</div>
</ods-facets>
</div>
<div ng-if="apmg.parameters['refine.core_supplementary'] || apmg.parameters['refine.measure_type'] || apmg.parameters['refine.stakeholder'];"
class="fillwide">
<!-- code below runs when filter(s) applied -->
<!--The grantarray ods-analysis checks to see if there are grants and turns off the grants column in the table if there are none -->
<div class="theme-box-container column fillwide"
ods-adv-analysis="grantarray"
ods-adv-analysis-context="apmg"
ods-adv-analysis-group-by="grant_id"
ng-init="{{grantsExist = grantarray.length > 0}}">
<div ods-adv-analysis="measuresgrants"
ods-adv-analysis-context="apmg"
ods-adv-analysis-group-by="priority_id, biodiversity_priority, measure, measure_id, link_to_further_guidance"
ods-adv-analysis-order-by="priority_id"
>
<div class="table-module">
<div class="table-container">
<table class="table-basic">
<tbody>
<thead>
<tr class="kpi-value">
<!-- th>Biodiversity Priority</th -->
<th ods-tooltip="Hover over measures to see the priority">Measure: Action to implement the priority</th>
<th ng-if="grantsExist"
ods-tooltip="If blank there is no grant available">Grants</th>
</tr>
</thead>
<tr ng-repeat="record in measuresgrants">
<!-- td>{{ record['biodiversity_priority']}}</td -->
<td>
<span ods-tooltip="PRIORITY: {{ record['biodiversity_priority']}}">
<a ng-href="{{record.link_to_further_guidance}}"
target="_blank">
{{ record['measure']}}
<i class="fa fa-external-link"
aria-hidden="true">
</i>
</a>
</span>
</td>
<!--td>{{ record['relevant_map_layer']}}</td -->
<!-- In where clause below use exact match to measure_id rather than measure as this seems ambiguous if measure is used -->
<td ng-if="grantsExist">
<div ods-adv-analysis="linkgrants"
ods-adv-analysis-context="apmg"
ods-adv-analysis-group-by="grant_id, grant_name, url"
ods-adv-analysis-where="measure_id = '{{record['measure_id']}}'"
ods-adv-analysis-order-by="grant_id">
<a ng-repeat="link in linkgrants"
ng-href="{{ link.url }}"
target="_blank"
ods-tooltip="{{link.grant_name}}">
{{link.grant_id}} <br>
</a>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</ods-dataset-context>