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

Pour naviguer sur le site de la Communauté d'Agglomération, veuillez mettre à jour votre navigateur ou utiliser un navigateur moderne.

Ci-dessous quelques liens de téléchargement vers des navigateurs récents :