1<#--
2Display templates are used to lay out the fields defined in a data
3definition.
4
5Please use the left panel to quickly add commonly used variables.
6Autocomplete is also available and can be invoked by typing "${".
7-->
8<#-- The record service to retrieve the list of records in this Dynamic Data List -->
9<#assign DDLRecordLocalService = serviceLocator.findService("com.liferay.portlet.dynamicdatalists.service.DDLRecordLocalService")>
10
11<#-- The layout service that helps determine the name of the page -->
12<#assign layoutService = serviceLocator.findService("com.liferay.portal.service.LayoutService")>
13
14<#-- Get the records in the Dynamic Data List -->
15<#assign records = DDLRecordLocalService.getRecords(reserved_record_set_id)>
16
17<#assign counter = 0 />
18<#assign iCounter = 0 />
19<#assign ivCounter = 0 />
20<#assign iimgCounter = 0 />
21<script>
22 var numValuePie = [];
23 var numValueBar = [];
24</script>
25
26<div class="container">
27
28 <#if records?has_content>
29 <#assign count = 0 />
30 <#assign rPieChart = "">
31 <#assign rBarChart = "">
32
33 <#assign rNomeIndicatore = "">
34 <#assign rValoreIndicatore = "">
35 <#assign rTitoloIndicatore = "">
36
37 <#list records as cur_record>
38 <#assign counter = 0 />
39 <#assign count = count + 1 />
40
41 <#assign rCategoria = cur_record.getFieldValue("Categoria", locale)>
42 <#assign rCategoria = rCategoria?replace('[', '')>
43 <#assign rCategoria = rCategoria?replace('\"', '')>
44 <#assign rCategoria = rCategoria?replace('\\', '')>
45 <#assign rCategoria = rCategoria?replace('","', '')>
46 <#assign rCategoria = rCategoria?replace(']', '')>
47
48 <#if cur_record.getFieldValues("Progetti_acceleratori", locale)?has_content>
49 <#assign rProgetto = cur_record.getFieldValue("Progetti_acceleratori", locale)>
50 <#assign rProgetto = rProgetto?replace('[', '')>
51 <#assign rProgetto = rProgetto?replace('\"', '')>
52 <#assign rProgetto = rProgetto?replace('\\', '')>
53 <#assign rProgetto = rProgetto?replace('","', '')>
54 <#assign rProgetto = rProgetto?replace(']', '')>
55 </#if>
56
57 <#assign rPieChart = ddmUtil.getDisplayFieldValue(themeDisplay, cur_record.getFieldValue("pieChart", locale), cur_record.getFieldType("pieChart"))>
58 <#assign rBarChart = ddmUtil.getDisplayFieldValue(themeDisplay, cur_record.getFieldValue("barChart", locale), cur_record.getFieldType("barChart"))>
59 <#assign rTimeline = ddmUtil.getDisplayFieldValue(themeDisplay, cur_record.getFieldValue("Pubblica_timeline", locale), cur_record.getFieldType("Pubblica_timeline"))>
60
61
62 <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true">
63
64 <#if cur_record.getFieldValues("Progetti_acceleratori", locale)?has_content && rProgetto != "">
65 <div class="panel panel-info margin">
66 <#else>
67 <div class="panel panel-default">
68 </#if>
69
70 <div class="panel-heading" role="tab" id="heading${reserved_record_set_id}${count}">
71 <p>
72 <a title="${cur_record.getFieldValue("Nome", locale)}" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse${reserved_record_set_id}${count}" aria-expanded="true" aria-controls="collapse${reserved_record_set_id}${count}">
73
74 <#if cur_record.getFieldValues("Progetti_acceleratori", locale)?has_content && rProgetto != "">
75 <img src="/digitfvg-theme/images/ext/realizzazione.png" alt="indicatori ${rProgetto}" />
76 <#else>
77 <img src="/digitfvg-theme/images/ext/realizzazione.png" alt="indicatori ${rProgetto}" />
78 </#if>
79
80 <#if cur_record.getFieldValues("Progetti_acceleratori", locale)?has_content && rProgetto != "">
81 ${rProgetto}
82 <#if cur_record.getFieldValues("Nome_timeline", locale)?has_content>
83 <#list cur_record.getFieldValues("Nome_timeline", locale) as curValue_Nome_timeline>
84 ${curValue_Nome_timeline}
85 </#list>
86 </#if>
87 <#else>
88 <#--${cur_record.getFieldValue("Nome", locale)}
89 -->
90 ${rCategoria}
91 </#if> <em class="glyphicon glyphicon-chevron-down"></em>
92 </a>
93 </p>
94
95 <#if cur_record.getFieldValues("Testo", locale)?has_content>
96 <#list cur_record.getFieldValues("Testo", locale) as curValue_Testo>
97 <#assign counter = counter + 1 />
98
99 <#if counter = 1>
100 ${curValue_Testo}
101 <#else>
102
103 </#if>
104 </#list>
105 </#if>
106
107 </div>
108 <div id="collapse${reserved_record_set_id}${count}" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading${reserved_record_set_id}${count}">
109 <div class="panel-body">
110
111 <div>
112 <#if cur_record.getFieldValues("Nome_timeline", locale)?has_content>
113 <#list cur_record.getFieldValues("Nome_timeline", locale) as curValue_Nome_timeline>
114 <div class="margin"><h2>${curValue_Nome_timeline}</h2></div>
115 </#list>
116 </#if>
117 </div>
118
119 <div>
120 <div>
121 <#if rTimeline?has_content && rTimeline != "No">
122 <#if cur_record.getFieldValues("Nome_timeline", locale)?has_content>
123 <#list cur_record.getFieldValues("Nome_timeline", locale) as curValue_Nome_timeline>
124 <div class="margin"><h2>${curValue_Nome_timeline}</h2></div>
125 </#list>
126 </#if>
127 </#if>
128 </div>
129 <div>
130 <#if cur_record.getFieldValues("Testo", locale)?has_content>
131 <div>
132 <#assign counter = 0 />
133 <#list cur_record.getFieldValues("Testo", locale) as curValue_Testo>
134 <#assign counter = counter + 1 />
135
136 <#if counter = 2>
137 ${curValue_Testo}
138 <#else>
139
140 </#if>
141
142 </#list>
143 </div>
144 </#if>
145 </div>
146 <div>
147
148 <div>
149 <#if rPieChart?has_content && rPieChart != "No">
150
151 <h3>${cur_record.getFieldValue("TestoPieChart", locale)}</h3>
152
153 <canvas id="pieChart${reserved_record_set_id}${count}" style="height:150px"></canvas>
154
155 <#if cur_record.getFieldValues("valuePie", locale)?has_content>
156 <#list cur_record.getFieldValues("valuePie", locale) as curValue_valuePie>
157 <#assign nValuePie = curValue_valuePie />
158 <script>
159 //var numValuePie = [];
160 //numValuePie.push("${nValuePie}");
161 numValuePie["${reserved_record_set_id}${count}"] = "${nValuePie}";
162 var idCanvasPie = "pieChart${reserved_record_set_id}${count}";
163 </script>
164 </#list>
165 </#if>
166
167 </#if>
168
169 <#if rBarChart?has_content && rBarChart != "No">
170
171
172 <div class="chart">
173
174 ${cur_record.getFieldValue("TestoBarChart", locale)}
175
176 <p id="demo${reserved_record_set_id}${count}"></p>
177
178 <canvas id="barChart${reserved_record_set_id}${count}" style="height:130px"></canvas>
179 </div>
180
181 <#if cur_record.getFieldValues("valueBar", locale)?has_content>
182 <#list cur_record.getFieldValues("valueBar", locale) as curValue_valueBar>
183 <#assign nValueBar = curValue_valueBar />
184
185 <script>
186 //var numValueBar = [];
187 //numValueBar.push("${nValueBar}");
188 numValueBar["${count}"] = "${nValueBar}";
189 var idCanvasBar = "barChart${reserved_record_set_id}${count}";
190 document.getElementById("demo${reserved_record_set_id}${count}").innerHTML = "v=" + numValueBar["${count}"] + " ID=" + idCanvasBar;
191 </script>
192
193 </#list>
194 </#if>
195
196
197
198 </#if>
199 </div>
200
201 <div class="container-fluid">
202 <div class="row">
203
204 <div class="col-sm-6 col-sm-offset-6">
205
206
207 <#assign rNomeIndicatore = cur_record.getFieldValues("Nome_indicatore", locale)>
208 <#assign rValoreIndicatore = cur_record.getFieldValues("Valore_indicatore", locale)>
209
210 <#if rValoreIndicatore?has_content>
211
212
213 <#list cur_record.getFieldValues("Valore_indicatore", locale) as curValue_valore_indicatore>
214 <#assign iCounter = iCounter + 1 />
215 <#if curValue_valore_indicatore != "">
216 <div class="small-box bg-info">
217 <div class="inner">
218 <#if curValue_valore_indicatore != "">
219 <h3>${curValue_valore_indicatore} </h3>
220 </#if>
221
222 <#if rNomeIndicatore?has_content>
223 <#list cur_record.getFieldValues("Nome_indicatore", locale) as curValue_Nome_indicatore>
224 <#assign ivCounter = ivCounter + 1 />
225
226
227 <#if iCounter == ivCounter>
228 <#if curValue_Nome_indicatore != "">
229 <p>${curValue_Nome_indicatore} </p>
230 </#if>
231 </#if>
232
233 </#list>
234 <#assign ivCounter = 0 />
235
236 </#if>
237 </div>
238 <div class="icon">
239
240 <#if cur_record.getFieldValues("Icona", locale)?has_content>
241 <#list cur_record.getFieldValues("Icona", locale) as curValue_Icona>
242 <#assign iimgCounter = iimgCounter + 1 />
243 <#if iimgCounter == iCounter>
244 <br>
245 <img src="${ddmUtil.getDisplayFieldValue(themeDisplay, curValue_Icona, cur_record.getFieldType("Icona"))}" alt="" />
246 </#if>
247 </#list>
248 <#assign iimgCounter = 0 />
249 </#if>
250
251 </div>
252 </div>
253 </#if>
254 </#list>
255 <#assign iCounter = 0 />
256
257
258 </#if>
259
260
261
262 </div>
263 </div>
264 </div>
265
266 </div>
267 </div>
268
269
270 <div class="span margin">
271
272 <div class="margin-bottom-5"></div>
273
274 <div>
275 <#if cur_record.getFieldValues("Nome_timeline", locale)?has_content>
276 <#list cur_record.getFieldValues("Nome_timeline", locale) as curValue_Nome_timeline>
277
278
279 <#if cur_record.getFieldValues("Timeline", locale)?has_content>
280 <#list cur_record.getFieldValues("Timeline", locale) as curValue_Timeline>
281
282 <#if curValue_Timeline != "">
283 ${curValue_Timeline}
284 </#if>
285
286 </#list>
287 <div class="margin-bottom-40"></div>
288 </#if>
289
290 </#list>
291 </#if>
292 </div>
293
294 </div>
295
296 </div>
297 </div>
298
299 </div>
300 </div>
301
302 </#list>
303 </#if>
304
305</div>