Retour

Mes factures

Une erreur s'est produite en traitant le calibre.
?index_of(...) expects a string as its first argument.
1<#-- 
2Application display templates can be used to modify the look of a 
3specific application. 
4 
5Please use the left panel to quickly add commonly used variables. 
6Autocomplete is also available and can be invoked by typing "${". 
7--> 
8 
9<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetEntryLocalService") /> 
10<#assign classNameLocalService = serviceLocator.findService("com.liferay.portal.service.ClassNameLocalService") /> 
11<#assign assetLinkLocalService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetLinkLocalService") /> 
12<#assign bookmarksEntryLocalService = serviceLocator.findService("com.liferay.portlet.bookmarks.service.BookmarksEntryLocalService") /> 
13<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.portlet.journal.service.JournalArticleLocalService") /> 
14<#assign journalStructureLocalService = serviceLocator.findService("com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService") /> 
15<#assign dlFileEntryLocalService = serviceLocator.findService("com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService") /> 
16 
17<#assign typeJournalArticle = "com.liferay.portlet.journal.model.JournalArticle" /> 
18<#assign typeBookmarksEntry = "com.liferay.portlet.bookmarks.model.BookmarksEntry" /> 
19<#assign typeDLFileEntry = "com.liferay.portlet.documentlibrary.model.DLFileEntry" /> 
20 
21<#assign journalArticle = journalArticleLocalService.getArticle(groupId, .vars['reserved-article-id'].data) /> 
22<#assign entry = assetEntryLocalService.getEntry(typeJournalArticle, journalArticle.getResourcePrimKey()) /> 
23<#assign relatedAssetTypedLists = buildRelatedAssetTypedLists(entry, "false") /> 
24 
25<#assign jaClassNameId = classNameLocalService.getClassNameId(typeJournalArticle) /> 
26 
27<#assign pdfViewer = '/fu/js/pdfjs/web/viewer.html?zoom=page-fit&file=' /> 
28 
29<#assign serviceContextThreadLocal = staticUtil["com.liferay.portal.service.ServiceContextThreadLocal"] /> 
30<#assign themeDisplay = serviceContextThreadLocal.getServiceContext().getThemeDisplay() /> 
31 
32<#assign carouselNb = 0 /> 
33 
34<#-- ARTICLE CONTAINER --> 
35 
36<div class="interior-article-container"> 
37     
38    <article class="interior-article interior-article-displayed"> 
39         
40        <section class="interior-article-mainContent"> 
41             
42            <#if relatedAssetTypedLists[typeJournalArticle]?? && relatedAssetTypedLists[typeJournalArticle]?has_content > 
43                <@getTypedRelatedAssets relatedAssetTypedLists=relatedAssetTypedLists type=typeJournalArticle structure="CDA_ZOOM_SUR" /> 
44            </#if> 
45             
46            <h2>${.vars['reserved-article-title'].data}</h2> 
47             
48            <#if Accroche.getData() != ""> 
49                <p class="interior-article-chapo">${Accroche.getData()}</p> 
50            </#if> 
51             
52            <#if Contenu.getSiblings()?has_content> 
53                <#list Contenu.getSiblings() as content> 
54                     
55                    <#assign zoomedParagraph = "" /> 
56                    <#assign isZoomed = content.par_zoom.getData() /> 
57                    <#if isZoomed == "true" > 
58                        <#assign zoomedParagraph = "zoomed-paragraph" /> 
59                    </#if> 
60                     
61                    <#assign floatingMedia = "no-floating-media" /> 
62                    <#assign alignValue = "" /> 
63                    <#assign alignValue = content.Media.alignment.getData() /> 
64                    <#if alignValue == "fLeft" || alignValue == "fRight" > 
65                        <#assign floatingMedia = "floating-media" /> 
66                    <#elseif alignValue == "flexLeft" || alignValue == "flexRight"> 
67                        <#assign floatingMedia = "flex-media" /> 
68                    </#if> 
69                     
70                    <#assign contentTitle = content.content_title.getData() /> 
71                     
72                    <#assign mediaSrc = "" /> 
73                    <#assign urlIframePortlet = "" /> 
74                     
75                    <#if content.Media?? && content.Media?has_content > 
76                        <#assign mediaSrc = content.Media.getData()/> 
77                        <#assign urlIframePortlet = content.Media.url_iframe_portlet.getData() /> 
78                    </#if> 
79                     
80                     
81                    <#if contentTitle!="" || content.getData()!="" || mediaSrc!="" || urlIframePortlet !="" > 
82                         
83                        <div class="interior-article-paragraph ${zoomedParagraph} ${floatingMedia}"> 
84                             
85                            <#if content.anchor?has_content> 
86                                <#assign anchor = content.anchor.getData() /> 
87                                <#if anchor != "" > 
88                                    <a id="${anchor}" class="page-anchor"></a> 
89                                </#if> 
90                            </#if> 
91                             
92                            <#if contentTitle != "" > 
93                                <h3>${contentTitle}</h3> 
94                            </#if> 
95                             
96                            <#if floatingMedia == "no-floating-media" > 
97                             
98                                ${content.getData()?replace("<p></p>","")} 
99                                <#if content.Media?? && content.Media?has_content > 
100                                    <@getMedia media=content.Media urlIframePortlet=urlIframePortlet /> 
101                                </#if> 
102                                 
103                            <#elseif floatingMedia == "floating-media"> 
104                             
105                                <#if content.Media?? && content.Media?has_content > 
106                                    <@getMedia media=content.Media urlIframePortlet=urlIframePortlet /> 
107                                </#if> 
108                                ${content.getData()?replace("<p></p>","")} 
109                                <div class="clear-float"></div> 
110                                 
111                             <#elseif floatingMedia == "flex-media"> 
112                              
113                                <div class="flex-display flex-media-paragraph ${alignValue}"> 
114                                    <#if content.Media?? && content.Media?has_content > 
115                                        <@getMedia media=content.Media urlIframePortlet=urlIframePortlet /> 
116                                    </#if> 
117                                    <div class="flex-media-paragraph-content"> 
118                                        ${content.getData()?replace("<p></p>","")} 
119                                    </div> 
120                                </div> 
121                                 
122                            </#if> 
123                             
124                        </div> 
125                         
126                    </#if> 
127 
128                </#list> 
129            </#if> 
130              
131        </section> 
132         
133        <@getCustomRelatedAssets relatedAssetTypedLists=relatedAssetTypedLists /> 
134         
135    </article> 
136     
137    <footer class="interior-article-footer"> 
138        <ul class="interior-article-footer-items-list"> 
139            <li class="interior-article-footer-item interior-article-profile"><a class="inner-link" href="/tableau-de-bord" title="Gérer mon profil">Mon profil</a></li> 
140        <li class="interior-article-footer-item interior-article-rss"><a class="inner-link" href="/les-flux-rss-de-l-agglo">Les flux RSS de l'agglo</a></li> 
141        <li class="interior-article-footer-item interior-article-print"><button type="button" class="inner-link" title="Imprimer">Imprimer</button></li> 
142        <li class="interior-article-footer-item interior-article-mail"><button type="button" class="inner-link" title="Partager par mail">Partager par mail</button></li> 
143        <li class="interior-article-footer-item interior-article-twitter"><button type="button" class="inner-link" title="Partager sur Twitter">Partager sur Twitter</button></li> 
144        <li class="interior-article-footer-item interior-article-facebook"><button type="button" class="inner-link" title="Partager sur Facebook">Partager sur Facebook</button></li> 
145        </ul> 
146    </footer> 
147     
148</div> 
149 
150<#-- FOOTER CONTACT --> 
151 
152<footer class="interior-content-footer interior-content-footer-displayed"> 
153     
154    <#if relatedAssetTypedLists[typeJournalArticle]?? && relatedAssetTypedLists[typeJournalArticle]?has_content > 
155        <@getTypedRelatedAssets relatedAssetTypedLists=relatedAssetTypedLists type=typeJournalArticle structure="CDA_CONTACT_SERVICE" /> 
156    <#else> 
157        <@getDefaultFooterContact /> 
158    </#if> 
159 
160</footer> 
161 
162 
163<#--************************************* 
164** MEDIA DISPLAY 
165*************************************--> 
166 
167<#macro getMedia media urlIframePortlet> 
168     
169    <#local mediaSrc = media.getData()/> 
170     
171    <#if mediaSrc != '' || urlIframePortlet != ''> 
172         
173        <#local mediaType = media.media_type.getData() /> 
174        <#assign carouselWrapper = "" /> 
175        <#if mediaType == "carousel"> 
176            <#assign carouselWrapper = "interior-article-media-carousel-wrapper" /> 
177        </#if> 
178        <#local width = media.width.getData() /> 
179        <#local displayWidth = '' /> 
180        <#if width == 'null'> 
181            <#local displayWidth = '' /> 
182        <#elseif width != ""> 
183            <#local displayWidth = 'style="width:'+width+'px;"' /> 
184        </#if> 
185         
186        <#local height = media.height.getData() /> 
187        <#if height == 'null'> 
188            <#local height = '' /> 
189        </#if> 
190        <#local displayMode = media.display_mode.getData() /> 
191        <#local imgMini = media.img_mini.getData() /> 
192        <#local alignment = media.alignment.getData() /> 
193        <#local legend = media.legend.getData() /> 
194        <#local altText = media.alt_text.getData() /> 
195        <#if altText == 'null'> 
196            <#local altText = '' /> 
197        </#if> 
198         
199        <figure class="interior-article-media interior-article-media-${alignment} ${carouselWrapper}" ${displayWidth}> 
200             
201            <#switch mediaType> 
202                <#case "image"> 
203                    <#if displayMode == "normal"> 
204                       <@getImageMedia mediaSrc=mediaSrc urlIframePortlet=urlIframePortlet altText=altText height=height /> 
205                    <#elseif displayMode == "popup"> 
206                        <@getImageMediaPopup imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height /> 
207                    </#if> 
208                    <#break > 
209                <#case "video"> 
210                    <#if displayMode == "normal"> 
211                       <@getVideoMedia imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height /> 
212                    <#elseif displayMode == "popup"> 
213                        <@getVideoMediaPopup imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height /> 
214                    </#if> 
215                    <#break > 
216                <#case "pdf"> 
217                    <#if displayMode == "normal"> 
218                       <@getPdfMedia mediaSrc=mediaSrc height=height /> 
219                    <#elseif displayMode == "popup"> 
220                        <@getPdfMediaPopup imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height /> 
221                    </#if> 
222                    <#break > 
223                <#case "iframe"> 
224                    <#if displayMode == "normal"> 
225                       <@getIframeMedia urlIframePortlet=urlIframePortlet height=height /> 
226                    <#elseif displayMode == "popup"> 
227                        <@getIframeMediaPopup imgMini=imgMini urlIframePortlet=urlIframePortlet altText=altText height=height /> 
228                    </#if> 
229                    <#break > 
230                <#case "svg"> 
231                    <#if displayMode == "normal"> 
232                       <@getSvgMedia mediaSrc=mediaSrc height=height /> 
233                    <#elseif displayMode == "popup"> 
234                        <@getSvgMediaPopup imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height /> 
235                    </#if> 
236                    <#break > 
237                <#case "flash"> 
238                    <#if displayMode == "normal"> 
239                       <@getFlashMedia mediaSrc=mediaSrc height=height /> 
240                    <#elseif displayMode == "popup"> 
241                        <@getFlashMediaPopup imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height /> 
242                    </#if> 
243                    <#break > 
244                <#case "portlet"> 
245                    <#if displayMode == "normal"> 
246                       <@getPortletMedia urlIframePortlet=urlIframePortlet height=height /> 
247                    <#elseif displayMode == "popup"> 
248                        <@getPortletMediaPopup imgMini=imgMini urlIframePortlet=urlIframePortlet altText=altText height=height /> 
249                    </#if> 
250                    <#break > 
251                <#case "flickr"> 
252                    <#if displayMode == "normal"> 
253                       <@getFlickrMedia urlIframePortlet=urlIframePortlet /> 
254                    <#elseif displayMode == "popup"> 
255                        <@getFlickrMediaPopup imgMini=imgMini urlIframePortlet=urlIframePortlet altText=altText height=height /> 
256                    </#if> 
257                    <#break > 
258                <#case "gallery"> 
259                    <#if displayMode == "normal"> 
260                       <@getGalleryMedia mediaSrc=mediaSrc height=height /> 
261                    <#elseif displayMode == "popup"> 
262                        <@getGalleryMediaPopup imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height /> 
263                    </#if> 
264                    <#break > 
265                <#case "carousel"> 
266                    <#if displayMode == "normal"> 
267                       <@getCarouselMedia media=media mediaSrc=mediaSrc altText=altText height=height width=width /> 
268                       <#assign carouselNb = carouselNb + 1 /> 
269                    <#elseif displayMode == "popup"> 
270                        <@getCarouselMediaPopup imgMini=imgMini media=media mediaSrc=mediaSrc altText=altText height=height /> 
271                    </#if> 
272                    <#break > 
273                <#default> 
274            </#switch> 
275             
276            <#local hasLegend = legend?length != 0 /> 
277            <#if hasLegend> 
278                <figcaption class="interior-article-media-legend">${legend}</figcaption> 
279            </#if> 
280             
281        </figure> 
282         
283    </#if> 
284     
285</#macro> 
286 
287 
288<#macro getImageMedia mediaSrc urlIframePortlet altText height > 
289    <#local displayedHeight = '' /> 
290    <#if height != ""> 
291        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
292    </#if> 
293    <#if urlIframePortlet != ""> 
294        <#assign target = "href='"+ urlIframePortlet +"'" /> 
295        <#if !isInternalLink(urlIframePortlet)> 
296            <#assign target = target + " target='_blank' rel='noopener noreferrer'" /> 
297        </#if> 
298        <a ${target}> 
299    </#if> 
300    <img class="interior-article-media-image" src="${mediaSrc}" alt="${altText}" ${displayedHeight} /> 
301    <#if urlIframePortlet != ""> 
302        </a> 
303    </#if> 
304</#macro> 
305 
306 
307<#macro getImageMediaPopup imgMini mediaSrc altText height > 
308    <#local displayedHeight = '' /> 
309    <#if height != ""> 
310        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
311    </#if> 
312    <a class="link-img" href="${mediaSrc}" title="${altText}"> 
313        <img class="interior-article-media-image" src="${imgMini}" alt="${altText}" ${displayedHeight} /> 
314    </a> 
315</#macro> 
316 
317 
318<#macro getVideoMedia imgMini mediaSrc height altText> 
319    <#local displayedHeight = '' /> 
320    <#if height != ""> 
321        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
322    </#if> 
323    <video class="interior-article-media-video" itemprop="url" poster="${imgMini}" title="${htmlUtil.escapeAttribute(altText)}" alt="${htmlUtil.escapeAttribute(altText)}" controls="" preload="auto" ${displayedHeight} > 
324        <source itemprop="url" content="https://www2.larochelle-technopole.fr${mediaSrc}" src="${mediaSrc}" type="video/mp4"> 
325        <a href="${mediaSrc}" download="">${htmlUtil.escapeAttribute(altText)}</a> 
326    </video> 
327</#macro> 
328 
329 
330<#macro getVideoMediaPopup imgMini mediaSrc altText height > 
331    <#local displayedHeight = '' /> 
332    <#if height != ""> 
333        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
334    </#if> 
335    <a class="link-video" href="${mediaSrc}" title="${altText}"> 
336        <img class="interior-article-media-image" src="/cdalr-new-theme/images/blank.png" data-src="${imgMini}" alt="${htmlUtil.escapeAttribute(altText)}" ${displayedHeight} /> 
337    </a> 
338</#macro> 
339 
340 
341<#macro getPdfMedia mediaSrc altText height > 
342    <#local displayedHeight = '' /> 
343    <#if height != ""> 
344        <#local displayedHeight = 'style="height:'+height+'px;"' /> 
345    </#if> 
346    <iframe class="interior-article-media-iframe" src="${pdfViewer+mediaSrc}" title="${htmlUtil.escapeAttribute(altText)}" ${displayedHeight} allowfullscreen ></iframe> 
347</#macro> 
348 
349 
350<#macro getPdfMediaPopup imgMini mediaSrc altText height > 
351    <#local displayedHeight = '' /> 
352    <#if height != ""> 
353        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
354    </#if> 
355    <a class="link-pdf" href="${mediaSrc}"> 
356        <img class="interior-article-media-image" src="${imgMini}" alt="${altText}" ${displayedHeight} /> 
357    </a> 
358</#macro> 
359 
360 
361<#macro getIframeMedia urlIframePortlet height > 
362    <#local displayedHeight = '' /> 
363    <#if height != ""> 
364        <#local displayedHeight = 'style="height:'+height+'px;"' /> 
365    </#if> 
366    <iframe class="interior-article-media-iframe" src="${urlIframePortlet}" ${displayedHeight} allowfullscreen></iframe> 
367</#macro> 
368 
369 
370<#macro getIframeMediaPopup imgMini urlIframePortlet altText height > 
371    <#local displayedHeight = '' /> 
372    <#if height != ""> 
373        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
374    </#if> 
375    <a class="link-iframe" href="${urlIframePortlet}"> 
376        <img class="interior-article-media-image" src="${imgMini}" alt="${altText}" ${displayedHeight} /> 
377    </a> 
378</#macro> 
379 
380 
381<#macro getSvgMedia mediaSrc height > 
382 
383</#macro> 
384 
385 
386<#macro getSvgMediaPopup imgMini mediaSrc altText height > 
387 
388</#macro> 
389 
390 
391<#macro getFlashMedia mediaSrc height > 
392    <#local displayedHeight = '' /> 
393    <#if height != ""> 
394        <#local displayedHeight = 'style="height:'+height+'px;"' /> 
395    </#if> 
396    <object class="interior-article-media-object" type="application/x-shockwave-flash"  data="${mediaSrc}" ${displayedHeight}></object>  
397</#macro> 
398 
399 
400<#macro getFlashMediaPopup imgMini mediaSrc altText height > 
401    <#local displayedHeight = '' /> 
402    <#if height != ""> 
403        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
404    </#if> 
405    <a class="link-flash" href="${mediaSrc}"> 
406        <img class="interior-article-media-image" src="${imgMini}" alt="${altText}" ${displayedHeight} /> 
407    </a> 
408</#macro> 
409 
410 
411<#macro getPortletMedia urlIframePortlet height > 
412     
413    <#local displayedHeight = '' /> 
414    <#if height != ""> 
415        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
416    </#if> 
417     
418    <#local hasInstanceId = urlIframePortlet?contains('INSTANCE') /> 
419    <#local hasQueryString = urlIframePortlet?contains('?') /> 
420    <#local portletId = urlIframePortlet /> 
421    <#local queryString = '' /> 
422     
423    <#if hasInstanceId> 
424        <#local portletId = urlIframePortlet[0..(urlIframePortlet?index_of(instanceId))] /> 
425    </#if> 
426    <#if hasQueryString> 
427        <#local portletId = urlIframePortlet[0..(urlIframePortlet?index_of('?')-1)] /> 
428        <#local queryString = urlIframePortlet[(urlIframePortlet?index_of('?')+1)..] /> 
429    </#if> 
430     
431    <#local divId = "embedded-portlet-" + portletId /> 
432    <#local plid = themeDisplay.plid /> 
433     
434    <#if urlIframePortlet?contains('cdalrEService') || urlIframePortlet?contains('cdalrEservice') || urlIframePortlet?contains('cuCreate')> 
435        <#local queryString = queryString +"&p_l_id="+plid+"&p_p_lifecycle=0&p_p_mode=view&p_p_state=exclusive" /> 
436     
437        <div id="${divId}" class="embedded-portlet" data-portlet="${portletId}" data-querystring="${queryString}" data-remote-url="" ${displayedHeight}></div> 
438         
439    <#else> 
440         
441        <#local remoteUrl = "/c/portal/layout?p_l_id="+plid+"&p_p_id="+portletId+"&p_p_lifecycle=0&p_p_mode=view&p_p_state=exclusive"+queryString /> 
442         
443        <div id="${divId}" class="embedded-portlet" data-portlet="${portletId}" data-querystring="${queryString}" data-remote-url="${remoteUrl}" ${displayedHeight}></div> 
444         
445    </#if> 
446     
447</#macro> 
448 
449 
450<#macro getPortletMediaPopup imgMini urlIframePortlet altText height > 
451       
452    <#local divId = "embedded-portlet-" + urlIframePortlet /> 
453     
454    <#local displayedHeight = '' /> 
455    <#if height != ""> 
456        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
457    </#if> 
458     
459    <#local hasInstanceId = urlIframePortlet?contains('INSTANCE') /> 
460    <#local hasQueryString = urlIframePortlet?contains('?') /> 
461    <#local portletId = urlIframePortlet /> 
462    <#local queryString = '' /> 
463 
464    <#if hasInstanceId> 
465        <#local portletId = urlIframePortlet[0..(urlIframePortlet?index_of(instanceId))] /> 
466    </#if> 
467    <#if hasQueryString> 
468        <#local portletId = urlIframePortlet[0..(urlIframePortlet?index_of('?')-1)] /> 
469        <#local queryString = urlIframePortlet[(urlIframePortlet?index_of('?')+1)..] /> 
470    </#if> 
471     
472    <#if themeDisplay?? && themeDisplay.plid?? > 
473         
474        <#local plid = themeDisplay.plid /> 
475         
476        <#if urlIframePortlet?contains('cdalrEService') || urlIframePortlet?contains('cdalrEservice') > 
477            <#local queryString = queryString +"&p_l_id="+plid+"&p_p_lifecycle=0&p_p_mode=view&p_p_state=exclusive" /> 
478      
479            <#local formTitle = "" /> 
480            <#local formPictoClass = "" /> 
481            <#if urlIframePortlet?contains('FiberOpticalConnectionRequest')> 
482                <#local formTitle = "Demande d'information pour le raccordement à la fibre optique" /> 
483                <#local formPictoClass = "eservice-form-opener-picto-fiber" /> 
484            <#elseif urlIframePortlet?contains('AntContact')> 
485                <#local formTitle = "Contacter l'aménagement numérique du territoire" /> 
486                <#local formPictoClass = "eservice-form-opener-picto-contact" /> 
487            <#elseif urlIframePortlet?contains('ReinscriptionConservatoire')> 
488                <#local formTitle = "Formulaire de réinscription au conservatoire" /> 
489                <#local formPictoClass = "eservice-form-opener-picto-music" /> 
490            <#elseif urlIframePortlet?contains('ContactUs')> 
491                <#local formTitle = "Contacter l'agglo" /> 
492                <#local formPictoClass = "eservice-form-opener-picto-contact" /> 
493            <#elseif urlIframePortlet?contains('JobApplication')> 
494                <#local formTitle = "Postuler à une offre d'emploi" /> 
495                <#local formPictoClass = "eservice-form-opener-picto-job" /> 
496            <#elseif urlIframePortlet?contains('WastebinRepair')> 
497                <#local formTitle = "Demande de nouveau bac ou de réparation" /> 
498                <#local formPictoClass = "eservice-form-opener-picto-wastebin" /> 
499            <#elseif urlIframePortlet?contains('WastewaterConnection')> 
500                <#local formTitle = "Raccorder ou brancher mon installation au réseau d'eaux usées" /> 
501                <#local formPictoClass = "eservice-form-opener-picto-water" /> 
502            <#elseif urlIframePortlet?contains('WastesortingTour')> 
503                <#local formTitle = "Visiter le centre de tri" /> 
504                <#local formPictoClass = "eservice-form-opener-picto-altriane" /> 
505            </#if> 
506             
507            <div class="link-portlet eservice-form-opener" data-divId="${divId}" data-portlet="${portletId}" data-querystring="${queryString}" data-remote-url="" tabindex="0"> 
508                <div class="eservice-form-opener-picto ${formPictoClass}"></div> 
509                <p class="eservice-form-opener-text">${formTitle}</p> 
510            </div> 
511             
512        <#else> 
513             
514            <#local portletClass = "link-portlet" /> 
515            <#if urlIframePortlet?contains('19_WAR')> 
516                <#local portletClass = "link-portlet planning-cmd-opener" /> 
517            </#if> 
518            <#local remoteUrl = "/c/portal/layout?p_l_id="+plid+"&p_p_id="+portletId+"&p_p_lifecycle=0&p_p_mode=view&p_p_state=exclusive"+queryString /> 
519         
520            <div class="${portletClass}" data-divId="${divId}" data-portlet="${portletId}" data-querystring="${queryString}" data-remote-url="${remoteUrl}" tabindex="0"> 
521                <img class="interior-article-media-image" src="${imgMini}" alt="${altText}" ${displayedHeight} /> 
522            </div> 
523         
524        </#if> 
525         
526    </#if> 
527     
528</#macro> 
529 
530 
531<#macro getFlickrMedia urlIframePortlet > 
532    <div class="interior-article-media-flickr" data-embed-flickr='${urlIframePortlet}'></div> 
533</#macro> 
534 
535 
536<#macro getFlickrMediaPopup imgMini urlIframePortlet altText height > 
537    <#local displayedHeight = '' /> 
538    <#if height != ""> 
539        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
540    </#if> 
541    <div class="link-flickr" data-flickr='${urlIframePortlet}' tabindex="0"> 
542        <img class="interior-article-media-image" src="/cdalr-new-theme/images/blank.png" data-src="${imgMini}" alt="${altText}" ${displayedHeight} /> 
543    </div> 
544</#macro> 
545 
546 
547<#macro getGalleryMedia mediaSrc height > 
548 
549</#macro> 
550 
551 
552<#macro getGalleryMediaPopup imgMini mediaSrc altText height > 
553 
554</#macro> 
555 
556 
557<#macro getCarouselMedia media mediaSrc altText height width >  
558     
559    <#local ratioDisplay = "" /> 
560    <#if height != "" && width != "" > 
561        <#local ratio = height?number / width?number * 100 /> 
562        <#local ratioDisplay = 'style="padding-top:' + ratio + '%"' /> 
563    </#if> 
564     
565    <div class="carousel" id="carousel-${carouselNb}" data-carousel="carousel-${carouselNb}" ${ratioDisplay}> 
566         
567        <button type="button" id="carousel-${carouselNb}-arrow-prev" data-carousel="carousel-${carouselNb}" data-direction="prev" class="carousel-arrow carousel-arrow-prev">Image précédente</button> 
568        <button type="button" id="carousel-${carouselNb}-arrow-next" data-carousel="carousel-${carouselNb}" data-direction="next" class="carousel-arrow carousel-arrow-next">Image suivante</button> 
569 
570        <img id="carousel-${carouselNb}-img-0" data-carousel="carousel-${carouselNb}" data-img="0" class="carousel-img carousel-img-displayed" src="/cdalr-new-theme/images/blank.png" data-src="${mediaSrc}" alt="${altText}"> 
571 
572        <#if media.media_more??> 
573            <#list media.media_more.getSiblings() as node> 
574                <img id="carousel-${carouselNb}-img-${node_index+1}" data-carousel="carousel-${carouselNb}" data-img="${node_index+1}" class="carousel-img carousel-img-noDisplay" src="/cdalr-new-theme/images/blank.png" data-src="${node.getData()}" alt="${altText}"> 
575            </#list> 
576        </#if> 
577 
578    </div> 
579 
580</#macro> 
581 
582 
583<#macro getCarouselMediaPopup imgMini media mediaSrc altText height > 
584    <#local diapos = mediaSrc /> 
585    <#if media.media_more??> 
586        <#list media.media_more.getSiblings() as node> 
587            <#if node_index != 0> 
588                <#local diapos = diapos + "," /> 
589            </#if> 
590            <#local diapos = diapos + node.getData() /> 
591        </#list> 
592    </#if> 
593    <#local displayedHeight = '' /> 
594    <#if height != ""> 
595        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
596    </#if> 
597    <a class="link-diapo popup-img-opener" href="${mediaSrc}" title="${htmlUtil.escapeAttribute(altText)}" data-diapos="${diapos}"> 
598        <img class="interior-article-media-image" src="/cdalr-new/images/blank.png" data-src="${imgMini}" alt="${htmlUtil.escapeAttribute(altText)}" ${displayedHeight} /> 
599    </a> 
600</#macro> 
601 
602 
603<#--************************************* 
604**  RELATED CONTENT 
605*************************************--> 
606 
607<#function buildRelatedAssetTypedLists entry info > 
608    <#assign relatedAssetTypedLists = {} /> 
609    <#assign infos = "" /> 
610    <#assign assetLinks = assetLinkLocalService.getDirectLinks(entry.getEntryId()) /> 
611 
612    <#list assetLinks as assetLink> 
613        <#if assetLink.getEntryId1() == entry.getEntryId() > 
614            <#assign assetLinkEntry = assetEntryLocalService.getEntry(assetLink.getEntryId2()) /> 
615        <#else> 
616            <#assign assetLinkEntry = assetEntryLocalService.getEntry(assetLink.getEntryId1()) /> 
617        </#if> 
618         
619        <#if assetLinkEntry?? && assetLinkEntry.isVisible() > 
620            <#assign linkedAssetRenderer = assetLinkEntry.getAssetRenderer() /> 
621     
622            <#if linkedAssetRenderer.hasViewPermission(permissionChecker) > 
623             
624                <#assign type = assetLinkEntry.getClassName() /> 
625                 
626                <#assign newEntry = [{"assetEntry":assetLinkEntry,"assetLink":assetLink}] /> 
627                <#if relatedAssetTypedLists?keys?seq_contains(type)> 
628                    <#assign relatedAssetTypedList = relatedAssetTypedLists[type] + newEntry /> 
629                <#else> 
630                    <#assign relatedAssetTypedList = newEntry /> 
631                </#if> 
632                <#assign relatedAssetTypedLists = relatedAssetTypedLists + {type : relatedAssetTypedList} /> 
633                <#-- 
634                <#assign infos> 
635                    ${infos} ${type}=${relatedAssetTypedLists[type]?size}  (${newEntry?first.getClassPK()}) <br/> 
636                </#assign> 
637                --> 
638            </#if> 
639        </#if> 
640    </#list> 
641     
642    <#if info == "true"> 
643        <#return infos /> 
644    <#else> 
645        <#return relatedAssetTypedLists /> 
646    </#if> 
647    <#return {} /> 
648</#function> 
649 
650 
651<#macro getCustomRelatedAssets relatedAssetTypedLists> 
652    <#local hasRelatedAssets = "false" /> 
653    <#if relatedAssetTypedLists[typeBookmarksEntry]?? && relatedAssetTypedLists[typeBookmarksEntry]?size != 0> 
654        <#local hasRelatedAssets = "true" /> 
655    </#if> 
656    <#if relatedAssetTypedLists[typeDLFileEntry]?? && relatedAssetTypedLists[typeDLFileEntry]?size != 0> 
657        <#local hasRelatedAssets = "true" /> 
658    </#if> 
659    <#-- 
660    <#if relatedAssetTypedLists[typeJournalArticle]?? && relatedAssetTypedLists[typeJournalArticle]?has_content > 
661        <#local webContentNb = getRelatedWebContentNb(relatedAssetTypedLists[typeJournalArticle]) /> 
662        <#if webContentNb != 0> 
663            <#local hasRelatedAssets = "true" /> 
664        </#if> 
665    </#if> 
666    --> 
667    <#if hasRelatedAssets == "true" > 
668        <aside class="interior-article-moreContent-container"> 
669            <p class="interior-article-moreContent-title">En savoir plus</p> 
670            <#if relatedAssetTypedLists[typeBookmarksEntry]?? && relatedAssetTypedLists[typeBookmarksEntry]?has_content > 
671                <@getTypedRelatedAssets relatedAssetTypedLists=relatedAssetTypedLists type=typeBookmarksEntry structure=""/> 
672            </#if> 
673            <#if relatedAssetTypedLists[typeDLFileEntry]?? && relatedAssetTypedLists[typeDLFileEntry]?has_content > 
674                <@getTypedRelatedAssets relatedAssetTypedLists=relatedAssetTypedLists type=typeDLFileEntry structure="" /> 
675            </#if> 
676        </aside> 
677    </#if> 
678</#macro> 
679 
680 
681<#macro getTypedRelatedAssets relatedAssetTypedLists type structure> 
682    <#if type == typeJournalArticle && structure == "CDA_ZOOM_SUR" > 
683        <@getRelatedZoomSur assets=relatedAssetTypedLists[type] /> 
684    <#elseif type == typeJournalArticle && structure == "CDA_CONTACT_SERVICE" > 
685        <@getRelatedFooterContact assets=relatedAssetTypedLists[type] /> 
686    <#elseif type == typeBookmarksEntry > 
687        <@getRelatedPages assets=relatedAssetTypedLists[type] /> 
688    <#elseif type == typeDLFileEntry > 
689        <@getRelatedDocuments assets=relatedAssetTypedLists[type] /> 
690    </#if> 
691</#macro> 
692 
693 
694<#macro getRelatedZoomSur assets> 
695    <#if assets?size != 0> 
696        <#list assets as assetMap> 
697            <#local asset = assetMap.assetEntry /> 
698            <#local article = journalArticleLocalService.getLatestArticle(asset.getClassPK()) /> 
699            <#assign strucName = journalStructureLocalService.getStructure(article.groupId, jaClassNameId, article.structureId?string, true).getName(locale) /> 
700            <#if strucName == 'CDA_ZOOM_SUR'> 
701                <#local img = getField(article,"back_img")/> 
702                <#local url = getField(article,"url_link")/> 
703                <#local target = "href='"+ url +"'" /> 
704                <#if !isInternalLink(url)> 
705                    <#local target = target + " target='_blank' rel='noopener noreferrer'" /> 
706                </#if> 
707                <div class="article-header-alert"> 
708                    <#if url != ""> 
709                        <a class="inner-link" ${target}> 
710                    </#if> 
711                    <img src="${img}" alt="${asset.getTitleCurrentValue()}"/> 
712                    <h3 class="article-header-alert-title">${asset.getTitleCurrentValue()}</h3> 
713                    <#if url != ""> 
714                        </a> 
715                    </#if> 
716                </div> 
717            </#if> 
718        </#list> 
719    </#if> 
720</#macro> 
721 
722<#macro getRelatedFooterContact assets> 
723    <#if assets?size == 0> 
724        <@getDefaultFooterContact /> 
725    <#else> 
726        <#local hasContactFooter = false /> 
727        <#list assets as assetMap> 
728            <#local asset = assetMap.assetEntry /> 
729            <#local article = journalArticleLocalService.getLatestArticle(asset.getClassPK()) /> 
730            <#assign strucName = journalStructureLocalService.getStructure(article.groupId, jaClassNameId, article.structureId?string, true).getName(locale) /> 
731            <#if strucName == 'CDA_CONTACT_SERVICE'> 
732                <#local contact_service = getField(article,"Contact_service")/> 
733                <#local adresse = getField(article,"Adresse")/> 
734                <#local cp = getField(article,"CP")/> 
735                <#local ville = getField(article,"Ville")/> 
736                <#local telephone = getField(article,"Telephone")/> 
737                <#if telephone==""> 
738                    <#local telephone = "05 46 30 34 00" /> 
739                </#if> 
740                <#local courriel = getField(article,"Courriel")/> 
741                <#local annuaire = getField(article,"annuaire_link")/> 
742                <#if annuaire==""> 
743                    <#local annuaire = "/annuaire-des-services"/> 
744                </#if> 
745                <a class="interior-content-footer-contact interior-content-footer-service" href="${annuaire}"> 
746                    Contact<br/> 
747                    ${asset.getTitle(locale)} 
748                </a> 
749                <p class="interior-content-footer-contact interior-content-footer-address"> 
750                    <span class="interior-content-footer-contact-inner">${adresse}<br/>${cp} ${ville}</span> 
751                </p> 
752                <p class="interior-content-footer-contact interior-content-footer-phone"> 
753                    <span class="interior-content-footer-contact-inner">${telephone}</span> 
754                </p> 
755                <a class="interior-content-footer-contact interior-content-footer-email" href="mailto:${courriel}?subject=Contact%20site%20Agglo"> 
756                    <span class="interior-content-footer-contact-inner">Envoyer un courriel</span> 
757                </a> 
758                <a class="interior-content-footer-annuaire" href="${annuaire}">Annuaire des services</a> 
759                <#local hasContactFooter = true /> 
760                <#break /> 
761            </#if> 
762        </#list> 
763        <#if hasContactFooter == false> 
764            <@getDefaultFooterContact /> 
765        </#if> 
766    </#if> 
767</#macro> 
768 
769 
770<#macro getDefaultFooterContact > 
771    <a class="interior-content-footer-contact interior-content-footer-service" href="/annuaire-des-services"> 
772        Contact<br/> 
773        Agglo La Rochelle 
774    </a> 
775    <p class="interior-content-footer-contact interior-content-footer-address"> 
776        <span class="interior-content-footer-contact-inner">6, rue Saint-Michel<br/>17000 La Rochelle</span> 
777    </p> 
778    <p class="interior-content-footer-contact interior-content-footer-phone"> 
779        <span class="interior-content-footer-contact-inner">05 46 30 34 00</span> 
780    </p> 
781    <a class="interior-content-footer-contact interior-content-footer-email" href="/contacter-l-agglo"> 
782        <span class="interior-content-footer-contact-inner">Envoyer un courriel</span> 
783    </a> 
784    <a class="interior-content-footer-annuaire" href="/annuaire-des-services">Annuaire des services</a> 
785</#macro> 
786 
787 
788<#function getRelatedWebContentNb assets> 
789    <#local nb = 0 /> 
790    <#if assets?size != 0> 
791        <#local nb = 0 /> 
792        <#list assets as assetMap> 
793            <#local asset = assetMap.assetEntry /> 
794            <#local article = journalArticleLocalService.getLatestArticle(asset.getClassPK()) /> 
795            <#assign strucName = journalStructureLocalService.getStructure(article.groupId, jaClassNameId, article.structureId?string, true).getName(locale) /> 
796            <#if strucName != 'CDA_CONTACT_SERVICE' && strucName != 'CDA_ZOOM_SUR'> 
797                <#local nb = nb + 1 /> 
798            </#if> 
799        </#list> 
800    </#if> 
801    <#return nb /> 
802</#function> 
803 
804 
805<#macro getRelatedPages assets> 
806    <ul> 
807        <#local orderedAssets = getOrderedAssets(assets) /> 
808        <#list orderedAssets?reverse as assetMap> 
809            <#local asset = assetMap.assetEntry /> 
810            <#local assetLink = assetMap.assetLink /> 
811            <#local linkedAssetRenderer = asset.getAssetRenderer() /> 
812            <#local assetLinkEntryTitle = asset.getTitle(locale) /> 
813            <#local assetLinkEntryDescription = asset.getDescription() /> 
814            <#local assetLinkBookmark = bookmarksEntryLocalService.getEntry(asset.getClassPK()) /> 
815            <#local assetURL = assetLinkBookmark.getUrl() /> 
816             
817            <#local target = "" /> 
818            <#if assetURL?contains('widget') || assetURL?contains('iframe') || assetURL?contains('embed') > 
819                <#local target = " data-iframe='true' href='"+ assetURL +"' class='link-iframe'" /> 
820            <#else> 
821                <#local target = "href='"+ assetURL +"'" /> 
822                <#if !isInternalLink(assetURL)> 
823                    <#local target = target + " target='_blank' rel='noopener noreferrer'" /> 
824                </#if> 
825            </#if> 
826 
827            <li class="interior-article-moreContent" data-entry-id="${asset.getEntryId()}"><a ${target} title="${htmlUtil.escapeAttribute(assetLinkEntryDescription)}">${assetLinkEntryTitle}</a></li> 
828       </#list> 
829   </ul> 
830</#macro> 
831 
832 
833<#macro getRelatedDocuments assets> 
834     
835    <#assign folderNb = 0 /> 
836    <#local orderedAssets = getOrderedAssets(assets) /> 
837    <#local collapsedFolders = false /> 
838     
839    <#list orderedAssets?reverse as assetMap> 
840     
841        <#local asset = assetMap.assetEntry /> 
842        <#local fileEntry = dlFileEntryLocalService.getFileEntry(asset.getClassPK()) /> 
843 
844        <#local documents = dlFileEntryLocalService.getFileEntries(fileEntry.getGroupId(),fileEntry.getFolderId()) /> 
845        <#local folder = fileEntry.getFolder() /> 
846        <#local folderDescription = folder.getDescription()/> 
847        <#if folderDescription != ""> 
848            <#if documents?size &gt; 5> 
849                <#local collapsedFolders = true /> 
850            </#if> 
851        </#if> 
852    </#list> 
853     
854    <#list orderedAssets?reverse as assetMap> 
855     
856        <#local asset = assetMap.assetEntry /> 
857        <#local fileEntry = dlFileEntryLocalService.getFileEntry(asset.getClassPK()) /> 
858 
859        <#local documents = dlFileEntryLocalService.getFileEntries(fileEntry.getGroupId(),fileEntry.getFolderId()) /> 
860        <#local folder = fileEntry.getFolder() /> 
861        <#local folderDescription = folder.getDescription()/> 
862        <#if folderDescription != ""> 
863            <#if collapsedFolders == true> 
864                <input type="checkbox" class="interior-article-moreContent-checkbox" id="interior-article-moreContent-checkbox-${folderNb}" name="interior-article-moreContent-checkbox-${folderNb}"> 
865                <p class="interior-article-moreContent-title"><label for="interior-article-moreContent-checkbox-${folderNb}">${folderDescription}</label></p> 
866                <#assign folderNb = folderNb + 1 /> 
867            <#else> 
868                <p class="interior-article-moreContent-title">${folderDescription}</p> 
869            </#if> 
870        </#if> 
871         
872        <ul class="interior-article-moreContent-list"> 
873            <#local orderedDocs = getOrderedDocs(documents) /> 
874            <#list orderedDocs?reverse as docEntry> 
875                 
876                <#if !docEntry.isInTrash()> 
877                     
878                    <#local assetDocEntry = assetEntryLocalService.getEntry(docEntry.getGroupId(),docEntry.getUuid()) /> 
879                     
880                    <#if assetDocEntry.getAssetRenderer()??> 
881                     
882                        <#local linkedAssetRenderer = assetDocEntry.getAssetRenderer() /> 
883                         
884                        <#local assetLinkEntryTitle = assetDocEntry.getTitle(locale) /> 
885                        <#local assetLinkEntryDescription = assetDocEntry.getDescription(locale) /> 
886                        <#local extension = docEntry.getLatestFileVersion(true).getExtension() /> 
887                         
888                        <#local assetURL = linkedAssetRenderer.getURLDownload(themeDisplay) /> 
889                         
890                        <#local extensionType = "" /> 
891                        <#switch extension> 
892                            <#case "pdf"> 
893                                <#local extensionType = "link-pdf" /> 
894                                <#break> 
895                            <#case "jpg"> 
896                                <#local extensionType = "link-img" /> 
897                                <#break> 
898                            <#case "png"> 
899                                <#local extensionType = "link-img" /> 
900                                <#break> 
901                            <#case "mp4"> 
902                                <#local extensionType = "link-video" /> 
903                                <#break> 
904                            <#case "swf"> 
905                                <#local extensionType = "link-flash" /> 
906                                <#break> 
907                            <#default> 
908                        </#switch> 
909                        <#assign dlFileEntry = docEntry.getLatestFileVersion(true)/> 
910                         
911                        <#local toDownload = "" /> 
912                        <#if assetLinkEntryTitle?contains("- téléchargement")> 
913                            <#local toDownload = "download" /> 
914                            <#if assetURL?contains("?version")> 
915                                <#local assetURL = assetURL + "&download=true" /> 
916                            <#else> 
917                                <#local assetURL = assetURL + "?download=true" /> 
918                            </#if> 
919                        </#if> 
920                         
921                        <#local target = " href='"+ assetURL +"'" /> 
922                         
923                        <li class="interior-article-moreContent" data-entry-id="${asset.entryId}"> 
924                           <a ${target} class="extension-${extension} ${extensionType}" title="${htmlUtil.escapeAttribute(assetLinkEntryDescription)}" ${toDownload} > 
925                                ${assetLinkEntryTitle} <span class="interior-article-moreContent-extension">${extension}</span> 
926                            </a>  
927                        </li> 
928                         
929                    </#if> 
930                     
931                </#if> 
932                 
933            </#list> 
934        </ul> 
935         
936    </#list> 
937     
938</#macro> 
939 
940 
941<#function getOrderedAssets assets> 
942    <#local orderedAssets = [] /> 
943    <#local assetsWithDate = [] /> 
944    <#list assets as assetMap> 
945        <#local asset = assetMap.assetEntry /> 
946        <#local modifiedDate = asset.getModifiedDate() /> 
947        <#local assetsWithDate = assetsWithDate + [{'assetMap':assetMap,'modifiedDate':modifiedDate}] /> 
948    </#list> 
949    <#list assetsWithDate?sort_by('modifiedDate') as orderedAsset> 
950        <#local orderedAssets = orderedAssets + [orderedAsset.assetMap] /> 
951    </#list> 
952    <#return orderedAssets> 
953</#function> 
954 
955<#function getOrderedDocs docs> 
956    <#local orderedDocs = [] /> 
957    <#local docsWithDate = [] /> 
958    <#list docs as docMap> 
959        <#local doc = assetEntryLocalService.getEntry(docMap.getGroupId(),docMap.getUuid()) /> 
960        <#local modifiedDate = doc.getModifiedDate() /> 
961        <#local docsWithDate = docsWithDate + [{'docMap':docMap,'modifiedDate':modifiedDate}] /> 
962    </#list> 
963    <#list docsWithDate?sort_by('modifiedDate') as orderedDoc> 
964        <#local orderedDocs = orderedDocs + [orderedDoc.docMap] /> 
965    </#list> 
966    <#return orderedDocs> 
967</#function> 
968 
969 
970<#function isInternalLink link> 
971  <#local internal = link?contains(".agglo-larochelle.fr") || !link?contains("//")> 
972  <#return internal> 
973</#function> 
974 
975 
976<#function getField journalArticle fieldName> 
977    <#local fieldValue = ''/> 
978     <#local document = saxReaderUtil.read(journalArticle.getContent()) /> 
979     <#local rootElement = document.getRootElement() /> 
980     <#if (rootElement?? && rootElement?has_content)> 
981        <#local xPathSelector =  saxReaderUtil.createXPath("dynamic-element[@name='"+fieldName+"']/dynamic-content") /> 
982        <#if (validator.isNotNull(xPathSelector))> 
983        <#local nbNodes = xPathSelector.selectNodes(rootElement)?size /> 
984        <#if (nbNodes &gt; 0)> 
985            <#local fieldValue = xPathSelector.selectSingleNode(rootElement).getStringValue() /> 
986        </#if> 
987     </#if> 
988     <#return fieldValue /> 
989     </#if> 
990</#function>