Plan local d'urbanisme intercommunal (PLUi)
Généralisé par la loi du 12 juillet 2010 dite loi « Grenelle 2 », le Plan Local d'Urbanisme intercommunal a été approuvé par le Conseil communautaire le 19 décembre 2019.
Plan Local d'Urbanisme intercommunal (PLUi)
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 assetLinkLocalService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetLinkLocalService") /> 11<#assign classNameLocalService = serviceLocator.findService("com.liferay.portal.service.ClassNameLocalService") /> 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 serviceContextThreadLocal = staticUtil["com.liferay.portal.service.ServiceContextThreadLocal"] /> 26<#assign themeDisplay = serviceContextThreadLocal.getServiceContext().getThemeDisplay() /> 27 28<#assign layout = themeDisplay['plid'] /> 29<#assign layoutService = serviceLocator.findService("com.liferay.portal.service.LayoutLocalService") /> 30<#assign layoutObject = layoutService.getLayout(layout?number) /> 31 32<#assign jaClassNameId = classNameLocalService.getClassNameId(typeJournalArticle) /> 33 34<#assign pdfViewer = '/fu/js/pdfjs/web/viewer.html?zoom=page-fit&file=' /> 35 36<#assign serviceContextThreadLocal = staticUtil["com.liferay.portal.service.ServiceContextThreadLocal"] /> 37<#assign themeDisplay = serviceContextThreadLocal.getServiceContext().getThemeDisplay() /> 38 39<#assign carouselNb = 0 /> 40<#assign anchorNb = 0 /> 41 42<#-- ARTICLE CONTAINER --> 43 44<div class="interior-article-container"> 45 46 <article class="interior-article interior-article-displayed interior-article-displayed-full"> 47 48 <section class="interior-article-mainContent"> 49 50 <#if relatedAssetTypedLists[typeJournalArticle]?? && relatedAssetTypedLists[typeJournalArticle]?has_content > 51 <@getTypedRelatedAssets relatedAssetTypedLists=relatedAssetTypedLists type=typeJournalArticle structure="CDA_ZOOM_SUR" /> 52 </#if> 53 54 <h2>${.vars['reserved-article-title'].data}</h2> 55 56 <#if Accroche.getData() != ""> 57 <p class="interior-article-chapo">${Accroche.getData()}</p> 58 </#if> 59 60 <#if Contenu.getSiblings()?has_content> 61 <#list Contenu.getSiblings() as content> 62 63 <#assign isAccordion = "" /> 64 <#assign isZoomed = content.par_zoom.getData() /> 65 <#if isZoomed == "true" > 66 <#assign isAccordion = "accordion-paragraph" /> 67 </#if> 68 69 <#assign zoomedParagraph = "" /> 70 <#assign isZoomed = content.par_zoom.getData() /> 71 <#if isZoomed == "true" > 72 <#assign zoomedParagraph = "zoomed-paragraph" /> 73 </#if> 74 75 <#assign floatingMedia = "no-floating-media" /> 76 <#assign alignValue = "" /> 77 <#assign alignValue = content.Media.alignment.getData() /> 78 <#if alignValue == "fLeft" || alignValue == "fRight" > 79 <#assign floatingMedia = "floating-media" /> 80 <#elseif alignValue == "flexLeft" || alignValue == "flexRight"> 81 <#assign floatingMedia = "flex-media" /> 82 </#if> 83 84 <#assign contentTitle = content.content_title.getData() /> 85 86 <#assign mediaSrc = "" /> 87 <#assign urlIframePortlet = "" /> 88 89 <#if content.Media?? && content.Media?has_content > 90 <#assign mediaSrc = content.Media.getData()/> 91 <#assign urlIframePortlet = content.Media.url_iframe_portlet.getData() /> 92 </#if> 93 94 95 <#if contentTitle!="" || content.getData()!="" || mediaSrc!="" || urlIframePortlet !="" > 96 97 <div class="interior-article-paragraph ${zoomedParagraph} ${floatingMedia}"> 98 99 <#assign anchor = '' /> 100 <#if content.anchor?has_content> 101 <#assign anchor = content.anchor.getData() /> 102 <#if anchor != "" > 103 <#assign anchor = 'id="'+anchor+'"' /> 104 </#if> 105 </#if> 106 107 <#if contentTitle != '' > 108 <#if isAccordion=="accordion-paragraph"> 109 <h3 ${anchor} class="accordion-title accordion-title-expanded"><button type="button" class="accordion-title-button" id="accord-btn-${anchorNb}" aria-controls="accord-sect-${anchorNb}" aria-expanded="true">${contentTitle}</button></h3> 110 <#else> 111 <h3 ${anchor}>${contentTitle}</h3> 112 </#if> 113 </#if> 114 115 <#if contentTitle != '' && isAccordion=="accordion-paragraph"> 116 <div class="accordion-content" role="region" id="accord-sect-${anchorNb}" aria-labelledby="accord-btn-${anchorNb}"> 117 <#assign anchorNb = anchorNb + 1 /> 118 </#if> 119 120 <#if floatingMedia == "no-floating-media" > 121 122 ${content.getData()?replace("<p></p>","")?replace('<blockquote>','<div class="blockquote">')?replace('</blockquote>','</div>')} 123 <#if content.Media?? && content.Media?has_content > 124 <@getMedia media=content.Media urlIframePortlet=urlIframePortlet /> 125 </#if> 126 127 <#elseif floatingMedia == "floating-media"> 128 129 <#if content.Media?? && content.Media?has_content > 130 <@getMedia media=content.Media urlIframePortlet=urlIframePortlet /> 131 </#if> 132 ${content.getData()?replace("<p></p>","")?replace('<blockquote>','<div class="blockquote">')?replace('</blockquote>','</div>')} 133 <div class="clear-float"></div> 134 135 <#elseif floatingMedia == "flex-media"> 136 137 <div class="flex-display flex-media-paragraph ${alignValue}"> 138 <#if content.Media?? && content.Media?has_content > 139 <@getMedia media=content.Media urlIframePortlet=urlIframePortlet /> 140 </#if> 141 <div class="flex-media-paragraph-content"> 142 ${content.getData()?replace("<p></p>","")?replace('<blockquote>','<div class="blockquote">')?replace('</blockquote>','</div>')} 143 </div> 144 </div> 145 146 </#if> 147 148 <#if contentTitle != '' && isAccordion=="accordion-paragraph"> 149 </div> 150 </#if> 151 152 </div> 153 154 </#if> 155 156 </#list> 157 </#if> 158 159 </section> 160 161 <@getCustomRelatedAssets relatedAssetTypedLists=relatedAssetTypedLists /> 162 163 </article> 164 165 <footer class="interior-article-footer"> 166 <ul class="interior-article-footer-items-list"> 167 <li class="interior-article-footer-item interior-article-profile"> <a class="inner-link" title="Gérer mon profil et mes services" href="/tableau-de-bord"><span class="sr-only">Mon profil</span></a> </li> 168 <li class="interior-article-footer-item interior-article-rss"> <a class="inner-link" title="Les flux RSS de l'agglo" href="/les-flux-rss-de-l-agglo"><span class="sr-only">Flux RSS</span></a> </li> 169 <li class="interior-article-footer-item interior-article-facebook"> <a class="inner-link" title="Page Facebook La Rochelle Agglo" href="https://www.facebook.com/larochelleagglo/"><span class="sr-only">Page Facebook La Rochelle Agglo</span></a> </li> 170 <li class="interior-article-footer-item interior-article-instagram"> <a class="inner-link" title="Page Instagram La Rochelle Agglo" href="https://www.instagram.com/larochelleagglo/"><span class="sr-only">Page Instagram La Rochelle Agglo</span></a> </li> 171 <li class="interior-article-footer-item interior-article-linkedin"> <a class="inner-link" title="Page Linkedin La Rochelle Agglo" href="https://fr.linkedin.com/company/communaute-d-agglomeration-de-la-rochelle"><span class="sr-only">Page Linkedin La Rochelle Agglo</span></a> </li> 172 <li class="interior-article-footer-item interior-article-twitter"> <a class="inner-link" title="Page Twitter/X La Rochelle Agglo" href="https://x.com/AggloLR"><span class="sr-only">Page Twitter/X La Rochelle Agglo</span></a> </li> 173 <li class="interior-article-footer-item interior-article-youtube"> <a class="inner-link" title="Chaîne Youtube La Rochelle Agglo" href="https://www.youtube.com/user/LaRochelleAgglo"><span class="sr-only">Chaîne Youtube La Rochelle Agglo</span></a> </li> 174 </ul> 175 </footer> 176 177</div> 178 179<#-- FOOTER CONTACT --> 180 181<footer class="interior-content-footer interior-content-footer-displayed"> 182 183 <#if relatedAssetTypedLists[typeJournalArticle]?? && relatedAssetTypedLists[typeJournalArticle]?has_content > 184 <@getTypedRelatedAssets relatedAssetTypedLists=relatedAssetTypedLists type=typeJournalArticle structure="CDA_CONTACT_SERVICE" /> 185 <#else> 186 <@getDefaultFooterContact /> 187 </#if> 188 189</footer> 190 191 192<#--************************************* 193** MEDIA DISPLAY 194*************************************--> 195 196<#macro getMedia media urlIframePortlet> 197 198 <#local mediaSrc = media.getData()/> 199 200 <#if mediaSrc != '' || urlIframePortlet != ''> 201 202 <#local mediaType = media.media_type.getData() /> 203 <#assign carouselWrapper = "" /> 204 <#if mediaType == "carousel"> 205 <#assign carouselWrapper = "interior-article-media-carousel-wrapper" /> 206 </#if> 207 <#local width = media.width.getData() /> 208 <#local displayWidth = '' /> 209 <#if width == 'null'> 210 <#local displayWidth = '' /> 211 <#elseif width != ""> 212 <#local displayWidth = 'style="width:'+width+'px;"' /> 213 </#if> 214 215 <#local height = media.height.getData() /> 216 <#if height == 'null'> 217 <#local height = '' /> 218 </#if> 219 <#local displayMode = media.display_mode.getData() /> 220 <#local imgMini = media.img_mini.getData() /> 221 <#local alignment = media.alignment.getData() /> 222 <#local legend = media.legend.getData() /> 223 <#local altText = media.alt_text.getData() /> 224 <#if altText == 'null'> 225 <#local altText = '' /> 226 </#if> 227 228 <#local hasLegend = legend?length != 0 /> 229 <#if hasLegend> 230 <figure class="interior-article-media interior-article-media-${alignment} ${carouselWrapper}" ${displayWidth}> 231 <#else> 232 <div class="interior-article-media interior-article-media-${alignment} ${carouselWrapper}" ${displayWidth}> 233 </#if> 234 235 <#switch mediaType> 236 <#case "image"> 237 <#if displayMode == "normal"> 238 <@getImageMedia mediaSrc=mediaSrc urlIframePortlet=urlIframePortlet altText=altText height=height width=width /> 239 <#elseif displayMode == "popup"> 240 <@getImageMediaPopup imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height width=width /> 241 </#if> 242 <#break > 243 <#case "video"> 244 <#if displayMode == "normal"> 245 <@getVideoMedia imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height width=width /> 246 <#elseif displayMode == "popup"> 247 <@getVideoMediaPopup imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height width=width /> 248 </#if> 249 <#break > 250 <#case "pdf"> 251 <#if displayMode == "normal"> 252 <@getPdfMedia mediaSrc=mediaSrc altText=altText height=height /> 253 <#elseif displayMode == "popup"> 254 <@getPdfMediaPopup imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height width=width /> 255 </#if> 256 <#break > 257 <#case "iframe"> 258 <#if displayMode == "normal"> 259 <@getIframeMedia urlIframePortlet=urlIframePortlet altText=altText height=height /> 260 <#elseif displayMode == "popup"> 261 <@getIframeMediaPopup imgMini=imgMini urlIframePortlet=urlIframePortlet altText=altText height=height width=width /> 262 </#if> 263 <#break > 264 <#case "svg"> 265 <#if displayMode == "normal"> 266 <@getSvgMedia mediaSrc=mediaSrc height=height /> 267 <#elseif displayMode == "popup"> 268 <@getSvgMediaPopup imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height /> 269 </#if> 270 <#break > 271 <#case "flash"> 272 <#if displayMode == "normal"> 273 <@getFlashMedia mediaSrc=mediaSrc height=height /> 274 <#elseif displayMode == "popup"> 275 <@getFlashMediaPopup imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height /> 276 </#if> 277 <#break > 278 <#case "portlet"> 279 <#if displayMode == "normal"> 280 <@getPortletMedia urlIframePortlet=urlIframePortlet height=height /> 281 <#elseif displayMode == "popup"> 282 <@getPortletMediaPopup imgMini=imgMini urlIframePortlet=urlIframePortlet altText=altText height=height width=width /> 283 </#if> 284 <#break > 285 <#case "flickr"> 286 <#if displayMode == "normal"> 287 <@getFlickrMedia urlIframePortlet=urlIframePortlet /> 288 <#elseif displayMode == "popup"> 289 <@getFlickrMediaPopup imgMini=imgMini urlIframePortlet=urlIframePortlet altText=altText height=height /> 290 </#if> 291 <#break > 292 <#case "gallery"> 293 <#if displayMode == "normal"> 294 <@getGalleryMedia mediaSrc=mediaSrc height=height /> 295 <#elseif displayMode == "popup"> 296 <@getGalleryMediaPopup imgMini=imgMini mediaSrc=mediaSrc altText=altText height=height /> 297 </#if> 298 <#break > 299 <#case "carousel"> 300 <#if displayMode == "normal"> 301 <@getCarouselMedia media=media mediaSrc=mediaSrc altText=altText height=height width=width /> 302 <#assign carouselNb = carouselNb + 1 /> 303 <#elseif displayMode == "popup"> 304 <@getCarouselMediaPopup imgMini=imgMini media=media mediaSrc=mediaSrc altText=altText height=height width=width /> 305 </#if> 306 <#break > 307 <#default> 308 </#switch> 309 310 <#if hasLegend> 311 <figcaption class="interior-article-media-legend">${legend}</figcaption> 312 </figure> 313 <#else> 314 </div> 315 </#if> 316 317 </#if> 318 319</#macro> 320 321 322<#macro getImageMedia mediaSrc urlIframePortlet altText height width > 323 <#local displayedHeight = '' /> 324 <#if height != ""> 325 <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 326 </#if> 327 <#if urlIframePortlet != ""> 328 <#assign target = "href='"+ urlIframePortlet +"'" /> 329 <#if !isInternalLink(urlIframePortlet)> 330 <#assign target = target + " target='_blank' rel='noopener noreferrer'" /> 331 </#if> 332 <a ${target}> 333 </#if> 334 <img class="interior-article-media-image" src="${mediaSrc}" loading="lazy" alt="${altText}" ${displayedHeight} <#if width!=""> width="${width}"</#if> <#if height!=""> height="${height}"</#if> /> 335 <#if urlIframePortlet != ""> 336 </a> 337 </#if> 338</#macro> 339 340 341<#macro getImageMediaPopup imgMini mediaSrc altText height width > 342 <#local displayedHeight = '' /> 343 <#if height != ""> 344 <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 345 </#if> 346 <a class="link-img" href="${mediaSrc}" title="${altText}"> 347 <img class="interior-article-media-image" src="${imgMini}" loading="lazy" alt="${altText}" ${displayedHeight} <#if width!=""> width="${width}"</#if> <#if height!=""> height="${height}"</#if> /> 348 </a> 349</#macro> 350 351 352<#macro getVideoMedia imgMini mediaSrc height altText width> 353 <#local displayedHeight = '' /> 354 <#if height != ""> 355 <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 356 </#if> 357 <video class="interior-article-media-video" itemprop="url" poster="${imgMini}" title="${htmlUtil.escapeAttribute(altText)}" 358 controls="" preload="auto" ${displayedHeight} <#if width!=""> width="${width}"</#if> <#if height!=""> height="${height}"</#if> > 359 <source itemprop="url" content="https://www2.larochelle-technopole.fr${mediaSrc}" src="${mediaSrc}" type="video/mp4"> 360 <a href="${mediaSrc}" download="">${htmlUtil.escapeAttribute(altText)}</a> 361 </video> 362</#macro> 363 364 365<#macro getVideoMediaPopup imgMini mediaSrc altText height width > 366 <#local displayedHeight = '' /> 367 <#if height != ""> 368 <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 369 </#if> 370 <a class="link-video" href="${mediaSrc}" title="${altText}"> 371 <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> /> 372 </a> 373</#macro> 374 375 376<#macro getPdfMedia mediaSrc altText height > 377 <#local displayedHeight = '' /> 378 <#if height != ""> 379 <#local displayedHeight = 'style="height:'+height+'px;"' /> 380 </#if> 381 <embed class="interior-article-media-iframe" src="${mediaSrc}" loading="lazy" title="${htmlUtil.escapeAttribute(altText)}" ${displayedHeight} /> 382</#macro> 383 384 385<#macro getPdfMediaPopup imgMini mediaSrc altText height width > 386 <#local displayedHeight = '' /> 387 <#if height != ""> 388 <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 389 </#if> 390 <a class="popup-img-opener" href="${mediaSrc}" title="${htmlUtil.escapeAttribute(altText)}" target="_blank" rel="noopener noreferrer"> 391 <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> /> 392 </a> 393</#macro> 394 395 396<#macro getIframeMedia urlIframePortlet altText height > 397 <#local displayedHeight = '' /> 398 <#if height != ""> 399 <#local displayedHeight = 'style="height:'+height+'px;"' /> 400 </#if> 401 <#if urlIframePortlet?contains("youtube")> 402 <#local youtubeId = urlIframePortlet?substring(urlIframePortlet?index_of("embed/")+6) /> 403 <div class="interior-article-media-youtube-blocker" ${displayedHeight}> 404 <div class="youtube-blocker-img-wrapper"> 405 <img class="youtube-blocker-img" src="https://img.youtube.com/vi/${youtubeId}/0.jpg" loading="lazy" alt="${htmlUtil.escapeAttribute(altText)}" /> 406 </div> 407 <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> 408 <div class="youtube-blocker-btn-wrapper"> 409 <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> 410 <a href="https://www.youtube.com/static?template=terms&gl=FR" class="youtube-blocker-btn" target="_blank" rel="noopener noreferrer">En savoir plus</a> 411 </div> 412 </div> 413 <#else> 414 <iframe class="interior-article-media-iframe" src="${urlIframePortlet}" loading="lazy" title="${htmlUtil.escapeAttribute(altText)}" ${displayedHeight} allowfullscreen ></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}" loading="lazy" 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}" loading="lazy" 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}" loading="lazy" 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="${imgMini}" loading="lazy" 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?? && height != "" && width?? && width != "" > 610 <#local ratio = height?number / width?number * 100 /> 611 <#local ratioDisplay = 'style="padding-top:' + ratio + '%"' /> 612 </#if> 613 614 <#local totalNumber = 1 /> 615 <#if media.media_more??> 616 <#local totalNumber = media.media_more.getSiblings()?size + 1 /> 617 </#if> 618 619 <div class="carousel" id="carousel-${carouselNb}" aria-role-description="carousel" aria-label="Carousel de photos" data-carousel="carousel-${carouselNb}" ${ratioDisplay}> 620 621 <button type="button" id="carousel-${carouselNb}-arrow-prev" data-carousel="carousel-${carouselNb}" data-direction="prev" class="carousel-arrow carousel-arrow-prev"><span class="sr-only">Afficher l'image précédente</span></button> 622 <button type="button" id="carousel-${carouselNb}-arrow-next" data-carousel="carousel-${carouselNb}" data-direction="next" class="carousel-arrow carousel-arrow-next"><span class="sr-only">Afficher l'image suivante</span></button> 623 624 <div class="carousel-content" ari-live="polite"> 625 <div id="carousel-${carouselNb}-img-0" data-carousel="carousel-${carouselNb}" data-img="0" class="carousel-img carousel-img-displayed" role="group" aria-roledescription="photo" aria-label="1 sur ${totalNumber}"> 626 <img class="carousel-img-content" src="/cdalr-new-theme/images/blank.png" data-src="${mediaSrc}" alt="${altText}"> 627 </div> 628 629 <#if media.media_more??> 630 <#list media.media_more.getSiblings() as node> 631 <div id="carousel-${carouselNb}-img-${node_index+1}" data-carousel="carousel-${carouselNb}" data-img="${node_index+1}" class="carousel-img carousel-img-noDisplay" role="group" aria-roledescription="photo" aria-label="${node_index+2} sur ${totalNumber}"> 632 <img class="carousel-img-content" src="/cdalr-new-theme/images/blank.png" data-src="${node.getData()}" alt="${altText}"> 633 </div> 634 </#list> 635 </#if> 636 </div> 637 638 </div> 639 640</#macro> 641 642 643<#macro getCarouselMediaPopup imgMini media mediaSrc altText height width > 644 <#local diapos = mediaSrc /> 645 <#if media.media_more??> 646 <#list media.media_more.getSiblings() as node> 647 <#if node_index != 0> 648 <#local diapos = diapos + "," /> 649 </#if> 650 <#local diapos = diapos + node.getData() /> 651 </#list> 652 </#if> 653 <#local displayedHeight = '' /> 654 <#if height != ""> 655 <#local displayedHeight = 'style="max-height:'+height+'px;"' /> 656 </#if> 657 <a class="link-diapo popup-img-opener" href="${mediaSrc}" title="${htmlUtil.escapeAttribute(altText)}" data-diapos="${diapos}"> 658 <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> /> 659 </a> 660</#macro> 661 662 663<#--************************************* 664** RELATED CONTENT 665*************************************--> 666 667<#function buildRelatedAssetTypedLists entry info > 668 <#assign relatedAssetTypedLists = {} /> 669 <#assign infos = "" /> 670 <#assign assetLinks = assetLinkLocalService.getDirectLinks(entry.getEntryId()) /> 671 672 <#list assetLinks as assetLink> 673 <#if assetLink.getEntryId1() == entry.getEntryId() > 674 <#assign assetLinkEntry = assetEntryLocalService.getEntry(assetLink.getEntryId2()) /> 675 <#else> 676 <#assign assetLinkEntry = assetEntryLocalService.getEntry(assetLink.getEntryId1()) /> 677 </#if> 678 679 <#if assetLinkEntry?? && assetLinkEntry.isVisible() > 680 <#assign linkedAssetRenderer = assetLinkEntry.getAssetRenderer() /> 681 682 <#if linkedAssetRenderer.hasViewPermission(permissionChecker) > 683 684 <#assign type = assetLinkEntry.getClassName() /> 685 686 <#assign newEntry = [{"assetEntry":assetLinkEntry,"assetLink":assetLink}] /> 687 <#if relatedAssetTypedLists?keys?seq_contains(type)> 688 <#assign relatedAssetTypedList = relatedAssetTypedLists[type] + newEntry /> 689 <#else> 690 <#assign relatedAssetTypedList = newEntry /> 691 </#if> 692 <#assign relatedAssetTypedLists = relatedAssetTypedLists + {type : relatedAssetTypedList} /> 693 <#-- 694 <#assign infos> 695 ${infos} ${type}=${relatedAssetTypedLists[type]?size} (${newEntry?first.getClassPK()}) <br/> 696 </#assign> 697 --> 698 </#if> 699 </#if> 700 </#list> 701 702 <#if info == "true"> 703 <#return infos /> 704 <#else> 705 <#return relatedAssetTypedLists /> 706 </#if> 707 <#return {} /> 708</#function> 709 710 711<#macro getCustomRelatedAssets relatedAssetTypedLists> 712 <#local hasRelatedAssets = "false" /> 713 <#if relatedAssetTypedLists[typeBookmarksEntry]?? && relatedAssetTypedLists[typeBookmarksEntry]?size != 0> 714 <#local hasRelatedAssets = "true" /> 715 </#if> 716 <#if relatedAssetTypedLists[typeDLFileEntry]?? && relatedAssetTypedLists[typeDLFileEntry]?size != 0> 717 <#local hasRelatedAssets = "true" /> 718 </#if> 719 <#if relatedAssetTypedLists[typeJournalArticle]?? && relatedAssetTypedLists[typeJournalArticle]?has_content > 720 <#local webContentNb = getRelatedWebContentNb(relatedAssetTypedLists[typeJournalArticle]) /> 721 <#if webContentNb != 0> 722 <#local hasRelatedAssets = "true" /> 723 </#if> 724 </#if> 725 <#if hasRelatedAssets == "true" > 726 <aside class="interior-article-moreContent-container"> 727 <h3 class="interior-article-moreContent-title">En savoir plus</h3> 728 <#if relatedAssetTypedLists[typeJournalArticle]?? && relatedAssetTypedLists[typeJournalArticle]?has_content > 729 <@getRelatedWebContents assets=relatedAssetTypedLists[typeJournalArticle] /> 730 </#if> 731 <#if relatedAssetTypedLists[typeBookmarksEntry]?? && relatedAssetTypedLists[typeBookmarksEntry]?has_content > 732 <@getTypedRelatedAssets relatedAssetTypedLists=relatedAssetTypedLists type=typeBookmarksEntry structure=""/> 733 </#if> 734 <#if relatedAssetTypedLists[typeDLFileEntry]?? && relatedAssetTypedLists[typeDLFileEntry]?has_content > 735 <@getTypedRelatedAssets relatedAssetTypedLists=relatedAssetTypedLists type=typeDLFileEntry structure="" /> 736 </#if> 737 </aside> 738 </#if> 739</#macro> 740 741 742<#macro getTypedRelatedAssets relatedAssetTypedLists type structure> 743 <#if type == typeJournalArticle && structure == "CDA_ZOOM_SUR" > 744 <@getRelatedZoomSur assets=relatedAssetTypedLists[type] /> 745 <#elseif type == typeJournalArticle && structure == "CDA_CONTACT_SERVICE" > 746 <@getRelatedFooterContact assets=relatedAssetTypedLists[type] /> 747 <#elseif type == typeBookmarksEntry > 748 <@getRelatedPages assets=relatedAssetTypedLists[type] /> 749 <#elseif type == typeDLFileEntry > 750 <@getRelatedDocuments assets=relatedAssetTypedLists[type] /> 751 </#if> 752</#macro> 753 754 755<#macro getRelatedZoomSur assets> 756 <#if assets?size != 0> 757 <#list assets as assetMap> 758 <#local asset = assetMap.assetEntry /> 759 <#local article = journalArticleLocalService.getLatestArticle(asset.getClassPK()) /> 760 <#assign strucName = journalStructureLocalService.getStructure(article.groupId, jaClassNameId, article.structureId?string, true).getName(locale) /> 761 <#if strucName == 'CDA_ZOOM_SUR'> 762 <#local img = getField(article,"back_img")/> 763 <#local url = getField(article,"url_link")/> 764 <#local target = "href='"+ url +"'" /> 765 <#if !isInternalLink(url)> 766 <#local target = target + " target='_blank' rel='noopener noreferrer'" /> 767 </#if> 768 <div class="article-header-alert"> 769 <#if url != ""> 770 <a class="inner-link" ${target}> 771 </#if> 772 <img src="${img}" loading="lazy" alt="${asset.getTitleCurrentValue()}"/> 773 <h3 class="article-header-alert-title">${asset.getTitleCurrentValue()}</h3> 774 <#if url != ""> 775 </a> 776 </#if> 777 </div> 778 </#if> 779 </#list> 780 </#if> 781</#macro> 782 783<#macro getRelatedFooterContact assets> 784 <#if assets?size == 0> 785 <@getDefaultFooterContact /> 786 <#else> 787 <#local hasContactFooter = false /> 788 <#list assets as assetMap> 789 <#local asset = assetMap.assetEntry /> 790 <#local article = journalArticleLocalService.getLatestArticle(asset.getClassPK()) /> 791 <#assign strucName = journalStructureLocalService.getStructure(article.groupId, jaClassNameId, article.structureId?string, true).getName(locale) /> 792 <#if strucName == 'CDA_CONTACT_SERVICE'> 793 <#local contact_service = getField(article,"Contact_service")/> 794 <#local adresse = getField(article,"Adresse")/> 795 <#local cp = getField(article,"CP")/> 796 <#local ville = getField(article,"Ville")/> 797 <#local telephone = getField(article,"Telephone")/> 798 <#if telephone==""> 799 <#local telephone = "05 46 30 34 00" /> 800 </#if> 801 <#local courriel = getField(article,"Courriel")/> 802 <#local annuaire = getField(article,"annuaire_link")/> 803 <#if annuaire==""> 804 <#local annuaire = "/annuaire-des-services"/> 805 </#if> 806 <ul class="interior-content-footer-list"> 807 <li class="interior-content-footer-contact"> 808 <a class="interior-content-footer-service" href="${annuaire}" <@getJournalArticleEditIcon journalArticle=article />> 809 <h2>Contact<br/> 810 ${asset.getTitle(locale)}</h2> 811 </a> 812 </li> 813 <li class="interior-content-footer-contact interior-content-footer-address"> 814 <span class="interior-content-footer-contact-inner">${adresse}<br/>${cp} ${ville}</span> 815 </li> 816 <li class="interior-content-footer-contact interior-content-footer-phone"> 817 <span class="interior-content-footer-contact-inner">${telephone}</span> 818 </li> 819 <li class="interior-content-footer-contact interior-content-footer-email"> 820 <a href="mailto:${courriel}?subject=Contact%20site%20Agglo"> 821 <span class="interior-content-footer-contact-inner">Envoyer un courriel</span> 822 </a> 823 </li> 824 <li> 825 <a class="interior-content-footer-annuaire" href="${annuaire}"><span class="sr-only">Annuaire des services</span></a> 826 </li> 827 </ul> 828 <#local hasContactFooter = true /> 829 <#break /> 830 </#if> 831 </#list> 832 <#if hasContactFooter == false> 833 <@getDefaultFooterContact /> 834 </#if> 835 </#if> 836</#macro> 837 838 839<#macro getDefaultFooterContact > 840 <ul class="interior-content-footer-list"> 841 <li class="interior-content-footer-contact"> 842 <a class="interior-content-footer-service" href="/annuaire-des-services" > 843 <h2>Contact<br/> 844 Agglo La Rochelle</h2> 845 </a> 846 </li> 847 <li class="interior-content-footer-contact interior-content-footer-address"> 848 <span class="interior-content-footer-contact-inner">6, rue Saint-Michel<br/>17000 La Rochelle</span> 849 </li> 850 <li class="interior-content-footer-contact interior-content-footer-phone"> 851 <span class="interior-content-footer-contact-inner">05 46 30 34 00</span> 852 </li> 853 <li class="interior-content-footer-contact interior-content-footer-email"> 854 <a href="/contacter-l-agglo"> 855 <span class="interior-content-footer-contact-inner">Envoyer un courriel</span> 856 </a> 857 </li> 858 <li> 859 <a class="interior-content-footer-annuaire" href="/annuaire-des-services"><span class="sr-only">Annuaire des services</span></a> 860 </li> 861 </ul> 862</#macro> 863 864 865<#function getRelatedWebContentNb assets> 866 <#local nb = 0 /> 867 <#if assets?size != 0> 868 <#local nb = 0 /> 869 <#list assets as assetMap> 870 <#local asset = assetMap.assetEntry /> 871 <#local article = journalArticleLocalService.getLatestArticle(asset.getClassPK()) /> 872 <#assign strucName = journalStructureLocalService.getStructure(article.groupId, jaClassNameId, article.structureId?string, true).getName(locale) /> 873 <#if strucName != 'CDA_CONTACT_SERVICE' && strucName != 'CDA_ZOOM_SUR'> 874 <#local nb = nb + 1 /> 875 </#if> 876 </#list> 877 </#if> 878 <#return nb /> 879</#function> 880 881 882<#macro getRelatedWebContents assets> 883 884 <#local pagesNb = 0 /> 885 <#local pages = [] /> 886 887 <#if assets?has_content && assets?size != 0> 888 <#list assets as assetMap> 889 <#local asset = assetMap.assetEntry /> 890 <#local article = journalArticleLocalService.getLatestArticle(asset.getClassPK()) /> 891 <#local strucName = journalStructureLocalService.getStructure(article.groupId, jaClassNameId, article.structureId?string, true).getName(locale) /> 892 <#if strucName == "CDA_ARTICLE_CMS_ENRICHI" || strucName == "CDA_ACTU"> 893 <#local pagesNb = pagesNb + 1 /> 894 <#local pages = pages + [assetMap] /> 895 </#if> 896 </#list> 897 </#if> 898 899 <#if pagesNb != 0> 900 901 <ul> 902 903 <#list pages as page> 904 905 <#local asset = page.assetEntry /> 906 <#local article = journalArticleLocalService.getLatestArticle(asset.getClassPK()) /> 907 <#local strucName = journalStructureLocalService.getStructure(article.groupId, jaClassNameId, article.structureId?string, true).getName(locale) /> 908 <#if article.getLayoutUuid()?has_content> 909 <#if strucName == "CDA_ARTICLE_CMS_ENRICHI"> 910 <#local displayPage = layoutService.getLayoutByUuidAndGroupId(article.getLayoutUuid(),article.getGroupId(), false) /> 911 <#local assetPublisherURL = displayPage.getFriendlyURL() + "?article=" + article.getUrlTitle() /> 912 <#elseif strucName == "CDA_ACTU"> 913 <#local assetPublisherURL = "/-/" + article.getUrlTitle() /> 914 </#if> 915 <li class="interior-article-moreContent"><a href="${assetPublisherURL}">${article.getTitle(locale)}</a></li> 916 </#if> 917 918 </#list> 919 920 </ul> 921 922 </#if> 923 924</#macro> 925 926 927<#macro getRelatedPages assets> 928 <ul> 929 <#local orderedAssets = getOrderedAssets(assets) /> 930 <#list orderedAssets?reverse as assetMap> 931 <#local asset = assetMap.assetEntry /> 932 <#local assetLink = assetMap.assetLink /> 933 <#local linkedAssetRenderer = asset.getAssetRenderer() /> 934 <#local assetLinkEntryTitle = asset.getTitle(locale) /> 935 <#local assetLinkEntryDescription = asset.getDescription() /> 936 <#local assetLinkBookmark = bookmarksEntryLocalService.getEntry(asset.getClassPK()) /> 937 <#local assetURL = assetLinkBookmark.getUrl() /> 938 939 <#local target = "" /> 940 <#if assetURL?contains('widget') || assetURL?contains('iframe') || assetURL?contains('embed') > 941 <#local target = " data-iframe='true' href='"+ assetURL +"' class='link-iframe'" /> 942 <#else> 943 <#local target = "href='"+ assetURL +"'" /> 944 <#if !isInternalLink(assetURL)> 945 <#local target = target + " target='_blank' rel='noopener noreferrer'" /> 946 </#if> 947 </#if> 948 949 <li class="interior-article-moreContent" data-entry-id="${asset.getEntryId()}"><a ${target} title="${htmlUtil.escapeAttribute(assetLinkEntryDescription)}">${assetLinkEntryTitle}</a></li> 950 </#list> 951 </ul> 952</#macro> 953 954 955<#macro getRelatedDocuments assets> 956 957 <#assign folderNb = 0 /> 958 <#local orderedAssets = getOrderedAssets(assets) /> 959 <#local collapsedFolders = false /> 960 961 <#list orderedAssets?reverse as assetMap> 962 963 <#local asset = assetMap.assetEntry /> 964 <#local fileEntry = dlFileEntryLocalService.getFileEntry(asset.getClassPK()) /> 965 966 <#local documents = dlFileEntryLocalService.getFileEntries(fileEntry.getGroupId(),fileEntry.getFolderId()) /> 967 <#local folder = fileEntry.getFolder() /> 968 <#local folderDescription = folder.getDescription()/> 969 <#if folderDescription != ""> 970 <#if documents?size > 5> 971 <#local collapsedFolders = true /> 972 </#if> 973 </#if> 974 </#list> 975 976 <#list orderedAssets?reverse as assetMap> 977 978 <#local asset = assetMap.assetEntry /> 979 <#local fileEntry = dlFileEntryLocalService.getFileEntry(asset.getClassPK()) /> 980 981 <#local documents = dlFileEntryLocalService.getFileEntries(fileEntry.getGroupId(),fileEntry.getFolderId()) /> 982 <#local folder = fileEntry.getFolder() /> 983 <#local folderDescription = folder.getDescription()/> 984 <#if folderDescription != ""> 985 <#if collapsedFolders == true> 986 <input type="checkbox" class="interior-article-moreContent-checkbox" id="interior-article-moreContent-checkbox-${folderNb}" name="interior-article-moreContent-checkbox-${folderNb}"> 987 <p class="interior-article-moreContent-title"><label for="interior-article-moreContent-checkbox-${folderNb}">${folderDescription}</label></p> 988 <#assign folderNb = folderNb + 1 /> 989 <#else> 990 <p class="interior-article-moreContent-title">${folderDescription}</p> 991 </#if> 992 </#if> 993 994 <ul class="interior-article-moreContent-list"> 995 <#local orderedDocs = getOrderedDocs(documents) /> 996 <#list orderedDocs?reverse as docEntry> 997 998 <#if !docEntry.isInTrash()> 999 1000 <#local assetDocEntry = assetEntryLocalService.getEntry(docEntry.getGroupId(),docEntry.getUuid()) /> 1001 1002 <#if assetDocEntry.getAssetRenderer()??> 1003 1004 <#local linkedAssetRenderer = assetDocEntry.getAssetRenderer() /> 1005 1006 <#local assetLinkEntryTitle = assetDocEntry.getTitle(locale) /> 1007 <#local assetLinkEntryDescription = assetDocEntry.getDescription(locale) /> 1008 <#local extension = docEntry.getLatestFileVersion(true).getExtension() /> 1009 1010 <#local assetURL = linkedAssetRenderer.getURLDownload(themeDisplay) /> 1011 1012 <#local displaySize = "" /> 1013 <#local size = docEntry.getLatestFileVersion(true).getSize() /> 1014 <#if size/1024 < 1024 > 1015 <#local formatSize = size/1024 /> 1016 <#local displaySize = formatSize?round?string + " Ko" /> 1017 <#else> 1018 <#local formatSize = size/10485.76 /> 1019 <#local displaySize = (formatSize?round/100)?string + " Mo" /> 1020 </#if> 1021 1022 <#local extensionType = "" /> 1023 <#switch extension> 1024 <#case "pdf"> 1025 <#local extensionType = "link-pdf" /> 1026 <#break> 1027 <#case "jpg"> 1028 <#local extensionType = "link-img" /> 1029 <#break> 1030 <#case "png"> 1031 <#local extensionType = "link-img" /> 1032 <#break> 1033 <#case "mp4"> 1034 <#local extensionType = "link-video" /> 1035 <#break> 1036 <#case "swf"> 1037 <#local extensionType = "link-flash" /> 1038 <#break> 1039 <#default> 1040 </#switch> 1041 <#assign dlFileEntry = docEntry.getLatestFileVersion(true)/> 1042 1043 <#local toDownload = "" /> 1044 <#if assetLinkEntryTitle?contains("- téléchargement")> 1045 <#local toDownload = "download" /> 1046 <#if assetURL?contains("?version")> 1047 <#local assetURL = assetURL + "&download=true" /> 1048 <#else> 1049 <#local assetURL = assetURL + "?download=true" /> 1050 </#if> 1051 </#if> 1052 1053 <#local target = " href='"+ assetURL +"'" /> 1054 1055 <li class="interior-article-moreContent" data-entry-id="${asset.entryId}"> 1056 <a ${target} class="extension-${extension} ${extensionType}" title="${htmlUtil.escapeAttribute(assetLinkEntryDescription)}" ${toDownload} target="_blank" > 1057 ${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> 1058 </a> 1059 </li> 1060 1061 </#if> 1062 1063 </#if> 1064 1065 </#list> 1066 </ul> 1067 1068 </#list> 1069 1070</#macro> 1071 1072 1073<#function getOrderedAssets assets> 1074 <#local orderedAssets = [] /> 1075 <#local assetsWithDate = [] /> 1076 <#list assets as assetMap> 1077 <#local asset = assetMap.assetEntry /> 1078 <#local modifiedDate = asset.getModifiedDate() /> 1079 <#local assetsWithDate = assetsWithDate + [{'assetMap':assetMap,'modifiedDate':modifiedDate}] /> 1080 </#list> 1081 <#list assetsWithDate?sort_by('modifiedDate') as orderedAsset> 1082 <#local orderedAssets = orderedAssets + [orderedAsset.assetMap] /> 1083 </#list> 1084 <#return orderedAssets> 1085</#function> 1086 1087<#function getOrderedDocs docs> 1088 <#local orderedDocs = [] /> 1089 <#local docsWithDate = [] /> 1090 <#list docs as docMap> 1091 <#local doc = assetEntryLocalService.getEntry(docMap.getGroupId(),docMap.getUuid()) /> 1092 <#local modifiedDate = doc.getModifiedDate() /> 1093 <#local docsWithDate = docsWithDate + [{'docMap':docMap,'modifiedDate':modifiedDate}] /> 1094 </#list> 1095 <#list docsWithDate?sort_by('modifiedDate') as orderedDoc> 1096 <#local orderedDocs = orderedDocs + [orderedDoc.docMap] /> 1097 </#list> 1098 <#return orderedDocs> 1099</#function> 1100 1101 1102<#function isInternalLink link> 1103 <#local internal = link?contains(".agglo-larochelle.fr") || !link?contains("//")> 1104 <#return internal> 1105</#function> 1106 1107 1108<#function getField journalArticle fieldName> 1109 <#local fieldValue = ''/> 1110 <#local document = saxReaderUtil.read(journalArticle.getContent()) /> 1111 <#local rootElement = document.getRootElement() /> 1112 <#if (rootElement?? && rootElement?has_content)> 1113 <#local xPathSelector = saxReaderUtil.createXPath("dynamic-element[@name='"+fieldName+"']/dynamic-content") /> 1114 <#if (validator.isNotNull(xPathSelector))> 1115 <#local nbNodes = xPathSelector.selectNodes(rootElement)?size /> 1116 <#if (nbNodes > 0)> 1117 <#local fieldValue = xPathSelector.selectSingleNode(rootElement).getStringValue() /> 1118 </#if> 1119 </#if> 1120 <#return fieldValue /> 1121 </#if> 1122</#function>