Retour

Maison de l'étudiant

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