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