Qui sommes-nous ?
La Rochelle Technopole encourage et soutient l’innovation en accompagnant l’émergence de projets et la création d’entreprises.
Au service de votre projet !
Une erreur s'est produite en traitant le calibre.
No signature of method create matches the arguments
1<#assign assetEntryLocalService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetEntryLocalService") />
2<#assign classNameLocalService = serviceLocator.findService("com.liferay.portal.service.ClassNameLocalService") />
3<#assign assetLinkLocalService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetLinkLocalService") />
4<#assign bookmarksEntryLocalService = serviceLocator.findService("com.liferay.portlet.bookmarks.service.BookmarksEntryLocalService") />
5<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.portlet.journal.service.JournalArticleLocalService") />
6<#assign journalStructureLocalService = serviceLocator.findService("com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService") />
7<#assign dlFileEntryLocalService = serviceLocator.findService("com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService") />
8
9<#assign typeJournalArticle = "com.liferay.portlet.journal.model.JournalArticle" />
10<#assign typeBookmarksEntry = "com.liferay.portlet.bookmarks.model.BookmarksEntry" />
11<#assign typeDLFileEntry = "com.liferay.portlet.documentlibrary.model.DLFileEntry" />
12
13<#assign journalArticle = journalArticleLocalService.getArticle(groupId, .vars['reserved-article-id'].data) />
14<#assign entry = assetEntryLocalService.getEntry(typeJournalArticle, journalArticle.getResourcePrimKey()) />
15<#assign relatedAssetTypedLists = buildRelatedAssetTypedLists(entry, "false") />
16
17<#assign jaClassNameId = classNameLocalService.getClassNameId(typeJournalArticle) />
18
19<#assign pdfViewer = '/fu/js/pdfjs/web/viewer.html?zoom=page-fit&file=' />
20
21<#assign anchorInProgress = "false" />
22<#assign carouselNb = 0 />
23<#assign anchorNb = 0 />
24
25<#assign serviceContextThreadLocal = staticUtil["com.liferay.portal.service.ServiceContextThreadLocal"] />
26<#assign themeDisplay = serviceContextThreadLocal.getServiceContext().getThemeDisplay() />
27
28<article class="interior-article">
29
30 <section class="interior-article-mainContent" >
31
32 <h2 class="interior-article-title">${.vars['reserved-article-title'].data}</h2>
33
34 <#if content.getSiblings()?has_content>
35
36 <#list content.getSiblings() as contenu>
37
38 <#assign zoomDisplay = "" />
39 <#if contenu.is_zoom.getData() == "true">
40 <#assign zoomDisplay = "zoomed-paragraph" />
41 </#if>
42 <@displayContent contenu=contenu isZoom=zoomDisplay />
43
44 </#list>
45
46 </#if>
47
48 <#if anchorInProgress == "true">
49 </div>
50 </#if>
51
52 </section>
53
54 <#if relatedAssetTypedLists?? && relatedAssetTypedLists?has_content >
55 <@getCustomRelatedAssets relatedAssetTypedLists=relatedAssetTypedLists />
56 </#if>
57
58</article>
59
60<footer class="interior-article-footer">
61 <ul class="interior-article-footer-items-list">
62 <li class="interior-article-footer-item interior-article-print"><button type="button" class="inner-link" title="Imprimer"><span class="sr-only">Imprimer</span></button></li>
63 <li class="interior-article-footer-item interior-article-mail"><button type="button" class="inner-link" title="Partager par mail"><span class="sr-only">Partager par mail</span></button></li>
64 <li class="interior-article-footer-item interior-article-linkedin"><button type="button" class="inner-link" title="Partager sur LinkedIn"><span class="sr-only">Partager sur LinkedIn</span></button></li>
65 <li class="interior-article-footer-item interior-article-twitter"><button type="button" class="inner-link" title="Partager sur Twitter"><span class="sr-only">Partager sur Twitter</span></button></li>
66 <li class="interior-article-footer-item interior-article-facebook"><button type="button" class="inner-link" title="Partager sur Facebook"><span class="sr-only">Partager sur Facebook</span></button></li>
67 </ul>
68</footer>
69
70
71<#--*************************************
72** CONTENT BLOCKS DISPLAY
73*************************************-->
74
75<#macro displayContent contenu isZoom >
76
77 <#assign floatingMedia = "no-floating-media" />
78 <#assign alignValue = contenu.Media.media_options.alignment.getData() />
79 <#if alignValue == "fLeft" || alignValue == "fRight">
80 <#assign floatingMedia = "floating-media" />
81 </#if>
82
83 <#assign contentTitle = contenu.content_title.getData() />
84 <#assign contentText = contenu.content_text.getData() />
85
86 <#assign innerMedia = contenu.Media />
87 <#assign mediaSrc = innerMedia.media_doc.getData()/>
88 <#assign urlIframePortlet = innerMedia.url_iframe_portlet.getData() />
89
90 <#assign anchor = "" />
91 <#if contenu.anchor?has_content>
92 <#assign anchor = contenu.anchor.getData() />
93 </#if>
94
95 <#if contentTitle!="" || contentText!="" || mediaSrc!="" || urlIframePortlet !="" >
96
97 <#if anchor == "anchor-stop" && anchorInProgress == "true">
98 </div>
99 <#assign anchor = "" />
100 <#assign anchorInProgress = "false" />
101 </#if>
102
103 <#if anchor != "" && contentTitle != "" && isZoom="">
104 <#if anchorInProgress == "true">
105 </div>
106 </#if>
107 <h3 id="${anchor}" class="anchor-title displayed"><button type="button" class="anchor-button" id="accord-btn-${anchorNb}" aria-controls="accord-sect-${anchorNb}" aria-expanded="true" data-anchor="${anchor}">${contentTitle}</button></h3>
108 <div class="anchor-content" role="region" id="accord-sect-${anchorNb}" aria-labelledby="accord-btn-${anchorNb}">
109 <#assign anchorNb = anchorNb + 1 />
110 <#assign anchorInProgress = "true" />
111 </#if>
112
113 <div class="interior-article-paragraph ${isZoom} ${floatingMedia}">
114
115 <#if contentTitle != "" >
116 <#if anchor == "" || anchor == "anchor-stop" >
117 <h3>${contentTitle}</h3>
118 <#else>
119 <#if isZoom != "">
120 <h3 id="${anchor}" class="anchor-title displayed"><button type="button" class="anchor-button" id="accord-btn-${anchorNb}" aria-controls="accord-sect-${anchorNb}" aria-expanded="true" data-anchor="${anchor}">${contentTitle}</button></h3>
121 <div class="anchor-content" role="region" id="accord-sect-${anchorNb}" aria-labelledby="accord-btn-${anchorNb}">
122 <#assign anchorNb = anchorNb + 1 />
123 </#if>
124 </#if>
125 <#else>
126 <#if anchor != "" >
127 <a id="${anchor}" class="anchor-content"></a>
128 </#if>
129 </#if>
130
131 <#if floatingMedia == "no-floating-media" >
132
133 ${contentText?replace("<p></p>","")}
134 <#if innerMedia??>
135 <@getMedia media=innerMedia mediaSrc=mediaSrc urlIframePortlet=urlIframePortlet alignment=alignValue />
136 </#if>
137
138
139 <#elseif floatingMedia == "floating-media">
140
141 <#if innerMedia??>
142 <@getMedia media=innerMedia mediaSrc=mediaSrc urlIframePortlet=urlIframePortlet alignment=alignValue />
143 </#if>
144 ${contentText?replace("<p></p>","")}
145 <div class="clear-float"></div>
146
147 </#if>
148
149 <#if contentTitle != "" && anchor != "" && anchor != "anchor-stop" && isZoom != "">
150 </div>
151 </#if>
152
153 </div>
154
155 </#if>
156
157</#macro>
158
159
160<#--*************************************
161** MEDIA DISPLAY
162*************************************-->
163
164<#macro getMedia media mediaSrc urlIframePortlet alignment>
165
166 <#if mediaSrc != '' || urlIframePortlet != ''>
167
168 <#local mediaType = media.media_type.getData() />
169 <#assign carouselWrapper = "" />
170 <#if mediaType == "carousel">
171 <#assign carouselWrapper = "interior-article-media-carousel-wrapper" />
172 </#if>
173 <#local width = media.media_options.width.getData() />
174 <#local displayWidth = '' />
175 <#if width == 'null'>
176 <#local displayWidth = '' />
177 <#elseif width != "">
178 <#local displayWidth = 'style="width:'+width+'px;"' />
179 </#if>
180
181 <#local height = media.media_options.height.getData() />
182 <#if height == 'null'>
183 <#local height = '' />
184 </#if>
185 <#local displayMode = media.media_options.display_mode.getData() />
186 <#local imgMini = media.media_options.img_mini.getData() />
187 <#local legend = media.media_options.legend.getData() />
188 <#local altText = media.alt_text.getData() />
189 <#if altText == 'null'>
190 <#local altText = '' />
191 </#if>
192
193 <figure class="interior-article-media interior-article-media-${alignment} ${carouselWrapper}" ${displayWidth}>
194
195 <#switch mediaType>
196 <#case "image">
197 <#if displayMode == "normal">
198 <@getImageMedia mediaSrc=mediaSrc urlIframePortlet=urlIframePortlet altText=altText height=height width=width />
199 <#elseif displayMode == "popup">
200 <@getImageMediaPopup imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height width=width />
201 </#if>
202 <#break >
203 <#case "video">
204 <#if displayMode == "normal">
205 <@getVideoMedia imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height width=width />
206 <#elseif displayMode == "popup">
207 <@getVideoMediaPopup imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height width=width />
208 </#if>
209 <#break >
210 <#case "pdf">
211 <#if displayMode == "normal">
212 <@getPdfMedia mediaSrc=mediaSrc altText=altText height=height />
213 <#elseif displayMode == "popup">
214 <@getPdfMediaPopup imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height width=width />
215 </#if>
216 <#break >
217 <#case "iframe">
218 <#if displayMode == "normal">
219 <@getIframeMedia urlIframePortlet=urlIframePortlet altText=altText height=height />
220 <#elseif displayMode == "popup">
221 <@getIframeMediaPopup imgMini=imgMini urlIframePortlet=urlIframePortlet altText=altText height=height width=width />
222 </#if>
223 <#break >
224 <#case "portlet">
225 <#if displayMode == "normal">
226 <@getPortletMedia urlIframePortlet=urlIframePortlet height=height />
227 <#elseif displayMode == "popup">
228 <@getPortletMediaPopup imgMini=imgMini urlIframePortlet=urlIframePortlet altText=altText height=height width=width />
229 </#if>
230 <#break >
231 <#case "carousel">
232 <#if displayMode == "normal">
233 <@getCarouselMedia media=media altText=altText height=height width=width />
234 <#assign carouselNb = carouselNb + 1 />
235 <#elseif displayMode == "popup">
236 <@getCarouselMediaPopup imgMini=imgMini media=media altText=altText height=height width=width />
237 </#if>
238 <#break >
239 <#default>
240 </#switch>
241
242 <#local hasLegend = legend?length != 0 />
243 <#if hasLegend>
244 <figcaption class="interior-article-media-legend">${legend}</figcaption>
245 </#if>
246
247 </figure>
248
249 </#if>
250
251</#macro>
252
253
254<#macro getImageMedia mediaSrc urlIframePortlet altText height width >
255 <#local displayedHeight = '' />
256 <#if height != "">
257 <#local displayedHeight = 'style="max-height:'+height+'px;"' />
258 </#if>
259 <#if urlIframePortlet != "">
260 <#assign target = "href='"+ urlIframePortlet +"'" />
261 <#if !isInternalLink(urlIframePortlet)>
262 <#assign target = target + " target='_blank' rel='noopener noreferrer'" />
263 </#if>
264 <a ${target} title="${htmlUtil.escapeAttribute(altText)}">
265 <img class="interior-article-media-image" src="${mediaSrc}" loading="lazy" alt="${htmlUtil.escapeAttribute(altText)}" ${displayedHeight} <#if width!=""> width="${width}"</#if> <#if height!=""> height="${height}"</#if> />
266 </a>
267 <#else>
268 <img class="interior-article-media-image" src="${mediaSrc}" loading="lazy" alt="${htmlUtil.escapeAttribute(altText)}" title="${htmlUtil.escapeAttribute(altText)}" ${displayedHeight} <#if width!=""> width="${width}"</#if> <#if height!=""> height="${height}"</#if> />
269 </#if>
270</#macro>
271
272
273<#macro getImageMediaPopup imgMini mediaSrc altText height width >
274 <#if imgMini != "">
275 <#local displayedHeight = '' />
276 <#if height != "">
277 <#local displayedHeight = 'style="max-height:'+height+'px;"' />
278 </#if>
279 <a class="link-img" href="${mediaSrc}" title="${htmlUtil.escapeAttribute(altText)}">
280 <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> />
281 </a>
282 <#else>
283 <a class="link-img interior-article-moreContent-doc interior-article-doc" title="${htmlUtil.escapeAttribute(altText)}" href="${mediaSrc}">
284 ${htmlUtil.escapeAttribute(altText)}
285 </a>
286 </#if>
287</#macro>
288
289
290<#macro getVideoMedia imgMini mediaSrc height altText width>
291 <#local displayedHeight = '' />
292 <#if height != "">
293 <#local displayedHeight = 'style="max-height:'+height+'px;"' />
294 </#if>
295 <video class="interior-article-media-video" itemprop="url" poster="${imgMini}" title="${htmlUtil.escapeAttribute(altText)}" controls="" preload="metadata" ${displayedHeight} <#if width!=""> width="${width}"</#if> <#if height!=""> height="${height}"</#if> >
296 <source itemprop="url" content="https://www2.larochelle-technopole.fr${mediaSrc}" src="${mediaSrc}" type="video/mp4">
297 <a href="${mediaSrc}" download="">${htmlUtil.escapeAttribute(altText)}</a>
298 </video>
299</#macro>
300
301
302<#macro getVideoMediaPopup imgMini mediaSrc altText height width >
303 <#if imgMini != "">
304 <#local displayedHeight = '' />
305 <#if height != "">
306 <#local displayedHeight = 'style="max-height:'+height+'px;"' />
307 </#if>
308 <a class="link-video" href="${mediaSrc}" title="${htmlUtil.escapeAttribute(altText)}">
309 <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> />
310 </a>
311 <#else>
312 <a class="link-video interior-article-moreContent-doc interior-article-doc" title="${htmlUtil.escapeAttribute(altText)}" href="${mediaSrc}">
313 ${htmlUtil.escapeAttribute(altText)}
314 </a>
315 </#if>
316</#macro>
317
318
319<#macro getPdfMedia mediaSrc altText height >
320 <#local displayedHeight = '' />
321 <#if height != "">
322 <#local displayedHeight = 'style="height:'+height+'px;"' />
323 </#if>
324 <iframe class="interior-article-media-iframe" src="${pdfViewer+mediaSrc}" loading="lazy" title="${htmlUtil.escapeAttribute(altText)}" ${displayedHeight} allowfullscreen ></iframe>
325</#macro>
326
327
328<#macro getPdfMediaPopup imgMini mediaSrc altText height width >
329 <#if imgMini != "">
330 <#local displayedHeight = '' />
331 <#if height != "">
332 <#local displayedHeight = 'style="max-height:'+height+'px;"' />
333 </#if>
334 <a class="link-pdf" href="${mediaSrc}" title="${htmlUtil.escapeAttribute(altText)}" target="_blank" rel="noopener noreferrer">
335 <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> />
336 </a>
337 <#else>
338 <a class="link-pdf interior-article-moreContent-doc interior-article-doc" title="${htmlUtil.escapeAttribute(altText)}" href="${mediaSrc}" target="_blank" rel="noopener noreferrer">
339 ${htmlUtil.escapeAttribute(altText)}
340 </a>
341 </#if>
342</#macro>
343
344
345<#macro getIframeMedia urlIframePortlet altText height >
346 <#local displayedHeight = '' />
347 <#if height != "">
348 <#local displayedHeight = 'style="height:'+height+'px;"' />
349 </#if>
350 <#if urlIframePortlet?contains("youtube")>
351 <#local youtubeId = urlIframePortlet?substring(urlIframePortlet?index_of("embed/")+6) />
352 <div class="interior-article-media-youtube-blocker" ${displayedHeight}>
353 <div class="youtube-blocker-img-wrapper">
354 <img class="youtube-blocker-img" src="https://img.youtube.com/vi/${youtubeId}/0.jpg" loading="lazy" alt="${htmlUtil.escapeAttribute(altText)}" />
355 </div>
356 <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>
357 <div class="youtube-blocker-btn-wrapper">
358 <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>
359 <a href="https://www.youtube.com/static?template=terms&gl=FR" class="youtube-blocker-btn" target="_blank" rel="noopener noreferrer">En savoir plus</a>
360 </div>
361 </div>
362 <#else>
363 <iframe class="interior-article-media-iframe" src="${urlIframePortlet}" loading="lazy" title="${htmlUtil.escapeAttribute(altText)}" ${displayedHeight} allowfullscreen ></iframe>
364 </#if>
365</#macro>
366
367
368<#macro getIframeMediaPopup imgMini urlIframePortlet altText height width >
369 <#if imgMini != "">
370 <#local displayedHeight = '' />
371 <#if height != "">
372 <#local displayedHeight = 'style="max-height:'+height+'px;"' />
373 </#if>
374 <a class="link-iframe" href="${urlIframePortlet}" title="${htmlUtil.escapeAttribute(altText)}" target="_blank" rel="noopener noreferrer">
375 <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> />
376 </a>
377 <#else>
378 <a class="link-iframe interior-article-moreContent-doc interior-article-doc" title="${htmlUtil.escapeAttribute(altText)}" href="${urlIframePortlet}" target="_blank" rel="noopener noreferrer">
379 ${htmlUtil.escapeAttribute(altText)}
380 </a>
381 </#if>
382</#macro>
383
384
385<#macro getCarouselMedia media altText height width >
386
387 <#local ratioDisplay = "" />
388 <#if height != "" && width != "" >
389 <#local ratio = height?number / width?number * 100 />
390 <#local ratioDisplay = 'style="padding-top:' + ratio + '%"' />
391 </#if>
392
393 <div class="carousel" id="carousel-${carouselNb}" data-carousel="carousel-${carouselNb}" ${ratioDisplay}>
394
395 <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>
396 <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>
397
398 <#list media.media_doc.getSiblings() as node>
399 <#if node_index == 0>
400 <img id="carousel-${carouselNb}-img-${node_index}" data-carousel="carousel-${carouselNb}" data-img="${node_index}" class="carousel-img carousel-img-displayed" src="${node.getData()}" data-src="" alt="${altText}">
401 <#else>
402 <img id="carousel-${carouselNb}-img-${node_index}" data-carousel="carousel-${carouselNb}" data-img="${node_index}" class="carousel-img carousel-img-noDisplay" src="/lr-technopole-theme/images/blank.png" data-src="${node.getData()}" alt="${altText}">
403 </#if>
404 </#list>
405
406 </div>
407
408</#macro>
409
410
411<#macro getCarouselMediaPopup imgMini media altText height width >
412 <#local diapos = "" />
413 <#list media.media_doc.getSiblings() as node>
414 <#if node_index != 0>
415 <#local diapos = diapos + "," />
416 </#if>
417 <#local diapos = diapos + node.getData() />
418 </#list>
419 <#if imgMini != "">
420 <#local displayedHeight = '' />
421 <#if height != "">
422 <#local displayedHeight = 'style="max-height:'+height+'px;"' />
423 </#if>
424 <a class="link-diapo" href="${mediaSrc}" title="${htmlUtil.escapeAttribute(altText)}" data-diapos="${diapos}">
425 <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> />
426 </a>
427 <#else>
428 <a class="link-diapo interior-article-moreContent-doc interior-article-doc" title="${htmlUtil.escapeAttribute(altText)}" href="${mediaSrc}" data-diapos="${diapos}">
429 ${htmlUtil.escapeAttribute(altText)}
430 </a>
431 </#if>
432</#macro>
433
434
435<#macro getPortletMedia urlIframePortlet height >
436
437 <#local displayedHeight = '' />
438 <#if height != "">
439 <#local displayedHeight = 'style="max-height:'+height+'px;"' />
440 </#if>
441
442 <#local hasInstanceId = urlIframePortlet?contains('INSTANCE') />
443 <#local hasQueryString = urlIframePortlet?contains('?') />
444 <#local queryString = '' />
445 <#local instanceId = '' />
446 <#local portletName = urlIframePortlet />
447 <#local portletId = urlIframePortlet />
448 <#local fullPortletName = '' />
449
450 <#if hasInstanceId>
451 <#if hasQueryString>
452 <#local instanceId = urlIframePortlet[(urlIframePortlet?index_of('INSTANCE')+9)..urlIframePortlet?index_of('?')-1] />
453 <#else>
454 <#local instanceId = urlIframePortlet[(urlIframePortlet?index_of('INSTANCE')+9)..] />
455 </#if>
456 <#local portletName = urlIframePortlet[0..(urlIframePortlet?index_of('INSTANCE'))-2] />
457 <#else>
458 <#if hasQueryString>
459 <#local portletName = urlIframePortlet[0..(urlIframePortlet?index_of('?'))-1] />
460 </#if>
461 </#if>
462
463 <#if hasQueryString>
464 <#local queryString = urlIframePortlet[(urlIframePortlet?index_of('?')+1)..] />
465 </#if>
466
467 <#if hasInstanceId>
468 <#local fullPortletName = portletName+'_INSTANCE_'+instanceId />
469 <#else>
470 <#local fullPortletName = portletName />
471 </#if>
472
473 <#local divId = "embedded-portlet-" + fullPortletName + randomNamespace />
474 <#local plid = themeDisplay.plid />
475
476 <#if urlIframePortlet?contains('cdalrEService') || urlIframePortlet?contains('cdalrEservice') || urlIframePortlet?contains('cuCreate')>
477
478 <#local queryString = queryString +"&p_l_id="+plid+"&p_p_lifecycle=0&p_p_mode=view&p_p_state=exclusive¤tURL=" + themeDisplay.getURLCurrent() />
479
480 <div id="${divId}" class="embedded-portlet" data-portlet="${fullPortletName}" data-remote-url="" data-querystring="${queryString}" ${displayedHeight}></div>
481
482 <#else>
483
484 <#local plid = themeDisplay.plid />
485 <#local portletURL = portletURLFactory.create(renderRequest, fullPortletName, plid, "RENDER_PHASE") />
486 <#local windowState = windowStateFactory.getWindowState("EXCLUSIVE") />
487 ${portletURL.setWindowState(windowState)}
488 <#local remoteUrl = portletURL.toString() + "&" + queryString + "¤tURL=" + themeDisplay.getURLCurrent() />
489
490 <div id="${divId}" class="embedded-portlet" data-portlet="${fullPortletName}" data-remote-url="${remoteUrl}" data-querystring="${queryString}" ${displayedHeight}></div>
491
492 </#if>
493
494</#macro>
495
496
497<#macro getPortletMediaPopup imgMini urlIframePortlet altText height width >
498
499 <#local displayedHeight = '' />
500 <#if height != "">
501 <#local displayedHeight = 'style="max-height:'+height+'px;"' />
502 </#if>
503
504 <#local hasInstanceId = urlIframePortlet?contains('INSTANCE') />
505 <#local hasQueryString = urlIframePortlet?contains('?') />
506 <#local portletId = urlIframePortlet />
507 <#local queryString = '' />
508
509 <#if hasInstanceId>
510 <#local portletId = urlIframePortlet[0..(urlIframePortlet?index_of(instanceId))] />
511 </#if>
512 <#if hasQueryString>
513 <#local portletId = urlIframePortlet[0..(urlIframePortlet?index_of('?')-1)] />
514 <#local queryString = urlIframePortlet[(urlIframePortlet?index_of('?')+1)..] />
515 </#if>
516
517 <#local divId = "embedded-portlet-" + portletId />
518
519 <#if themeDisplay?? && themeDisplay.plid?? >
520
521 <#local plid = themeDisplay.plid />
522
523 <#if urlIframePortlet?contains('cdalrEService') || urlIframePortlet?contains('cdalrEservice')>
524
525 <#local queryString = queryString +"&p_l_id="+plid+"&p_p_lifecycle=0&p_p_mode=view&p_p_state=exclusive¤tURL=" +themeDisplay.getURLCurrent() />
526
527 <#local formPictoClass = "" />
528 <#if urlIframePortlet?contains('FiberOpticalConnectionRequest')>
529 <#local formPictoClass = "eservice-form-opener-picto-fiber" />
530 <#elseif urlIframePortlet?contains('AntContact')>
531 <#local formPictoClass = "eservice-form-opener-picto-contact" />
532 <#elseif urlIframePortlet?contains('ReinscriptionConservatoire')>
533 <#local formPictoClass = "eservice-form-opener-picto-music" />
534 <#elseif urlIframePortlet?contains('ContactUs')>
535 <#local formPictoClass = "eservice-form-opener-picto-contact" />
536 <#elseif urlIframePortlet?contains('JobApplication')>
537 <#local formPictoClass = "eservice-form-opener-picto-job" />
538 <#elseif urlIframePortlet?contains('WastebinRepair')>
539 <#local formPictoClass = "eservice-form-opener-picto-wastebin" />
540 <#elseif urlIframePortlet?contains('WastewaterConnection')>
541 <#local formPictoClass = "eservice-form-opener-picto-water" />
542 <#elseif urlIframePortlet?contains('WastesortingTour')>
543 <#local formPictoClass = "eservice-form-opener-picto-altriane" />
544 </#if>
545
546 <div class="link-portlet eservice-form-opener" data-divId="${divId}" data-portlet="${portletId}" data-querystring="${queryString}" data-remote-url="" tabindex="0">
547 <div class="eservice-form-opener-picto ${formPictoClass}"></div>
548 <p class="eservice-form-opener-text">${htmlUtil.escapeAttribute(altText)}</p>
549 </div>
550
551 <#else>
552
553 <#local portletClass = "link-portlet" />
554 <#if urlIframePortlet?contains('19_WAR')>
555 <#local portletClass = "link-portlet planning-cmd-opener" />
556 </#if>
557 <#local plid = themeDisplay.plid />
558 <#local portletURL = portletURLFactory.create(renderRequest, portletId, plid, "RENDER_PHASE") />
559 <#local windowState = windowStateFactory.getWindowState("EXCLUSIVE") />
560 ${portletURL.setWindowState(windowState)}
561 <#local remoteUrl = portletURL.toString() + "&" + queryString + "¤tURL=" + themeDisplay.getURLCurrent() />
562
563 <div class="${portletClass}" data-divId="${divId}" data-portlet="${portletId}" data-querystring="${queryString}" data-remote-url="${remoteUrl}" tabindex="0">
564 <img class="interior-article-media-image" src="${imgMini}" loading="lazy" alt="${altText}" ${displayedHeight} <#if width!=""> width="${width}"</#if> <#if height!=""> height="${height}"</#if> />
565 </div>
566
567 </#if>
568
569 </#if>
570
571</#macro>
572
573
574<#--*************************************
575** RELATED CONTENT
576*************************************-->
577
578<#function buildRelatedAssetTypedLists entry info >
579 <#assign relatedAssetTypedLists = {} />
580 <#assign infos = "" />
581 <#assign assetLinks = assetLinkLocalService.getDirectLinks(entry.getEntryId()) />
582
583 <#list assetLinks as assetLink>
584 <#if assetLink.getEntryId1() == entry.getEntryId() >
585 <#assign assetLinkEntry = assetEntryLocalService.getEntry(assetLink.getEntryId2()) />
586 <#else>
587 <#assign assetLinkEntry = assetEntryLocalService.getEntry(assetLink.getEntryId1()) />
588 </#if>
589
590 <#if assetLinkEntry?? && assetLinkEntry.isVisible() >
591 <#assign linkedAssetRenderer = assetLinkEntry.getAssetRenderer() />
592
593 <#if linkedAssetRenderer.hasViewPermission(permissionChecker) >
594
595 <#assign type = assetLinkEntry.getClassName() />
596
597 <#assign newEntry = [{"assetEntry":assetLinkEntry,"assetLink":assetLink}] />
598 <#if relatedAssetTypedLists?keys?seq_contains(type)>
599 <#assign relatedAssetTypedList = relatedAssetTypedLists[type] + newEntry />
600 <#else>
601 <#assign relatedAssetTypedList = newEntry />
602 </#if>
603 <#assign relatedAssetTypedLists = relatedAssetTypedLists + {type : relatedAssetTypedList} />
604 </#if>
605 </#if>
606 </#list>
607
608 <#if info == "true">
609 <#return infos />
610 <#else>
611 <#return relatedAssetTypedLists />
612 </#if>
613 <#return {} />
614</#function>
615
616
617<#macro getCustomRelatedAssets relatedAssetTypedLists>
618 <#local hasRelatedAssets = "false" />
619 <#if relatedAssetTypedLists[typeDLFileEntry]?? && relatedAssetTypedLists[typeDLFileEntry]?size != 0>
620 <#local hasRelatedAssets = "true" />
621 </#if>
622 <#if hasRelatedAssets == "true" >
623 <aside class="interior-article-moreContent-container">
624 <#if relatedAssetTypedLists[typeDLFileEntry]?? && relatedAssetTypedLists[typeDLFileEntry]?has_content >
625 <@getRelatedDocuments assets=relatedAssetTypedLists[typeDLFileEntry] />
626 </#if>
627 </aside>
628 </#if>
629</#macro>
630
631
632<#macro getRelatedDocuments assets>
633
634 <#if assets?has_content && assets?size != 0>
635
636 <ul class="interior-article-moreContent-docs">
637
638 <#local orderedAssets = getOrderedAssets(assets) />
639 <#list orderedAssets?reverse as assetMap>
640
641 <#local assetDocEntry = assetMap.assetEntry />
642 <#local docEntry = dlFileEntryLocalService.getFileEntry(assetDocEntry.getClassPK()) />
643
644 <#if assetDocEntry.getAssetRenderer()??>
645
646 <#local linkedAssetRenderer = assetDocEntry.getAssetRenderer() />
647
648 <#local assetLinkEntryTitle = assetDocEntry.getTitle(locale) />
649 <#local assetLinkEntryDescription = assetDocEntry.getDescription(locale) />
650 <#local assetURL = linkedAssetRenderer.getURLDownload(themeDisplay) />
651
652 <#local extension = docEntry.getLatestFileVersion(true).getExtension() />
653 <#local extensionType = "" />
654 <#switch extension>
655 <#case "pdf">
656 <#local extensionType = "link-pdf" />
657 <#break>
658 <#case "jpg">
659 <#local extensionType = "link-img" />
660 <#break>
661 <#case "png">
662 <#local extensionType = "link-img" />
663 <#break>
664 <#case "mp4">
665 <#local extensionType = "link-video" />
666 <#break>
667 <#default>
668 </#switch>
669
670 <#local target = " href='"+ assetURL +"'" />
671
672 <li class="interior-article-moreContent-doc-item" data-entry-id="${assetDocEntry.entryId}">
673 <a ${target} class="inner-link interior-article-moreContent-doc ${extensionType}" title="${htmlUtil.escapeAttribute(assetLinkEntryDescription)}" >
674 ${assetLinkEntryTitle} <span class="interior-article-moreContent-aria">Ouvrir dans un nouvel onglet</span>
675 </a>
676 </li>
677
678 </#if>
679
680 </#list>
681
682 </ul>
683
684 </#if>
685
686</#macro>
687
688
689<#function getOrderedAssets assets>
690 <#local orderedAssets = [] />
691 <#local assetsWithDate = [] />
692 <#list assets as assetMap>
693 <#local asset = assetMap.assetEntry />
694 <#local modifiedDate = asset.getModifiedDate() />
695 <#local assetsWithDate = assetsWithDate + [{'assetMap':assetMap,'modifiedDate':modifiedDate}] />
696 </#list>
697 <#list assetsWithDate?sort_by('modifiedDate') as orderedAsset>
698 <#local orderedAssets = orderedAssets + [orderedAsset.assetMap] />
699 </#list>
700 <#return orderedAssets>
701</#function>
702
703
704<#function getOrderedDocs docs>
705 <#local orderedDocs = [] />
706 <#local docsWithDate = [] />
707 <#list docs as docMap>
708 <#local doc = assetEntryLocalService.getEntry(docMap.getGroupId(),docMap.getUuid()) />
709 <#local modifiedDate = doc.getModifiedDate() />
710 <#local docsWithDate = docsWithDate + [{'docMap':docMap,'modifiedDate':modifiedDate}] />
711 </#list>
712 <#list docsWithDate?sort_by('modifiedDate') as orderedDoc>
713 <#local orderedDocs = orderedDocs + [orderedDoc.docMap] />
714 </#list>
715 <#return orderedDocs>
716</#function>
717
718
719<#function isInternalLink link>
720 <#local internal = link?contains("www.agglo-larochelle.fr") || link?contains("www2.agglo-larochelle.fr") || link?contains("www-new.agglo-larochelle.fr") || !link?contains("//")>
721 <#return internal>
722</#function>
723
724
725<#function getField journalArticle fieldName>
726 <#local fieldValue = ''/>
727 <#local document = saxReaderUtil.read(journalArticle.getContent()) />
728 <#local rootElement = document.getRootElement() />
729 <#if (rootElement?? && rootElement?has_content)>
730 <#local xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='"+fieldName+"']/dynamic-content") />
731 <#if (validator.isNotNull(xPathSelector))>
732 <#local nbNodes = xPathSelector.selectNodes(rootElement)?size />
733 <#if (nbNodes > 0)>
734 <#local fieldValue = xPathSelector.selectSingleNode(rootElement).getStringValue() />
735 </#if>
736 </#if>
737 <#return fieldValue />
738 </#if>
739 </#function>