-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlnrs-app-text.html
218 lines (215 loc) · 13.5 KB
/
lnrs-app-text.html
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
<!-- 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="areafundingschemestbl, apmg, areasonly"
areafundingschemestbl-dataset="lnrs-area-funding-schemes-tbl-testing"
apmg-dataset="area-measures-tbl"
areasonly-dataset="areas-tbl"
ng-init="areasonly.parameters['refine.area_name']=undefined">
<div class="donotcopy-specific"
ng-init="donotcopy = {'simulaterefineonclick' : false}">
<div class="map-drawer-container"
ng-init="drawer = {'status':false}"
ng-class="{'map-drawer-container--active': areasonly.parameters['refine.area_name'],
'map-drawer-container--active-full': drawer.status}">
<!-- this was in the dive before ng-class -->
<div class="map-drawer-container__map">
<div class="map-drawer-container__backdrop"
ng-click="areasonly.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': areasonly.parameters['refine.area_name'].length>0}">
</div>
<h2 ng-if="!areasonly.parameters['refine.area_name'].length>0">
Local Nature Recovery Toolkit: Select a Sub Area to see potential measures for nature recovery
</h2>
<div class="center-container">
<div ods-results="items"
ods-results-context="areasonly"
ods-results-max="100">
<label>
<ods-select
disabled="false"
selected-values="areasonly.parameters['refine.area_name']"
multiple="false"
options="items"
label-modifier="fields.area_name"
value-modifier="fields.area_name"
placeholder="Select a Sub - Area">
</ods-select>
</label>
{{apmg.parameters['refine.area_name'] = areasonly.parameters['refine.area_name'];""}}
{{areafundingschemestbl.parameters['refine.area_name'] = areasonly.parameters['refine.area_name'];""}}
</div>
</div>
<!--ng-click="donotcopy.simulaterefineonclick = false" \ drawer.status = false -->
</div>
<div class="map-drawer-container__drawer map-drawer-container__drawer__partial"
ng-if="areasonly.parameters['refine.area_name'].length>0"
ng-class="{mobile:drawer.status}">
<div class="map-drawer-container__drawer__close"
ng-click="drawer.status = false;
areasonly.parameters['refine.area_name']=undefined;
subarea= undefined">
<!-- 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="areasonly"
ods-adv-analysis-select="area_name, area_description, area_link"
ods-adv-analysis-limit="1">
<h2>
Sub Area: {{area[0].area_name}}
</h2>
<dl>
<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="ods-button"
ng-click="drawer.status = !drawer.status">
Priorities and Measures
</div>
<!--div class="ods-button"
ng-click="species-drawer.status = !species-drawer.status">
Species
</div -->
</div>
</div>
<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>