Une erreur s'est produite lors du traitement du gabarit.
The string doesn't match the expected date/time/date-time format. The string to parse was: "". The expected format was: "yyyy-MM-dd hh:mm:ss.SSS". The nested reason given follows: Unparseable date: "" ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign dateModificationStr = dateMod... [in template "20101#20128#36857" at line 30, column 10] ----
1<#assign serviceContext = staticUtil["com.liferay.portal.kernel.service.ServiceContextThreadLocal"].getServiceContext()>
2<#assign themeDisplay = serviceContext.getThemeDisplay() />
3
4
5<#-- --# -- main -->
6<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService" ) >
7
8<#assign dateModificationStr = "">
9<#assign dateDebutStr = "">
10<#assign dateFinStr = "">
11<#assign commentaireCoutPrincipal = "">
12<#assign imageCoutPrincipal = "">
13
14<#assign catnatServiceUtil = utilLocator.findUtil('catnat-services-hook', 'fr.catnat.services.CatNatServiceUtil')>
15<#assign infosEvenement = catnatServiceUtil.getInfoEvenement(Numero_AGIR.getData())>
16
17<#if (infosEvenement?has_content)>
18 <#assign jsonResponse = jsonFactoryUtil.createJSONObject(infosEvenement)>
19 <#setting time_zone = "Europe/Paris">
20 <#setting time_zone = languageUtil.get(locale, "template-timezone")>
21
22 <#assign originalLocale = locale>
23
24 <#if jsonResponse.get('dateModification')?is_number>
25 <#assign dateModification = jsonResponse.getLong('dateModification') + 10800000>
26 <#assign dateModification = dateModification?number_to_datetime>
27 <#assign dateModificationStr = dateModification?date?string("dd/MM/yyyy")>
28 <#else>
29 <#assign dateModification = jsonResponse.getString('dateModification')>
30 <#assign dateModificationStr = dateModification?datetime("yyyy-MM-dd hh:mm:ss.SSS")?string("dd/MM/yyyy")>
31 </#if>
32
33
34 <#if jsonResponse.get('dateDebut')?is_number>
35 <#assign dateDebut = jsonResponse.getLong('dateDebut') + 10800000>
36 <#assign dateDebut = dateDebut?number_to_datetime>
37 <#assign dateDebutStr = dateDebut?date>
38 <#else>
39 <#assign dateDebut = jsonResponse.getString('dateDebut')>
40 <#assign dateDebutStr = dateDebut?date("yyyy-MM-dd")>
41
42 </#if>
43 <#if jsonResponse.get('dateFin')?is_number>
44 <#assign dateFin = jsonResponse.getLong('dateFin') + 10800000>
45
46 <#assign dateFin = dateFin?number_to_datetime>
47 <#assign dateFinStr = dateFin?date>
48 <#else>
49 <#assign dateFin = jsonResponse.getString('dateFin')>
50 <#assign dateFinStr = dateFin?date("yyyy-MM-dd")>
51
52 </#if>
53
54</#if>
55
56<#-- # -- main -->
57 <#assign assetUrlToRedirect = journalArticleLocalService.getDisplayArticleByUrlTitle(groupId, .vars['reserved-article-url-title'].data)>
58
59<#assign vueMarche = jsonResponse.getJSONObject('vueMarche')>
60
61<#-- #Prendre en compte le flag "Afficher cout" dans la contribution Liferay-->
62<#assign typeEvenement = jsonResponse.getString('typeEvenement')>
63<#assign title = jsonResponse.getString('libelle')>
64
65<#-- <#assign currentUrl = request.get("attributes").CURRENT_COMPLETE_URL > -->
66 <#assign currentUrl = themeDisplay.getPortalURL() + themeDisplay.getURLCurrent() />
67<#assign imageShare = "" >
68<style>
69 @media (max-width: 767px) {
70 #event_actions {
71 display: none;
72 }
73 .fa-download {
74 display: none;
75 }
76
77 #deptTrunc{
78 display: none;
79 }
80
81 #deptAll{
82 display: inline !important;
83 }
84 }
85</style>
86<script>
87function printEvent()
88{
89 var eventElement = document.getElementById('event_catnat');
90 var mywindow = window.open('', 'PRINT', '');
91 var printCss = document.getElementById('deptTrunc');
92
93 printCss.innerHTML = document.getElementById('deptAll').innerHTML;
94
95 mywindow.document.write('<html><head><title>' + document.title + '</title>');
96 mywindow.document.write('</head><body >');
97 mywindow.document.write('<h1>' + document.title + '</h1>');
98 mywindow.document.write(eventElement.innerHTML);
99 mywindow.document.write('</body></html>');
100 printCss
101
102 mywindow.document.close(); // necessary for IE >= 10
103 mywindow.focus(); // necessary for IE >= 10*/
104
105 mywindow.print();
106 mywindow.close();
107
108 return true;
109}
110
111<#--function downloadPDF (){
112 return printEvent();
113}-->
114
115var numeroAgir = '${Numero_AGIR.getData()}';
116
117function displayArretes(callback) {
118 callback(0, 8, false, '${Numero_AGIR.getData()}');
119}
120
121</script>
122
123<div class="main-wrapper" id="event_catnat">
124 <div class="event_title">${title}</div>
125 <p> <span class="event_subtitle-txt">
126 Mise à jour le ${dateModificationStr}</span></p>
127 <br>
128 <div class="event_mise_avant">
129 <div class="col-md-8" style="padding: 0;">
130 <#if (!Image_principale.getData()?has_content)>
131 <img src="/images/favicon/mstile-70x70.png" alt="Image Evenement">
132 <#else>
133 <img src="${Image_principale.getData()}" class="event_img" alt="Image Evenement"/>
134 </#if>
135
136
137
138 <#if (validator.isNotNull(Resume.getData()))>
139 <div class="event_resume">${Resume.getData()}</div>
140 </#if>
141 </div>
142
143 <div class="col-md-4" style="padding: 0;">
144 <table style="width: 100%;border-spacing: 0px;" border="0">
145 <tbody>
146 <tr>
147 <td style="padding:15px;text-align: left; background-color: #f3f3f3;">
148 <table style="width:100%">
149 <tbody>
150 <tr>
151 <#if (validator.isNotNull(Information_cle_1_Valeur.getData()))>
152 <td width="60%"><span class="event_info_title">${Information_cle_1_Valeur.getData()}</span><br><span class="event_info" style="color: #1a5b81; font-weight: bold;">${Information_cle_1_Label.getData()}</span></td>
153 </#if>
154 <#if (validator.isNotNull(Information_cle_2_Valeur.getData()))>
155 <td><span class="event_info_title">${Information_cle_2_Valeur.getData()}</span><br><span class="event_info" style="color: #1a5b81;font-weight: bold;">${Information_cle_2_Label.getData()}</span> </td>
156 </#if>
157 <#-- --# Si mise en avant absente => Renseigner le coût de l'événement.-->
158 <#if (validator.isNull(Information_cle_1_Valeur.getData()) && validator.isNull(Information_cle_2_Valeur.getData()) && getterUtil.getBoolean(Afficher_cout.getData()))>
159 <#assign coutMarche = vueMarche.getJSONObject('cout')>
160 <td>
161 <span class="event_info_title" style="font-size: 24px;">${coutMarche.getString("coutStr")}</span><br>
162
163 <span class="event_info" style="color: #1a5b81; font-weight: bold;">
164 <#if (validator.isNotNull(Information_cle_cout.getData()))>
165 ${Information_cle_cout.getData()}
166 <#else>
167 Dommages assuré hors automobile
168 </#if>
169 </span>
170 </td>
171 </#if>
172 </tr>
173 </tbody>
174 </table>
175 <hr class="title-category-hr-chatams-blue" style="margin-top: 10px;margin-bottom: 10px;">
176 <table style="width:100%">
177 <tr>
178 <td width="60%">
179 <b>Date de début </b>
180 <br>
181 <span class="event_info">${dateDebutStr}</span>
182 </td>
183 <td>
184 <b>Date de fin</b>
185 <br>
186 <span class="event_info">${dateFinStr}</span>
187 </td>
188 </tr>
189 </table>
190
191 <#if (validator.isNotNull(Cours_eau.getData()))>
192 <br>
193 <b>Cours d'eau ayant débordé<br>
194 <span class="event_info">${Cours_eau.getData()}</span>
195 </#if>
196
197 <#if (validator.isNotNull(jsonResponse.getString('pluviometrie1H'))|| validator.isNotNull(jsonResponse.getString('pluviometrie24H')))>
198 <br>
199 <br>
200 <b>Pluviométrie maximale</b>
201 <br>
202 <span class="event_info">
203 <#if (validator.isNotNull(jsonResponse.getString('pluviometrie1H')))>
204 ${jsonResponse.getString('pluviometrie1H')} mm en 1h
205 </#if>
206 <#if (validator.isNotNull(jsonResponse.getString('pluviometrie1H')))>
207 <br>
208 ${jsonResponse.getString('pluviometrie24H')} mm en 24 h
209 </#if>
210 </span>
211 </#if>
212 <br>
213 <br>
214 <b>Départements concernés <br>
215 <#assign deps = jsonResponse.getJSONArray('departementsTouches')>
216 <#assign fin = deps.length() - 1>
217
218 <#assign depsStr = "">
219 <#assign allDepsStr = "">
220 <#assign allDepsPrint = "">
221 <#list 0..fin as i>
222 <#assign dep = deps.getString(i)>
223 <#if i != 0>
224 <#assign separator = ', '>
225 <#else>
226 <#assign separator = ''>
227 </#if>
228
229 <#assign allDepsStr = allDepsStr + separator + dep>
230 <#if i < 6>
231 <#assign depsStr = depsStr + separator +dep>
232 </#if>
233 </#list>
234 <#if deps?length gt 6>
235 <#assign depsStr = depsStr + " ... ">
236
237 </#if>
238
239
240 <span id="deptTrunc" class="event_info" title="${allDepsStr}">
241 ${depsStr}
242 </span>
243
244 <span id="deptAll" class="event_info" style="display: none;">
245 ${allDepsStr}
246 </span>
247 <br>
248 <br>
249 <div class="pull-right" id="event_actions">
250
251 <#--<a href="#" OnClick="javascript:downloadPDF()" title="Telecharger le document"><i style="color:#1a5b81;font-size: 1.8em;" class="fas fa-download"></i></a>-->
252 <a href="#" OnClick="javascript:printEvent()" title="Imprimer le document"><i style="color:#1a5b81;font-size: 1.8em;" class="fas fa-print"></i></a>
253 </div>
254
255 </td>
256 </tr>
257 </tbody>
258 </table>
259 </div>
260 </div>
261 <br>
262
263
264
265 <div class="panel-group" id="accordion" role="tablist" aria-multiselectable="true" style="text-align:justify">
266
267 <#if (validator.isNotNull(Description.getData()))>
268 <div class="panel panel-default">
269 <div class="panel-heading" role="tab" id="heading1">
270 <a role="button" data-toggle="collapse" href="#collapse1" aria-expanded="true" aria-controls="collapse1" class="collapse-head collapsed">
271 <h4 class="panel-title">
272 <span class="event_description_title">DESCRIPTION DE L'EVENEMENT</span>
273 </h4>
274 </a>
275 </div>
276 <div id="collapse1" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading1">
277 <div class="panel-body">
278 ${Description.getData()}
279 </div>
280 </div>
281 </div>
282 </#if>
283
284
285 <#if (validator.isNotNull(Dommages.getData()))>
286
287 <div class="panel panel-default">
288
289 <div class="panel-heading" role="tab" id="heading2">
290 <a role="button" data-toggle="collapse" href="#collapse2" aria-expanded="false" aria-controls="collapse2" class="collapse-head collapsed">
291 <h4 class="panel-title">
292 <span class="event_description_title">DOMMAGES CONSTATES</span>
293 </h4>
294 </a>
295 </div>
296
297 <div id="collapse2" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading2">
298 <div class="panel-body">
299 ${Dommages.getData()}
300 </div>
301 </div>
302 </div>
303 </#if>
304
305
306
307 <#assign communes = jsonResponse.getJSONArray('communesTouchees')>
308 <#if validator.isNotNull(communes) && communes?length gt 0 && communes != "[]">
309 <div class="panel panel-default">
310 <div class="panel-heading" role="tab" id="heading3">
311 <a role="button" data-toggle="collapse" href="#collapse3" aria-expanded="false" aria-controls="collapse3" class="collapse-head collapsed">
312 <h4 class="panel-title">
313 <span class="event_description_title"> COMMUNES LES PLUS SINISTREES</span>
314 </h4>
315 </a>
316 </div>
317 <div id="collapse3" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading3">
318 <div class="panel-body">
319
320 <#assign fin = communes?length - 1>
321 <#list 0..fin as i>
322 <#assign commune = communes.getString(i)>
323 <#if commune??>
324 <p>${commune}</p>
325 </#if>
326 </#list>
327 </div>
328 </div>
329 </div>
330 </#if>
331
332
333
334
335 <#assign vueMarche = jsonResponse.getJSONObject('vueMarche')>
336
337 <#-- --#Prendre en compte le flag "Afficher cout" dans la contribution Liferay-->
338 <#assign typeEvenement = jsonResponse.getString('typeEvenement')>
339
340 <#if (getterUtil.getBoolean(Afficher_cout.getData()))>
341
342 <div class="panel panel-default">
343 <div class="panel-heading" role="tab" id="heading4">
344 <a role="button" data-toggle="collapse" href="#collapse4" aria-expanded="true" aria-controls="collapse4" class="collapse-head collapsed">
345 <h4 class="panel-title">
346 <span class="event_description_title">COÛT DE L'EVENEMENT</span>
347 </h4>
348 </a>
349 </div>
350 <div id="collapse4" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading4">
351 <div class="panel-body">
352 <#assign coutMarche = vueMarche.getJSONObject('cout')>
353 <#assign dateCoutPrincipal = coutMarche.getLong('dateCout') + 10800000>
354 <#assign dateCoutPrincipal = dateCoutPrincipal?number_to_datetime>
355 <#assign dateCoutPrincipalStr = dateCoutPrincipal?date?string("dd/MM/yyyy")>
356
357 <p><b>${coutMarche.getString("coutStr")}</b>
358
359 <#if (cout.getSiblings()?has_content)>
360 <#-- # Récupération du commentaire (liferay) correspondant au cout principal
361 ## Parcours de la liste des couts du document liferay, pour trouver le commentaire correspondant au cout recu via le service web-->
362 <#list cout.getSiblings() as cur_cout>
363 <#assign cout_Data = cur_cout.getData()>
364 <#if cout_Data?has_content>
365 <#assign cout_DateObj =cout_Data>
366
367 <#assign coutDate = cout_DateObj?datetime("yyyy-mm-dd")?string("dd/MM/yyyy")>
368 <#-- TODO Must check this Part -->
369 <#-- <#if (coutDate == dateCoutPrincipalStr)> -->
370 <#assign commentaireCoutPrincipal = getterUtil.getString(cur_cout.getChild("Commentaire_cout").getData())>
371 <#assign imageCoutPrincipal = cur_cout.getChild("Image_cout_par_commune").getData()>
372 <#-- </#if> -->
373
374 </#if>
375 </#list>
376 </#if>
377 (mise à jour le : ${dateCoutPrincipalStr}) </p>
378
379 <#if (validator.isNotNull(commentaireCoutPrincipal))>
380 <p>${commentaireCoutPrincipal}</p>
381 </#if>
382
383 <#if (validator.isNotNull(imageCoutPrincipal))>
384 <img alt="Cout par commune pour l'ensemble du marché" style="width:100%;" src="${imageCoutPrincipal}" />
385 </#if>
386
387 <br>
388
389 <#if vueMarche.get('coutsPrecedents') != "null">
390
391 <#assign coutsPrecedents = vueMarche.getJSONArray('coutsPrecedents')>
392 <#if validator.isNotNull(coutsPrecedents) && coutsPrecedents?length gt 0>
393
394 <p><b>Rappel des estimations précedentes</b></p>
395 <#assign fin = coutsPrecedents.length() - 1>
396 <#list 0..fin as i>
397 <#if coutsPrecedents.get(i).get('dateCout')?is_number>
398 <#assign dateCoutPrecedent = coutsPrecedents.get(i).getString('dateCout')?number + 10800000>
399 <#assign dateCoutPrecedent = dateCoutPrecedent?number_to_datetime>
400 <#assign dateCoutPrecedentStr = dateCoutPrecedent?date?string("dd/MM/yyyy")>
401 <#else>
402 <#assign dateCoutPrecedentStr = coutsPrecedents.get(i).get('dateCout')?datetime("yyyy-mm-dd")?string("dd/MM/yyyy")>
403 </#if>
404
405
406 <#-- TODO -->
407 <#list cout.getSiblings() as cur_cout>
408 <#assign cout_DateObj = cur_cout.getData()>
409 <#assign coutDate = cout_DateObj?datetime("yyyy-MM-dd")?string("dd/MM/yyyy")>
410 <#-- TODO (Must Check this Part) -->
411 <#-- <#if coutDate==dateCoutPrecedentStr> -->
412 <#assign commentaireCout = getterUtil.getString(cur_cout.getChild("Commentaire_cout").getData())?replace("<p>","")?replace("</p>","")>
413 <p>Le ${dateCoutPrecedentStr} : <b>${coutsPrecedents.get(i).getString("coutStr")}</b> (${commentaireCout})</p>
414 <#-- </#if> -->
415 </#list>
416
417 </#list>
418 </#if>
419 </#if>
420
421 </div>
422 </div>
423 </div>
424 </#if>
425 <div class="panel panel-default">
426 <div class="panel-heading" role="tab" id="heading5">
427 <a role="button" data-toggle="collapse" href="#collapse5" aria-expanded="true" aria-controls="collapse5" class="collapse-head collapsed">
428 <h4 class="panel-title">
429 <span class="event_description_title">RECONNAISSANCES CAT NAT</span>
430 </h4>
431 </a>
432
433 </div>
434 <div id="collapse5" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading5">
435 <div class="panel-body">
436 <p>Nombre de communes reconnues Cat Nat : <b>${vueMarche.getString("nombreCommunesReconnuesCatNat")}</b> </p>
437
438 <#if (validator.isNotNull(Image_reco.getData()))>
439 <img style="max-width:800px;width:100%" alt="Communes reconnues en 굡t de catastrophes naturelle" src="${Image_reco.getData()}" />
440 </#if>
441 </div>
442 </div>
443 </div>
444
445 <#if (validator.isNotNull(Source.getData()))>
446 <div class="panel panel-default">
447 <div class="panel-heading" role="tab" id="heading6">
448 <a role="button" data-toggle="collapse" href="#collapse6" aria-expanded="true" aria-controls="collapse6" class="collapse-head collapsed">
449 <h4 class="panel-title">
450 <span class="event_description_title">SOURCES</span>
451 </h4>
452 </a>
453 </div>
454 <div id="collapse6" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading6">
455 <div class="panel-body">
456 ${Source.getData()}
457 </div>
458 </div>
459 </div>
460 </#if>
461
462
463 </div>
464
465
466</div>
467<div class="ssk-sticky ssk-left ssk-center ssk-lg">
468
469<#assign resumeEvenementSafe = Resume.getData()?replace("\'", "\\'") >
470<#assign resumeEvenementSafe = resumeEvenementSafe?replace("'", "\\'") >
471
472<a href="#" class="ssk ssk-facebook" data-ssk-ready="true" onclick="shareFacebook(${title},${title},${imageShare}, ${currentUrl}, false); return false;"></a>
473<a href="" class="ssk ssk-twitter" data-ssk-ready="true" onclick="window.open('http://twitter.com/share?text=${title}&url=${currentUrl}', 'twitter-share-dialog', 'menubar=no,toolbar=no,resizable=yes,scrollbars=no, width=800,height=500');return false;"></a>
474<a href="#" class="ssk ssk-linkedin" data-ssk-ready="true" onclick="window.open('https://www.linkedin.com/shareArticle?mini=true&url=${currentUrl}', 'linkedin-share-dialog', 'menubar=no,toolbar=no,resizable=yes,scrollbars=no,width=800,height=500');return false;"></a>
475
476</div>