Retour

Maison de l'étudiant

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