Retour

Vie étudiante

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