La Rochelle Université

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