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 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>","")} 
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>","")} 
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>","")} 
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" href="/tableau-de-bord" title="Gérer mon profil">Mon profil</a></li> 
161        <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> 
162        <li class="interior-article-footer-item interior-article-print"><button type="button" class="inner-link" title="Imprimer">Imprimer</button></li> 
163        <li class="interior-article-footer-item interior-article-mail"><button type="button" class="inner-link" title="Partager par mail">Partager par mail</button></li> 
164        <li class="interior-article-footer-item interior-article-linkedin"><button type="button" class="inner-link" title="Partager sur LinkedIn">Partager sur LinkedIn</button></li> 
165        <li class="interior-article-footer-item interior-article-twitter"><button type="button" class="inner-link" title="Partager sur Twitter">Partager sur Twitter</button></li> 
166        <li class="interior-article-footer-item interior-article-facebook"><button type="button" class="inner-link" title="Partager sur Facebook">Partager sur Facebook</button></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        <figure class="interior-article-media interior-article-media-${alignment} ${carouselWrapper}" ${displayWidth}> 
222             
223            <#switch mediaType> 
224                <#case "image"> 
225                    <#if displayMode == "normal"> 
226                       <@getImageMedia mediaSrc=mediaSrc urlIframePortlet=urlIframePortlet altText=altText height=height width=width /> 
227                    <#elseif displayMode == "popup"> 
228                        <@getImageMediaPopup imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height width=width /> 
229                    </#if> 
230                    <#break > 
231                <#case "video"> 
232                    <#if displayMode == "normal"> 
233                       <@getVideoMedia imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height width=width /> 
234                    <#elseif displayMode == "popup"> 
235                        <@getVideoMediaPopup imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height width=width /> 
236                    </#if> 
237                    <#break > 
238                <#case "pdf"> 
239                    <#if displayMode == "normal"> 
240                       <@getPdfMedia mediaSrc=mediaSrc height=height /> 
241                    <#elseif displayMode == "popup"> 
242                        <@getPdfMediaPopup imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height width=width /> 
243                    </#if> 
244                    <#break > 
245                <#case "iframe"> 
246                    <#if displayMode == "normal"> 
247                       <@getIframeMedia urlIframePortlet=urlIframePortlet altText=altText height=height /> 
248                    <#elseif displayMode == "popup"> 
249                        <@getIframeMediaPopup imgMini=imgMini urlIframePortlet=urlIframePortlet altText=altText height=height width=width /> 
250                    </#if> 
251                    <#break > 
252                <#case "svg"> 
253                    <#if displayMode == "normal"> 
254                       <@getSvgMedia mediaSrc=mediaSrc height=height /> 
255                    <#elseif displayMode == "popup"> 
256                        <@getSvgMediaPopup imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height /> 
257                    </#if> 
258                    <#break > 
259                <#case "flash"> 
260                    <#if displayMode == "normal"> 
261                       <@getFlashMedia mediaSrc=mediaSrc height=height /> 
262                    <#elseif displayMode == "popup"> 
263                        <@getFlashMediaPopup imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height /> 
264                    </#if> 
265                    <#break > 
266                <#case "portlet"> 
267                    <#if displayMode == "normal"> 
268                       <@getPortletMedia urlIframePortlet=urlIframePortlet height=height /> 
269                    <#elseif displayMode == "popup"> 
270                        <@getPortletMediaPopup imgMini=imgMini urlIframePortlet=urlIframePortlet altText=altText height=height width=width /> 
271                    </#if> 
272                    <#break > 
273                <#case "flickr"> 
274                    <#if displayMode == "normal"> 
275                       <@getFlickrMedia urlIframePortlet=urlIframePortlet /> 
276                    <#elseif displayMode == "popup"> 
277                        <@getFlickrMediaPopup imgMini=imgMini urlIframePortlet=urlIframePortlet altText=altText height=height /> 
278                    </#if> 
279                    <#break > 
280                <#case "gallery"> 
281                    <#if displayMode == "normal"> 
282                       <@getGalleryMedia mediaSrc=mediaSrc height=height /> 
283                    <#elseif displayMode == "popup"> 
284                        <@getGalleryMediaPopup imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height /> 
285                    </#if> 
286                    <#break > 
287                <#case "carousel"> 
288                    <#if displayMode == "normal"> 
289                       <@getCarouselMedia media=media mediaSrc=mediaSrc altText=altText height=height width=width /> 
290                       <#assign carouselNb = carouselNb + 1 /> 
291                    <#elseif displayMode == "popup"> 
292                        <@getCarouselMediaPopup imgMini=imgMini media=media mediaSrc=mediaSrc altText=altText height=height width=width /> 
293                    </#if> 
294                    <#break > 
295                <#case "audio"> 
296                    <@getAudioMedia mediaSrc=mediaSrc altText=altText /> 
297                    <#break > 
298                <#default> 
299            </#switch> 
300             
301            <#local hasLegend = legend?length != 0 /> 
302            <#if hasLegend> 
303                <figcaption class="interior-article-media-legend">${legend}</figcaption> 
304            </#if> 
305             
306        </figure> 
307         
308    </#if> 
309     
310</#macro> 
311 
312 
313<#macro getImageMedia mediaSrc urlIframePortlet altText height width > 
314    <#local displayedHeight = '' /> 
315    <#if height != ""> 
316        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
317    </#if> 
318    <#if urlIframePortlet != ""> 
319        <#assign target = "href='"+ urlIframePortlet +"'" /> 
320        <#if !isInternalLink(urlIframePortlet)> 
321            <#assign target = target + " target='_blank' rel='noopener noreferrer'" /> 
322        </#if> 
323        <a ${target}> 
324    </#if> 
325    <img class="interior-article-media-image" src="${mediaSrc}" alt="${altText}" ${displayedHeight} <#if width!=""> width="${width}"</#if> <#if height!=""> height="${height}"</#if> /> 
326    <#if urlIframePortlet != ""> 
327        </a> 
328    </#if> 
329</#macro> 
330 
331 
332<#macro getImageMediaPopup imgMini mediaSrc altText height width > 
333    <#local displayedHeight = '' /> 
334    <#if height != ""> 
335        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
336    </#if> 
337    <a class="link-img" href="${mediaSrc}" title="${altText}"> 
338        <img class="interior-article-media-image" src="${imgMini}" alt="${altText}" ${displayedHeight} <#if width!=""> width="${width}"</#if> <#if height!=""> height="${height}"</#if> /> 
339    </a> 
340</#macro> 
341 
342 
343<#macro getVideoMedia imgMini mediaSrc height altText width> 
344    <#local displayedHeight = '' /> 
345    <#if height != ""> 
346        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
347    </#if> 
348    <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> > 
349        <source itemprop="url" content="https://www2.larochelle-technopole.fr${mediaSrc}" src="${mediaSrc}" type="video/mp4"> 
350        <a href="${mediaSrc}" download="">${htmlUtil.escapeAttribute(altText)}</a> 
351    </video> 
352</#macro> 
353 
354 
355<#macro getVideoMediaPopup imgMini mediaSrc altText height width > 
356    <#local displayedHeight = '' /> 
357    <#if height != ""> 
358        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
359    </#if> 
360    <a class="link-video" href="${mediaSrc}" title="${altText}"> 
361        <img class="interior-article-media-image" src="/cdalr-new-theme/images/blank.png" data-src="${imgMini}" alt="${htmlUtil.escapeAttribute(altText)}" ${displayedHeight} <#if width!=""> width="${width}"</#if> <#if height!=""> height="${height}"</#if> /> 
362    </a> 
363</#macro> 
364 
365 
366<#macro getAudioMedia mediaSrc altText> 
367    <audio class="interior-article-media-audio" title="${htmlUtil.escapeAttribute(altText)}" alt="${htmlUtil.escapeAttribute(altText)}" controls="" > 
368        <source src="${mediaSrc}" type="audio/mpeg"> 
369        <a href="${mediaSrc}" download="">${htmlUtil.escapeAttribute(altText)}</a> 
370    </audio> 
371</#macro> 
372 
373 
374<#macro getPdfMedia mediaSrc altText height > 
375    <#local displayedHeight = '' /> 
376    <#if height != ""> 
377        <#local displayedHeight = 'style="height:'+height+'px;"' /> 
378    </#if> 
379    <iframe class="interior-article-media-iframe" src="${pdfViewer+mediaSrc}" title="${htmlUtil.escapeAttribute(altText)}" ${displayedHeight} allowfullscreen ></iframe> 
380</#macro> 
381 
382 
383<#macro getPdfMediaPopup imgMini mediaSrc altText height width > 
384    <#local displayedHeight = '' /> 
385    <#if height != ""> 
386        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
387    </#if> 
388    <a class="popup-img-opener" href="${mediaSrc}" title="${htmlUtil.escapeAttribute(altText)}" target="_blank" rel="noopener noreferrer"> 
389        <img class="interior-article-media-image" src="/cdalr-new-theme/images/blank.png" data-src="${imgMini}" alt="${htmlUtil.escapeAttribute(altText)}" ${displayedHeight} <#if width!=""> width="${width}"</#if> <#if height!=""> height="${height}"</#if> /> 
390    </a> 
391</#macro> 
392 
393 
394<#macro getIframeMedia urlIframePortlet altText height > 
395    <#local displayedHeight = '' /> 
396    <#if height != ""> 
397        <#local displayedHeight = 'style="height:'+height+'px;"' /> 
398    </#if> 
399    <#if urlIframePortlet?contains("youtube")> 
400        <#local youtubeId = urlIframePortlet?substring(urlIframePortlet?index_of("embed/")+6) /> 
401        <div class="interior-article-media-youtube-blocker" ${displayedHeight}> 
402            <div class="youtube-blocker-img-wrapper"> 
403                <img class="youtube-blocker-img" src="https://img.youtube.com/vi/${youtubeId}/0.jpg" alt="${htmlUtil.escapeAttribute(altText)}" /> 
404            </div> 
405            <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> 
406            <div class="youtube-blocker-btn-wrapper"> 
407                <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> 
408                <a href="https://www.youtube.com/static?template=terms&gl=FR" class="youtube-blocker-btn" target="_blank" rel="noopener noreferrer">En savoir plus</a> 
409            </div> 
410        </div> 
411    <#else> 
412        <#local scrolling = '' /> 
413        <#if altText == "no-scrolling"> 
414            <#local scrolling = 'scrolling="no"' /> 
415        </#if> 
416        <iframe class="interior-article-media-iframe" data-src="${urlIframePortlet}" title="${htmlUtil.escapeAttribute(altText)}" ${displayedHeight} allowfullscreen ${scrolling} ></iframe> 
417    </#if> 
418</#macro> 
419 
420 
421<#macro getIframeMediaPopup imgMini urlIframePortlet altText height width > 
422    <#local displayedHeight = '' /> 
423    <#if height != ""> 
424        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
425    </#if> 
426    <a class="link-iframe" href="${urlIframePortlet}" target="_blank" rel="noopener noreferrer"> 
427        <img class="interior-article-media-image" src="${imgMini}" alt="${altText}" ${displayedHeight} <#if width!=""> width="${width}"</#if> <#if height!=""> height="${height}"</#if> /> 
428    </a> 
429</#macro> 
430 
431 
432<#macro getSvgMedia mediaSrc height > 
433 
434</#macro> 
435 
436 
437<#macro getSvgMediaPopup imgMini mediaSrc altText height > 
438 
439</#macro> 
440 
441 
442<#macro getFlashMedia mediaSrc height > 
443    <#local displayedHeight = '' /> 
444    <#if height != ""> 
445        <#local displayedHeight = 'style="height:'+height+'px;"' /> 
446    </#if> 
447    <object class="interior-article-media-object" type="application/x-shockwave-flash"  data="${mediaSrc}" ${displayedHeight}></object>  
448</#macro> 
449 
450 
451<#macro getFlashMediaPopup imgMini mediaSrc altText height > 
452    <#local displayedHeight = '' /> 
453    <#if height != ""> 
454        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
455    </#if> 
456    <a class="link-flash" href="${mediaSrc}"> 
457        <img class="interior-article-media-image" src="${imgMini}" alt="${altText}" ${displayedHeight} /> 
458    </a> 
459</#macro> 
460 
461 
462<#macro getPortletMedia urlIframePortlet height > 
463     
464    <#local displayedHeight = '' /> 
465    <#if height != ""> 
466        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
467    </#if> 
468     
469    <#local hasInstanceId = urlIframePortlet?contains('INSTANCE') /> 
470    <#local hasQueryString = urlIframePortlet?contains('?') /> 
471    <#local portletId = urlIframePortlet /> 
472    <#local queryString = '' /> 
473     
474    <#if hasInstanceId> 
475        <#local portletId = urlIframePortlet[0..(urlIframePortlet?index_of(instanceId))] /> 
476    </#if> 
477    <#if hasQueryString> 
478        <#local portletId = urlIframePortlet[0..(urlIframePortlet?index_of('?')-1)] /> 
479        <#local queryString = urlIframePortlet[(urlIframePortlet?index_of('?')+1)..] /> 
480    </#if> 
481     
482    <#local divId = "embedded-portlet-" + portletId /> 
483    <#local plid = themeDisplay.plid /> 
484     
485    <#if urlIframePortlet?contains('cdalrEService') || urlIframePortlet?contains('cdalrEservice') || urlIframePortlet?contains('cuCreate')> 
486        <#local queryString = queryString +"&p_l_id="+plid+"&p_p_lifecycle=0&p_p_mode=view&p_p_state=exclusive" /> 
487     
488        <div id="${divId}" class="embedded-portlet" data-portlet="${portletId}" data-querystring="${queryString}" data-remote-url="" ${displayedHeight}></div> 
489         
490    <#else> 
491         
492        <#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 /> 
493         
494        <div id="${divId}" class="embedded-portlet" data-portlet="${portletId}" data-querystring="${queryString}" data-remote-url="${remoteUrl}" ${displayedHeight}></div> 
495         
496    </#if> 
497     
498</#macro> 
499 
500 
501<#macro getPortletMediaPopup imgMini urlIframePortlet altText height width > 
502       
503    <#local divId = "embedded-portlet-" + urlIframePortlet /> 
504     
505    <#local displayedHeight = '' /> 
506    <#if height != ""> 
507        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
508    </#if> 
509     
510    <#local hasInstanceId = urlIframePortlet?contains('INSTANCE') /> 
511    <#local hasQueryString = urlIframePortlet?contains('?') /> 
512    <#local portletId = urlIframePortlet /> 
513    <#local queryString = '' /> 
514 
515    <#if hasInstanceId> 
516        <#local portletId = urlIframePortlet[0..(urlIframePortlet?index_of(instanceId))] /> 
517    </#if> 
518    <#if hasQueryString> 
519        <#local portletId = urlIframePortlet[0..(urlIframePortlet?index_of('?')-1)] /> 
520        <#local queryString = urlIframePortlet[(urlIframePortlet?index_of('?')+1)..] /> 
521    </#if> 
522     
523    <#if themeDisplay?? && themeDisplay.plid?? > 
524         
525        <#local plid = themeDisplay.plid /> 
526         
527        <#if urlIframePortlet?contains('cdalrEService') || urlIframePortlet?contains('cdalrEservice') > 
528            <#local queryString = queryString +"&p_l_id="+plid+"&p_p_lifecycle=0&p_p_mode=view&p_p_state=exclusive" /> 
529      
530            <#local formTitle = "" /> 
531            <#local formPictoClass = "" /> 
532            <#if urlIframePortlet?contains('FiberOpticalConnectionRequest')> 
533                <#local formTitle = "Demande d'information pour le raccordement à la fibre optique" /> 
534                <#local formPictoClass = "eservice-form-opener-picto-fiber" /> 
535            <#elseif urlIframePortlet?contains('AntContact')> 
536                <#local formTitle = "Contacter l'aménagement numérique du territoire" /> 
537                <#local formPictoClass = "eservice-form-opener-picto-contact" /> 
538            <#elseif urlIframePortlet?contains('ReinscriptionConservatoire')> 
539                <#local formTitle = "Formulaire de réinscription au conservatoire" /> 
540                <#local formPictoClass = "eservice-form-opener-picto-music" /> 
541            <#elseif urlIframePortlet?contains('ContactUs')> 
542                <#local formTitle = "Contacter l'agglo" /> 
543                <#local formPictoClass = "eservice-form-opener-picto-contact" /> 
544            <#elseif urlIframePortlet?contains('JobApplication')> 
545                <#local formTitle = "Postuler à une offre d'emploi" /> 
546                <#local formPictoClass = "eservice-form-opener-picto-job" /> 
547            <#elseif urlIframePortlet?contains('WastebinRepair')> 
548                <#local formTitle = "Demande de nouveau bac ou de réparation" /> 
549                <#local formPictoClass = "eservice-form-opener-picto-wastebin" /> 
550            <#elseif urlIframePortlet?contains('WastewaterConnection')> 
551                <#local formTitle = "Raccorder ou brancher mon installation au réseau d'eaux usées" /> 
552                <#local formPictoClass = "eservice-form-opener-picto-water" /> 
553            <#elseif urlIframePortlet?contains('WastesortingTour')> 
554                <#local formTitle = "Visiter le centre de tri" /> 
555                <#local formPictoClass = "eservice-form-opener-picto-altriane" /> 
556            </#if> 
557             
558            <div class="link-portlet eservice-form-opener" data-divId="${divId}" data-portlet="${portletId}" data-querystring="${queryString}" data-remote-url="" tabindex="0"> 
559                <div class="eservice-form-opener-picto ${formPictoClass}"></div> 
560                <p class="eservice-form-opener-text">${formTitle}</p> 
561            </div> 
562             
563        <#else> 
564             
565            <#local portletClass = "link-portlet" /> 
566            <#if urlIframePortlet?contains('19_WAR')> 
567                <#local portletClass = "link-portlet planning-cmd-opener" /> 
568            </#if> 
569            <#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 /> 
570         
571            <div class="${portletClass}" data-divId="${divId}" data-portlet="${portletId}" data-querystring="${queryString}" data-remote-url="${remoteUrl}" tabindex="0"> 
572                <img class="interior-article-media-image" src="${imgMini}" alt="${altText}" ${displayedHeight} <#if width!=""> width="${width}"</#if> <#if height!=""> height="${height}"</#if> /> 
573            </div> 
574         
575        </#if> 
576         
577    </#if> 
578     
579</#macro> 
580 
581 
582<#macro getFlickrMedia urlIframePortlet > 
583    <div class="interior-article-media-flickr" data-embed-flickr='${urlIframePortlet}'></div> 
584</#macro> 
585 
586 
587<#macro getFlickrMediaPopup imgMini urlIframePortlet altText height > 
588    <#local displayedHeight = '' /> 
589    <#if height != ""> 
590        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
591    </#if> 
592    <div class="link-flickr" data-flickr='${urlIframePortlet}' tabindex="0"> 
593        <img class="interior-article-media-image" src="/cdalr-new-theme/images/blank.png" data-src="${imgMini}" alt="${altText}" ${displayedHeight} /> 
594    </div> 
595</#macro> 
596 
597 
598<#macro getGalleryMedia mediaSrc height > 
599 
600</#macro> 
601 
602 
603<#macro getGalleryMediaPopup imgMini mediaSrc altText height > 
604 
605</#macro> 
606 
607 
608<#macro getCarouselMedia media mediaSrc altText height width >  
609     
610    <#local ratioDisplay = "" /> 
611    <#if height != "" && width != "" > 
612        <#local ratio = height?number / width?number * 100 /> 
613        <#local ratioDisplay = 'style="padding-top:' + ratio + '%"' /> 
614    </#if> 
615     
616    <div class="carousel" id="carousel-${carouselNb}" data-carousel="carousel-${carouselNb}" ${ratioDisplay}> 
617         
618        <button type="button" id="carousel-${carouselNb}-arrow-prev" data-carousel="carousel-${carouselNb}" data-direction="prev" class="carousel-arrow carousel-arrow-prev">Image précédente</button> 
619        <button type="button" id="carousel-${carouselNb}-arrow-next" data-carousel="carousel-${carouselNb}" data-direction="next" class="carousel-arrow carousel-arrow-next">Image suivante</button> 
620 
621        <img id="carousel-${carouselNb}-img-0" data-carousel="carousel-${carouselNb}" data-img="0" class="carousel-img carousel-img-displayed" src="/cdalr-new-theme/images/blank.png" data-src="${mediaSrc}" alt="${altText}"> 
622 
623        <#if media.media_more??> 
624            <#list media.media_more.getSiblings() as node> 
625                <img id="carousel-${carouselNb}-img-${node_index+1}" data-carousel="carousel-${carouselNb}" data-img="${node_index+1}" class="carousel-img carousel-img-noDisplay" src="/cdalr-new-theme/images/blank.png" data-src="${node.getData()}" alt="${altText}"> 
626            </#list> 
627        </#if> 
628 
629    </div> 
630 
631</#macro> 
632 
633 
634<#macro getCarouselMediaPopup imgMini media mediaSrc altText height width > 
635    <#local diapos = mediaSrc /> 
636    <#if media.media_more??> 
637        <#list media.media_more.getSiblings() as node> 
638            <#if node_index != 0> 
639                <#local diapos = diapos + "," /> 
640            </#if> 
641            <#local diapos = diapos + node.getData() /> 
642        </#list> 
643    </#if> 
644    <#local displayedHeight = '' /> 
645    <#if height != ""> 
646        <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 
647    </#if> 
648    <a class="link-diapo popup-img-opener" href="${mediaSrc}" title="${htmlUtil.escapeAttribute(altText)}" data-diapos="${diapos}"> 
649        <img class="interior-article-media-image" src="/cdalr-new/images/blank.png" data-src="${imgMini}" alt="${htmlUtil.escapeAttribute(altText)}" ${displayedHeight} <#if width!=""> width="${width}"</#if> <#if height!=""> height="${height}"</#if> /> 
650    </a> 
651</#macro> 
652 
653 
654<#--************************************* 
655**  RELATED CONTENT 
656*************************************--> 
657 
658<#function buildRelatedAssetTypedLists entry info > 
659    <#assign relatedAssetTypedLists = {} /> 
660    <#assign infos = "" /> 
661    <#assign assetLinks = assetLinkLocalService.getDirectLinks(entry.getEntryId()) /> 
662 
663    <#list assetLinks as assetLink> 
664        <#if assetLink.getEntryId1() == entry.getEntryId() > 
665            <#assign assetLinkEntry = assetEntryLocalService.getEntry(assetLink.getEntryId2()) /> 
666        <#else> 
667            <#assign assetLinkEntry = assetEntryLocalService.getEntry(assetLink.getEntryId1()) /> 
668        </#if> 
669         
670        <#if assetLinkEntry?? && assetLinkEntry.isVisible() > 
671            <#assign linkedAssetRenderer = assetLinkEntry.getAssetRenderer() /> 
672     
673            <#if linkedAssetRenderer.hasViewPermission(permissionChecker) > 
674             
675                <#assign type = assetLinkEntry.getClassName() /> 
676                 
677                <#assign newEntry = [{"assetEntry":assetLinkEntry,"assetLink":assetLink}] /> 
678                <#if relatedAssetTypedLists?keys?seq_contains(type)> 
679                    <#assign relatedAssetTypedList = relatedAssetTypedLists[type] + newEntry /> 
680                <#else> 
681                    <#assign relatedAssetTypedList = newEntry /> 
682                </#if> 
683                <#assign relatedAssetTypedLists = relatedAssetTypedLists + {type : relatedAssetTypedList} /> 
684                <#-- 
685                <#assign infos> 
686                    ${infos} ${type}=${relatedAssetTypedLists[type]?size}  (${newEntry?first.getClassPK()}) <br/> 
687                </#assign> 
688                --> 
689            </#if> 
690        </#if> 
691    </#list> 
692     
693    <#if info == "true"> 
694        <#return infos /> 
695    <#else> 
696        <#return relatedAssetTypedLists /> 
697    </#if> 
698    <#return {} /> 
699</#function> 
700 
701 
702<#macro getCustomRelatedAssets relatedAssetTypedLists> 
703    <#local hasRelatedAssets = "false" /> 
704    <#if relatedAssetTypedLists[typeBookmarksEntry]?? && relatedAssetTypedLists[typeBookmarksEntry]?size != 0> 
705        <#local hasRelatedAssets = "true" /> 
706    </#if> 
707    <#if relatedAssetTypedLists[typeDLFileEntry]?? && relatedAssetTypedLists[typeDLFileEntry]?size != 0> 
708        <#local hasRelatedAssets = "true" /> 
709    </#if> 
710    <#-- 
711    <#if relatedAssetTypedLists[typeJournalArticle]?? && relatedAssetTypedLists[typeJournalArticle]?has_content > 
712        <#local webContentNb = getRelatedWebContentNb(relatedAssetTypedLists[typeJournalArticle]) /> 
713        <#if webContentNb != 0> 
714            <#local hasRelatedAssets = "true" /> 
715        </#if> 
716    </#if> 
717    --> 
718    <#if hasRelatedAssets == "true" > 
719        <aside class="interior-article-moreContent-container"> 
720            <p class="interior-article-moreContent-title">En savoir plus</p> 
721            <#if relatedAssetTypedLists[typeBookmarksEntry]?? && relatedAssetTypedLists[typeBookmarksEntry]?has_content > 
722                <@getTypedRelatedAssets relatedAssetTypedLists=relatedAssetTypedLists type=typeBookmarksEntry structure=""/> 
723            </#if> 
724            <#if relatedAssetTypedLists[typeDLFileEntry]?? && relatedAssetTypedLists[typeDLFileEntry]?has_content > 
725                <@getTypedRelatedAssets relatedAssetTypedLists=relatedAssetTypedLists type=typeDLFileEntry structure="" /> 
726            </#if> 
727        </aside> 
728    </#if> 
729</#macro> 
730 
731 
732<#macro getTypedRelatedAssets relatedAssetTypedLists type structure> 
733    <#if type == typeJournalArticle && structure == "CDA_ZOOM_SUR" > 
734        <@getRelatedZoomSur assets=relatedAssetTypedLists[type] /> 
735    <#elseif type == typeJournalArticle && structure == "CDA_CONTACT_SERVICE" > 
736        <@getRelatedFooterContact assets=relatedAssetTypedLists[type] /> 
737    <#elseif type == typeBookmarksEntry > 
738        <@getRelatedPages assets=relatedAssetTypedLists[type] /> 
739    <#elseif type == typeDLFileEntry > 
740        <@getRelatedDocuments assets=relatedAssetTypedLists[type] /> 
741    </#if> 
742</#macro> 
743 
744 
745<#macro getRelatedZoomSur assets> 
746    <#if assets?size != 0> 
747        <#list assets as assetMap> 
748            <#local asset = assetMap.assetEntry /> 
749            <#local article = journalArticleLocalService.getLatestArticle(asset.getClassPK()) /> 
750            <#assign strucName = journalStructureLocalService.getStructure(article.groupId, jaClassNameId, article.structureId?string, true).getName(locale) /> 
751            <#if strucName == 'CDA_ZOOM_SUR'> 
752                <#local img = getField(article,"back_img")/> 
753                <#local url = getField(article,"url_link")/> 
754                <#local target = "href='"+ url +"'" /> 
755                <#if !isInternalLink(url)> 
756                    <#local target = target + " target='_blank' rel='noopener noreferrer'" /> 
757                </#if> 
758                <div class="article-header-alert"> 
759                    <#if url != ""> 
760                        <a class="inner-link" ${target}> 
761                    </#if> 
762                    <img src="${img}" alt="${asset.getTitleCurrentValue()}"/> 
763                    <h3 class="article-header-alert-title">${asset.getTitleCurrentValue()}</h3> 
764                    <#if url != ""> 
765                        </a> 
766                    </#if> 
767                </div> 
768            </#if> 
769        </#list> 
770    </#if> 
771</#macro> 
772 
773<#macro getRelatedFooterContact assets> 
774    <#if assets?size == 0> 
775        <@getDefaultFooterContact /> 
776    <#else> 
777        <#local hasContactFooter = false /> 
778        <#list assets as assetMap> 
779            <#local asset = assetMap.assetEntry /> 
780            <#local article = journalArticleLocalService.getLatestArticle(asset.getClassPK()) /> 
781            <#assign strucName = journalStructureLocalService.getStructure(article.groupId, jaClassNameId, article.structureId?string, true).getName(locale) /> 
782            <#if strucName == 'CDA_CONTACT_SERVICE'> 
783                <#local contact_service = getField(article,"Contact_service")/> 
784                <#local adresse = getField(article,"Adresse")/> 
785                <#local cp = getField(article,"CP")/> 
786                <#local ville = getField(article,"Ville")/> 
787                <#local telephone = getField(article,"Telephone")/> 
788                <#if telephone==""> 
789                    <#local telephone = "05 46 30 34 00" /> 
790                </#if> 
791                <#local courriel = getField(article,"Courriel")/> 
792                <#local annuaire = getField(article,"annuaire_link")/> 
793                <#if annuaire==""> 
794                    <#local annuaire = "/annuaire-des-services"/> 
795                </#if> 
796                <a class="interior-content-footer-contact interior-content-footer-service" href="${annuaire}"> 
797                    Contact<br/> 
798                    ${asset.getTitle(locale)} 
799                </a> 
800                <p class="interior-content-footer-contact interior-content-footer-address"> 
801                    <span class="interior-content-footer-contact-inner">${adresse}<br/>${cp} ${ville}</span> 
802                </p> 
803                <p class="interior-content-footer-contact interior-content-footer-phone"> 
804                    <span class="interior-content-footer-contact-inner">${telephone}</span> 
805                </p> 
806                <a class="interior-content-footer-contact interior-content-footer-email" href="mailto:${courriel}?subject=Contact%20site%20Agglo"> 
807                    <span class="interior-content-footer-contact-inner">Envoyer un courriel</span> 
808                </a> 
809                <a class="interior-content-footer-annuaire" href="${annuaire}">Annuaire des services</a> 
810                <#local hasContactFooter = true /> 
811                <#break /> 
812            </#if> 
813        </#list> 
814        <#if hasContactFooter == false> 
815            <@getDefaultFooterContact /> 
816        </#if> 
817    </#if> 
818</#macro> 
819 
820 
821<#macro getDefaultFooterContact > 
822    <a class="interior-content-footer-contact interior-content-footer-service" href="/annuaire-des-services"> 
823        Contact<br/> 
824        Agglo La Rochelle 
825    </a> 
826    <p class="interior-content-footer-contact interior-content-footer-address"> 
827        <span class="interior-content-footer-contact-inner">6, rue Saint-Michel<br/>17000 La Rochelle</span> 
828    </p> 
829    <p class="interior-content-footer-contact interior-content-footer-phone"> 
830        <span class="interior-content-footer-contact-inner">05 46 30 34 00</span> 
831    </p> 
832    <a class="interior-content-footer-contact interior-content-footer-email" href="/contacter-l-agglo"> 
833        <span class="interior-content-footer-contact-inner">Envoyer un courriel</span> 
834    </a> 
835    <a class="interior-content-footer-annuaire" href="/annuaire-des-services">Annuaire des services</a> 
836</#macro> 
837 
838 
839<#function getRelatedWebContentNb assets> 
840    <#local nb = 0 /> 
841    <#if assets?size != 0> 
842        <#local nb = 0 /> 
843        <#list assets as assetMap> 
844            <#local asset = assetMap.assetEntry /> 
845            <#local article = journalArticleLocalService.getLatestArticle(asset.getClassPK()) /> 
846            <#assign strucName = journalStructureLocalService.getStructure(article.groupId, jaClassNameId, article.structureId?string, true).getName(locale) /> 
847            <#if strucName != 'CDA_CONTACT_SERVICE' && strucName != 'CDA_ZOOM_SUR'> 
848                <#local nb = nb + 1 /> 
849            </#if> 
850        </#list> 
851    </#if> 
852    <#return nb /> 
853</#function> 
854 
855 
856<#macro getRelatedPages assets> 
857    <ul> 
858        <#local orderedAssets = getOrderedAssets(assets) /> 
859        <#list orderedAssets?reverse as assetMap> 
860            <#local asset = assetMap.assetEntry /> 
861            <#local assetLink = assetMap.assetLink /> 
862            <#local linkedAssetRenderer = asset.getAssetRenderer() /> 
863            <#local assetLinkEntryTitle = asset.getTitle(locale) /> 
864            <#local assetLinkEntryDescription = asset.getDescription() /> 
865            <#local assetLinkBookmark = bookmarksEntryLocalService.getEntry(asset.getClassPK()) /> 
866            <#local assetURL = assetLinkBookmark.getUrl() /> 
867             
868            <#local target = "" /> 
869            <#if assetURL?contains('widget') || assetURL?contains('iframe') || assetURL?contains('embed') > 
870                <#local target = " data-iframe='true' href='"+ assetURL +"' class='link-iframe'" /> 
871            <#else> 
872                <#local target = "href='"+ assetURL +"'" /> 
873                <#if !isInternalLink(assetURL)> 
874                    <#local target = target + " target='_blank' rel='noopener noreferrer'" /> 
875                </#if> 
876            </#if> 
877 
878            <li class="interior-article-moreContent" data-entry-id="${asset.getEntryId()}"><a ${target} title="${htmlUtil.escapeAttribute(assetLinkEntryDescription)}">${assetLinkEntryTitle}</a></li> 
879       </#list> 
880   </ul> 
881</#macro> 
882 
883 
884<#macro getRelatedDocuments assets> 
885     
886    <#assign folderNb = 0 /> 
887    <#local orderedAssets = getOrderedAssets(assets) /> 
888    <#local collapsedFolders = false /> 
889     
890    <#list orderedAssets?reverse as assetMap> 
891     
892        <#local asset = assetMap.assetEntry /> 
893        <#local fileEntry = dlFileEntryLocalService.getFileEntry(asset.getClassPK()) /> 
894 
895        <#local documents = dlFileEntryLocalService.getFileEntries(fileEntry.getGroupId(),fileEntry.getFolderId()) /> 
896        <#local folder = fileEntry.getFolder() /> 
897        <#local folderDescription = folder.getDescription()/> 
898        <#if folderDescription != ""> 
899            <#if documents?size &gt; 5> 
900                <#local collapsedFolders = true /> 
901            </#if> 
902        </#if> 
903    </#list> 
904     
905    <#list orderedAssets?reverse as assetMap> 
906     
907        <#local asset = assetMap.assetEntry /> 
908        <#local fileEntry = dlFileEntryLocalService.getFileEntry(asset.getClassPK()) /> 
909 
910        <#local documents = dlFileEntryLocalService.getFileEntries(fileEntry.getGroupId(),fileEntry.getFolderId()) /> 
911        <#local folder = fileEntry.getFolder() /> 
912        <#local folderDescription = folder.getDescription()/> 
913        <#if folderDescription != ""> 
914            <#if collapsedFolders == true> 
915                <input type="checkbox" class="interior-article-moreContent-checkbox" id="interior-article-moreContent-checkbox-${folderNb}" name="interior-article-moreContent-checkbox-${folderNb}"> 
916                <p class="interior-article-moreContent-title"><label for="interior-article-moreContent-checkbox-${folderNb}">${folderDescription}</label></p> 
917                <#assign folderNb = folderNb + 1 /> 
918            <#else> 
919                <p class="interior-article-moreContent-title">${folderDescription}</p> 
920            </#if> 
921        </#if> 
922         
923        <ul class="interior-article-moreContent-list"> 
924            <#local orderedDocs = getOrderedDocs(documents) /> 
925            <#list orderedDocs?reverse as docEntry> 
926                 
927                <#if !docEntry.isInTrash()> 
928                     
929                    <#local assetDocEntry = assetEntryLocalService.getEntry(docEntry.getGroupId(),docEntry.getUuid()) /> 
930                     
931                    <#if assetDocEntry.getAssetRenderer()??> 
932                     
933                        <#local linkedAssetRenderer = assetDocEntry.getAssetRenderer() /> 
934                         
935                        <#local assetLinkEntryTitle = assetDocEntry.getTitle(locale) /> 
936                        <#local assetLinkEntryDescription = assetDocEntry.getDescription(locale) /> 
937                        <#local extension = docEntry.getLatestFileVersion(true).getExtension() /> 
938                         
939                        <#local assetURL = linkedAssetRenderer.getURLDownload(themeDisplay) /> 
940                         
941                        <#local displaySize = "" /> 
942                        <#local size = docEntry.getLatestFileVersion(true).getSize() /> 
943                        <#if size/1024 < 1024 > 
944                            <#local formatSize = size/1024 /> 
945                            <#local displaySize = formatSize?round?string + " Ko" /> 
946                        <#else> 
947                            <#local formatSize = size/10485.76 /> 
948                            <#local displaySize = (formatSize?round/100)?string + " Mo" /> 
949                        </#if> 
950                         
951                        <#local extensionType = "" /> 
952                        <#switch extension> 
953                            <#case "pdf"> 
954                                <#local extensionType = "link-pdf" /> 
955                                <#break> 
956                            <#case "jpg"> 
957                                <#local extensionType = "link-img" /> 
958                                <#break> 
959                            <#case "png"> 
960                                <#local extensionType = "link-img" /> 
961                                <#break> 
962                            <#case "mp4"> 
963                                <#local extensionType = "link-video" /> 
964                                <#break> 
965                            <#case "swf"> 
966                                <#local extensionType = "link-flash" /> 
967                                <#break> 
968                            <#default> 
969                        </#switch> 
970                        <#assign dlFileEntry = docEntry.getLatestFileVersion(true)/> 
971                         
972                        <#local toDownload = "" /> 
973                        <#if assetLinkEntryTitle?contains("- téléchargement")> 
974                            <#local toDownload = "download" /> 
975                            <#if assetURL?contains("?version")> 
976                                <#local assetURL = assetURL + "&download=true" /> 
977                            <#else> 
978                                <#local assetURL = assetURL + "?download=true" /> 
979                            </#if> 
980                        </#if> 
981                         
982                        <#local target = " href='"+ assetURL +"'" /> 
983                         
984                        <li class="interior-article-moreContent" data-entry-id="${asset.entryId}"> 
985                            <a ${target} class="extension-${extension} ${extensionType}" title="${htmlUtil.escapeAttribute(assetLinkEntryDescription)}" ${toDownload} target="_blank" > 
986                                ${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> 
987                            </a> 
988                        </li> 
989                         
990                    </#if> 
991                     
992                </#if> 
993                 
994            </#list> 
995        </ul> 
996         
997    </#list> 
998     
999</#macro> 
1000 
1001 
1002<#function getOrderedAssets assets> 
1003    <#local orderedAssets = [] /> 
1004    <#local assetsWithDate = [] /> 
1005    <#list assets as assetMap> 
1006        <#local asset = assetMap.assetEntry /> 
1007        <#local modifiedDate = asset.getModifiedDate() /> 
1008        <#local assetsWithDate = assetsWithDate + [{'assetMap':assetMap,'modifiedDate':modifiedDate}] /> 
1009    </#list> 
1010    <#list assetsWithDate?sort_by('modifiedDate') as orderedAsset> 
1011        <#local orderedAssets = orderedAssets + [orderedAsset.assetMap] /> 
1012    </#list> 
1013    <#return orderedAssets> 
1014</#function> 
1015 
1016<#function getOrderedDocs docs> 
1017    <#local orderedDocs = [] /> 
1018    <#local docsWithDate = [] /> 
1019    <#list docs as docMap> 
1020        <#local doc = assetEntryLocalService.getEntry(docMap.getGroupId(),docMap.getUuid()) /> 
1021        <#local modifiedDate = doc.getModifiedDate() /> 
1022        <#local docsWithDate = docsWithDate + [{'docMap':docMap,'modifiedDate':modifiedDate}] /> 
1023    </#list> 
1024    <#list docsWithDate?sort_by('modifiedDate') as orderedDoc> 
1025        <#local orderedDocs = orderedDocs + [orderedDoc.docMap] /> 
1026    </#list> 
1027    <#return orderedDocs> 
1028</#function> 
1029 
1030 
1031<#function isInternalLink link> 
1032  <#local internal = link?contains(".agglo-larochelle.fr") || !link?contains("//")> 
1033  <#return internal> 
1034</#function> 
1035 
1036 
1037<#function getField journalArticle fieldName> 
1038    <#local fieldValue = ''/> 
1039     <#local document = saxReaderUtil.read(journalArticle.getContent()) /> 
1040     <#local rootElement = document.getRootElement() /> 
1041     <#if (rootElement?? && rootElement?has_content)> 
1042        <#local xPathSelector =  saxReaderUtil.createXPath("dynamic-element[@name='"+fieldName+"']/dynamic-content") /> 
1043        <#if (validator.isNotNull(xPathSelector))> 
1044        <#local nbNodes = xPathSelector.selectNodes(rootElement)?size /> 
1045        <#if (nbNodes &gt; 0)> 
1046            <#local fieldValue = xPathSelector.selectSingleNode(rootElement).getStringValue() /> 
1047        </#if> 
1048     </#if> 
1049     <#return fieldValue /> 
1050     </#if> 
1051</#function>