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