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