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