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