Rossi: 'Reti di trasporto un corridoio decisivo per la Toscana' - Toscana Notizie
Si è verificato un errore nell'elaborarazione del modello.
Java method "static com.liferay.portal.kernel.service.UserLocalServiceUtil.getUserByScreenName(long, String)" threw an exception; see cause exception in the Java stack trace. ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign userAutore = UserLocalService... [in template "10154#10192#735807" at line 169, column 41] ----
1<#setting locale="it_IT">
2<#setting time_zone=timeZone.ID>
3
4<#assign hasCookie >
5 <@rt.checkCookieAcceptance siteId=themeDisplay.getScopeGroupId() cookieToCheck="third-party" />
6</#assign>
7
8<#assign AssetEntryLocalServiceUtil = staticUtil["com.liferay.asset.kernel.service.AssetEntryLocalServiceUtil"] />
9<#assign assetLinkLocalService = serviceLocator.findService("com.liferay.asset.link.service.AssetLinkLocalService") />
10
11<#assign JournalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")>
12<#assign journalArticleId = .vars['reserved-article-id'].data/>
13
14<#assign article = JournalArticleLocalService.getArticle(groupId, journalArticleId) />
15<#assign entry = AssetEntryLocalServiceUtil.fetchEntry("com.liferay.journal.model.JournalArticle", article.resourcePrimKey) />
16
17<#assign categoryList = entry.getCategories() />
18<#assign UserLocalServiceUtil = staticUtil["com.liferay.portal.kernel.service.UserLocalServiceUtil"]>
19<#assign DLFileEntryLocalServiceUtil = serviceLocator.findService('com.liferay.document.library.kernel.service.DLFileEntryLocalService') />
20
21<#assign currentArticle = JournalArticleLocalService.getArticle(groupId, .vars['reserved-article-id'].data) />
22<#assign currentArticleResourcePrimKey = currentArticle.getResourcePrimKey() />
23<#assign currentArticleAssetEntry = AssetEntryLocalServiceUtil.getEntry("com.liferay.journal.model.JournalArticle", currentArticleResourcePrimKey) />
24<#assign currentArticleAssetEntryId = currentArticleAssetEntry.getEntryId() />
25
26<#assign entryTitle = htmlUtil.escape(entry.getTitle(locale)?html) />
27
28<#assign siteBaseURL = themeDisplay.getPortalURL() />
29<#assign imagePath = themeDisplay.getTheme().getContextPath() + themeDisplay.getTheme().getImagesPath() />
30
31<#assign assetRenderer = entry.getAssetRenderer() />
32<#assign urlSocial = siteBaseURL + "/-/" + assetRenderer.getUrlTitle() />
33
34<#if article.getExpandoBridge().hasAttribute("TinyURL") >
35 <#assign urlSocialApp = article.getExpandoBridge().getAttribute("TinyURL")?html />
36
37 <#if urlSocialApp?? && urlSocialApp != "">
38 <#assign urlSocial = "http://w3.webrt.it" + urlSocialApp />
39 </#if>
40</#if>
41
42
43
44<#assign appImagePath = "" />
45<#if Immagine.getData()?? && Immagine.getData() != "">
46 <#assign appImagePath = "http://toscana-notizie.it" + Immagine.getData() />
47<#else>
48 <#assign appImagePath = "http://toscana-notizie.it/" + imagePath + "/toscana-notizie-placeholder.png" />
49</#if>
50
51<#assign appSummary = "" />
52<#if entry.getSummary(locale)?? && entry.getSummary(locale) != "">
53 <#assign appSummary = entry.getSummary(locale) />
54</#if>
55
56
57
58
59<#assign Autori = [] />
60<#assign temi = [] />
61<#assign Provincia = [] />
62<#assign Speciali = [] />
63<#assign visualizzazionearticoli = [] />
64
65<#assign currentCategory = 0 />
66
67<#list categoryList as category>
68 <#assign AssetVocabularyServiceUtil = staticUtil["com.liferay.asset.kernel.service.AssetVocabularyServiceUtil"]>
69 <#assign assetVocabulary = AssetVocabularyServiceUtil.getVocabulary(category.getVocabularyId()) />
70 <#if assetVocabulary.getName() == "Temi">
71
72 <#if category.getParentCategory()??>
73 <#assign childCategory = category.getName()/>
74 <#else>
75 <#if (currentCategory?? && currentCategory != category.getCategoryId()) >
76 <#assign currentCategory = category.getCategoryId() />
77 <#assign parentCategory = category.getName()/>
78 <#assign temi = temi + [parentCategory] />
79 </#if>
80 </#if>
81
82 <#elseif assetVocabulary.getName() == "5. Autori">
83 <#assign Autori = Autori + [category.getName()] />
84 <#elseif assetVocabulary.getName() == "Provincia">
85 <#assign Provincia = Provincia + [category.getName()] />
86 <#elseif assetVocabulary.getName() == "Speciali">
87 <#assign Speciali = Speciali + [category.getName()] />
88 <#elseif assetVocabulary.getName() == "6. Visualizzazione articoli">
89 <#assign visualizzazionearticoli = visualizzazionearticoli + [category.getName()] />
90 </#if>
91</#list>
92
93<#list categoryList as category>
94 <#if category.getParentCategory()??>
95 <#assign childCategory = category.getName()/>
96 <#else>
97 <#assign parentCategory = category.getName()/>
98 </#if>
99</#list>
100
101<style>
102 .asset-title {
103 display: none;
104 }
105
106 .header-back-to {
107 display: none;
108 }
109
110 .hide-content {
111 visibility: hidden;
112 height: 0;
113 padding: 0px !important;
114 overflow: hidden;
115 }
116
117 .content_para {
118 float: none !important;
119 }
120
121 .hide-content img {
122 display: none;
123 }
124</style>
125
126
127<#assign classColumnLeft = "9" />
128
129<#assign currentArticleRelatedLinks = assetLinkLocalService.getDirectLinks(currentArticleAssetEntryId) />
130
131<#assign hasLinkForColumn = "false" />
132<#list currentArticleRelatedLinks as related_entry>
133 <#assign relatedAssetEntryId = related_entry.getEntryId2() />
134 <#assign relatedAssetEntry = AssetEntryLocalServiceUtil.getEntry(relatedAssetEntryId) />
135 <#assign relatedAssetEntryPrimKey = relatedAssetEntry.getClassPK() />
136
137 <#if relatedAssetEntry.getClassName() == 'com.liferay.journal.model.JournalArticle' >
138 <#assign hasLinkForColumn = "true" />
139 </#if>
140</#list>
141
142<#if (currentArticleRelatedLinks?? && currentArticleRelatedLinks?has_content) && hasLinkForColumn == "true" >
143 <#assign classColumnLeft = "8" />
144</#if>
145
146<section class="container rt-container" id="content">
147 <div class="row">
148 <!-- 1 -->
149 <div class="col-md-12 portlet-column portlet-column-only" id="column-1">
150 <!-- Subheader news -->
151 <section class="rt-subheader rt-subheader--news">
152 <div class="rt-subheader__top">
153 <div class="rt-subheader__category-wrapper">
154 <#list temi as category>
155 <div class="rt-subheader__category">
156 ${category}
157 </div>
158 </#list>
159 </div>
160
161 <div class="rt-subheader__publication">
162
163 <#assign nomeAutore = "" />
164 <#if Autori?? && (Autori?size > 0)>
165 <div class="rt-subheader__author">
166 di
167 <#list Autori as autore>
168 <#if autore != "redazione">
169 <#assign userAutore = UserLocalServiceUtil.getUserByScreenName(themeDisplay.getCompanyId(), autore) />
170 <#if userAutore?? && userAutore?has_content>
171 <#assign nomeAutore = userAutore.getFullName() />
172 </#if>
173 <#else>
174 <#assign nomeAutore = "Redazione" />
175 </#if>
176
177 <a title="Vai alla pagina dell'autore ${nomeAutore?html}"
178 aria-label="Vai alla pagina dell'autore ${nomeAutore?html}"
179 href="/autori/${nomeAutore?html}">
180 ${nomeAutore?html}
181 </a>
182
183 </#list>
184 </div>
185 </#if>
186
187
188 <#list Provincia as location>
189 <div class="rt-news-location">
190 <i aria-hidden="true" class="fas fa-map-marker-alt"></i> ${location}
191 </div>
192 </#list>
193
194 <#assign publishDate = .vars['reserved-article-display-date'].data />
195 <#assign publishDate = publishDate?datetime("EEE, d MMM yyyy HH:mm:ss Z")>
196 <#assign dateFormatDayMonth = "dd MMMM yyyy">
197 <#assign dateFormatHours = "HH:mm">
198 <div class="rt-subheader__date">${publishDate?string(dateFormatDayMonth)?remove_beginning("0")}</div>
199 <div class="rt-subheader__time">${publishDate?string(dateFormatHours)?remove_beginning("0")}</div>
200 <a class="rt-subheader__button rt-subheader__button-print" onclick="window.print();"
201 href="javascript:void(0);" title="Stampa l'articolo"><i aria-hidden="true"
202 class="far fa-print"></i></a>
203 </div>
204 </div>
205
206 <div class="rt-subheader__wrapper">
207 <div class="rt-subheader__title-wrapper">
208 <h1 class="rt-subheader__title">
209 ${.vars['reserved-article-title'].data}
210 </h1><@getEditIcon />
211 </div>
212
213 <#if ImmagineApertura?? && ImmagineApertura.getData()?? && ImmagineApertura.getData() != "" && ImmagineApertura.getData() == "true" >
214 <#if Immagine.getData()?? && Immagine.getData() != "">
215
216 <#assign altIMG = "" />
217 <#if (Immagine.getAttribute("alt")?? || Immagine.getAttribute("fileEntryId")??)>
218 <#assign altIMG = Immagine.getAttribute("alt") />
219 <#else>
220 <#assign altIMG = .vars['reserved-article-title'].data />
221 </#if>
222
223 <div class="rt-subheader__cover-media" aria-label="${altIMG}"
224 style="background-image: url('${Immagine.getData()}');">
225
226 </div>
227 <#if Descrizione?? && Descrizione.getData() != "">
228 <div class="rt-subheader__caption">
229 ${Descrizione.getData()}
230 </div>
231 </#if>
232 </#if>
233 </#if>
234
235 <#if entry.getSummary(locale)?? && entry.getSummary(locale) != "">
236 <div class="rt-subheader__excerpt">
237 ${entry.getSummary(locale)}
238 </div>
239 </#if>
240
241
242 </div>
243
244 </section>
245 </div>
246 </div>
247 <div class="row has-sidebar">
248 <#if Testo?? && Testo.getData() != "">
249 <div class="col-md-12 col-lg-${classColumnLeft} portlet-column portlet-column-first" id="column-2">
250 <div class="rt-page__content rt-page-content--left">
251 <div class="rt-page__content-text">
252
253 <#if ImmagineApertura?has_content && !getterUtil.getBoolean(ImmagineApertura.getData()) || (ImmagineApertura?has_content && (ImmagineApertura.getData() == "false" || ImmagineApertura.getData() == "")) >
254
255 <#if Immagine.getData()?? && Immagine.getData() != "">
256
257 <#assign altIMG = "" />
258 <#if (Immagine.getAttribute("alt")?? || Immagine.getAttribute("fileEntryId")??)>
259 <#assign altIMG = Immagine.getAttribute("alt") />
260 <#else>
261 <#assign altIMG = .vars['reserved-article-title'].data />
262 </#if>
263
264 <figure class="rt-image-align-left">
265 <img alt="${altIMG}" src="${Immagine.getData()}"/>
266 <#if Descrizione?? && Descrizione.getData() != "">
267 <figcaption>${Descrizione.getData()}</figcaption>
268 </#if>
269 </figure>
270 </#if>
271 </#if>
272 <p>
273 <#if Testo??>
274 <@rt.pruneExternalContent html=Testo.getData() acceptedCookie=hasCookie?trim?boolean />
275 </#if>
276 </p>
277
278 <#list Speciali as category>
279 <#if category == "NextGenerationFest24">
280 <div class="rt-btn-wrapper">
281 <a href="/nextgenerationfest-24/tutte-le-notizie" title="Vedi le altre notizie"
282 aria-label="Vedi le altre notizie" class="rt-btn rt-btn-light rt-btn-view">
283 Tutte le notizie del Next Generation Fest 24<i aria-hidden="true"
284 class="far fa-chevron-right"></i>
285 </a>
286 </div>
287
288 </#if>
289 </p>
290 </#list>
291 <#list visualizzazionearticoli as category>
292 <#if category == "Striscia Flash News ngf24">
293
294 <div class="rt-btn-wrapper">
295 <a href="/nextgenerationfest-24/tutte-le-flash-news" title="Vedi le altre notizie"
296 aria-label="Vedi le altre notizie" class="rt-btn rt-btn-light rt-btn-view">
297 Tutte le flash news del Next Generation Fest 24<i aria-hidden="true"
298 class="far fa-chevron-right"></i>
299 </a>
300 </div>
301
302 </#if>
303 </#list>
304
305
306 </div>
307 </div>
308
309 <div class="rt-btn-wrapper rt-btn-wrapper--right-align">
310 <div class="a2a_kit a2a_kit_size_32 a2a_default_style"
311 data-a2a-title="${.vars['reserved-article-title'].data?html}">
312 <a class="a2a_button_facebook"></a>
313 <a class="a2a_button_twitter"></a>
314 <a class="a2a_button_email"></a>
315 <a class="a2a_button_whatsapp"></a>
316 <a class="a2a_button_linkedin"></a>
317 </div>
318 </div>
319 </div>
320 </#if>
321
322 <#assign currentArticleRelatedLinks = assetLinkLocalService.getDirectLinks(currentArticleAssetEntryId) />
323 <#if (currentArticleRelatedLinks?? && currentArticleRelatedLinks?has_content) >
324 <div class="col-md-12 col-lg-4 portlet-column portlet-column-last" id="column-3">
325
326 <#assign hasAllegato = "false" />
327 <#assign hasLink = "false" />
328 <#list currentArticleRelatedLinks as related_entry>
329 <#assign relatedAssetEntryId = related_entry.getEntryId2() />
330 <#assign relatedAssetEntry = AssetEntryLocalServiceUtil.getEntry(relatedAssetEntryId) />
331 <#assign relatedAssetEntryPrimKey = relatedAssetEntry.getClassPK() />
332
333 <#if relatedAssetEntry.getClassName() == 'com.liferay.document.library.kernel.model.DLFileEntry' >
334 <#assign hasAllegato = "true" />
335 <#elseif relatedAssetEntry.getClassName() == 'com.liferay.journal.model.JournalArticle' >
336 <#assign hasLink = "true" />
337 </#if>
338 </#list>
339
340 <#if (hasLink == "true") >
341 <div class="rt-sidebar-content">
342 <section
343 class="rt-section rt-section--box rt-section--box-row rt-section--related rt-section--sidebar"
344 aria-label="">
345 <div class="rt-section-title-wrapper">
346 <h3 class="rt-section-title">Notizie collegate</h3>
347 </div>
348 <div class="rt-section__wrapper">
349 <#list currentArticleRelatedLinks as related_entry>
350 <#assign relatedAssetEntryId = related_entry.getEntryId2() />
351 <#assign relatedAssetEntry = AssetEntryLocalServiceUtil.getEntry(relatedAssetEntryId) />
352 <#assign relatedAssetEntryPrimKey = relatedAssetEntry.getClassPK() />
353
354 <#if relatedAssetEntry.getClassName() == 'com.liferay.journal.model.JournalArticle' >
355 <#assign relatedArticle = JournalArticleLocalService.getLatestArticle(relatedAssetEntryPrimKey) />
356 <#if relatedArticle?? && relatedArticle != "">
357
358 <#assign assetRendererRelated = relatedAssetEntry.getAssetRenderer() />
359 <#assign rendererURLRelated = siteBaseURL + "/-/" + assetRendererRelated.getUrlTitle() />
360
361 <#assign docXml = saxReaderUtil.read(relatedArticle.getContent()) />
362
363 <#assign Immagine = docXml.valueOf("//dynamic-element[@name='Immagine']/dynamic-content/text()") />
364
365 <#assign fileUrl = "" />
366 <#assign altImg = "" />
367 <#if Immagine?has_content>
368 <#assign json = jsonFactoryUtil.createJSONObject(Immagine) />
369 <#assign nameImg = json.getString("name") />
370 <#assign altImg = json.getString("alt") />
371 <#assign fileEntryId = json.getLong("fileEntryId") />
372 <#assign uuiD = json.getString("uuid") />
373 <#assign groupId = json.getLong("groupId") />
374
375 <#if fileEntryId != 0>
376 <#assign fileEntry = DLFileEntryLocalServiceUtil.getFileEntry(fileEntryId) />
377 <#assign fileUrl = "/documents/" + fileEntry.getGroupId() + "/" + fileEntry.getFolderId() + "/" + fileEntry.getTitle() + "/" + fileEntry.getUuid() />
378 <#else>
379 <#if groupId != 0 && uuiD != "">
380 <#attempt>
381 <#assign fileEntry = DLFileEntryLocalServiceUtil.getFileEntryByUuidAndGroupId(uuiD,groupId) />
382 <#if fileEntry?? >
383 <#assign fileUrl = "/documents/" + fileEntry.getGroupId() + "/" + fileEntry.getFolderId() + "/" + fileEntry.getTitle() + "/" + fileEntry.getUuid() />
384 </#if>
385 <#recover> </#attempt>
386 </#if>
387 </#if>
388 <#else>
389 <#assign fileUrl = imagePath + "/toscana-notizie-placeholder.png" />
390 </#if>
391
392
393 <div class="rt-box rt-box--has-image rt-box--has-image-small">
394 <div class="rt-box__image">
395 <img alt="Immagine ${relatedAssetEntry.getTitle(locale)?html}"
396 src="${fileUrl?html}">
397
398 </div>
399
400 <div class="rt-box__text">
401 <div class="rt-box__publication">
402 <div class="rt-box__date">${relatedAssetEntry.publishDate?string["dd MMMM"]?remove_beginning("0")}</div>
403 <div class="rt-box__time">${relatedAssetEntry.publishDate?string["HH:mm"]?remove_beginning("0")}</div>
404 </div>
405
406 <div class="rt-box__title">
407 <a title="Vai alla pagina ${relatedAssetEntry.getTitle(locale)?html}"
408 aria-label="Vai alla pagina ${relatedAssetEntry.getTitle(locale)?html}"
409 href="${rendererURLRelated?html}">
410 ${relatedAssetEntry.getTitle(locale)?html}
411 </a>
412 </div>
413 </div>
414 </div>
415
416 </#if>
417 </#if>
418 </#list>
419 </div>
420 </section>
421 </div>
422 </#if>
423 </div>
424 </#if>
425 </div>
426
427
428 <@getLinkAndAllegati />
429
430</section>
431
432
433<#-- Contenitore nascosto per il contenuto della modale -->
434<div id="modalContent" style="display: none">
435
436 <style>
437 .copy-text{
438 background-color: #fff;
439 padding: 4%;
440 font-family: none !important;
441 }
442
443 .copy-text > p{
444 font-family: none !important;
445 margin-block-start: 1em;
446 margin-block-end: 1em;
447 }
448
449 .copy-text > i{
450
451 font-style: italic !important;
452 }
453
454 .copy-text > h1{
455 font-family: none !important;
456 display: block;
457 font-size: 2em;
458 margin-block-start: 0.67em;
459 margin-block-end: 0.67em;
460 margin-inline-start: 0px;
461 margin-inline-end: 0px;
462 font-weight: bold;
463 }
464
465 .copy-text > div{
466 font-family: italic !important;
467 margin-bottom: 1em !important;
468 font-weight: bold !important;
469
470 }
471
472 .copy-text picture, .copy-text img{
473 display: none;
474 }
475
476 </style>
477
478 <button id="copyButton" style="margin-bottom: 10px; border: 2px solid #ccc; border-radius: 5px;"> Copia contenuto</button>
479
480 <div class="copy-text">
481 <h1 style="font-family: none !important;">${.vars['reserved-article-title'].data}</h1>
482
483 <#if entry.getSummary(locale)?? && entry.getSummary(locale) != "">
484 <div style="font-style: italic; font-weight: bold !important;">
485 ${entry.getSummary(locale)}
486 </div>
487 </#if>
488
489 <#assign writtenBy = "" />
490 <#if Autori?? && (Autori?size > 0)>
491
492 <#list Autori as autore>
493 <#if autore != "redazione">
494 <#assign userAutore = UserLocalServiceUtil.getUserByScreenName(themeDisplay.getCompanyId(), autore) />
495 <#if userAutore?? && userAutore?has_content>
496 <#assign nomeAutore = userAutore.getFullName() />
497 </#if>
498 <#else>
499 <#assign nomeAutore = "Redazione" />
500 </#if>
501
502 <#assign writtenBy = writtenBy + nomeAutore?html />
503
504 </#list>
505
506 <i style="font-family: italic !important;"> Scritto da ${writtenBy}, ${publishDate?string("EEEE d MMMM yyyy 'alle' HH:mm")} </i>
507 </#if>
508
509 <#if Testo?? && Testo.getData() != "">
510 <p>${Testo.getData()}</p>
511 </#if>
512 </div>
513
514</div>
515
516
517<#macro getLinkAndAllegati>
518 <#assign assetLinkLocalService = serviceLocator.findService("com.liferay.asset.link.service.AssetLinkLocalService") />
519 <#assign assetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") />
520 <#assign JournalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")>
521
522 <#assign currentArticle = JournalArticleLocalService.getArticle(groupId, .vars['reserved-article-id'].data) />
523 <#assign currentArticleResourcePrimKey = currentArticle.getResourcePrimKey() />
524 <#assign currentArticleAssetEntry = assetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle", currentArticleResourcePrimKey) />
525 <#assign currentArticleAssetEntryId = currentArticleAssetEntry.getEntryId() />
526 <#assign currentArticleRelatedLinks = assetLinkLocalService.getDirectLinks(currentArticleAssetEntryId) />
527
528 <#assign hasAllegato = "false" />
529 <#assign hasLink = "false" />
530 <#if currentArticleRelatedLinks?? && currentArticleRelatedLinks?has_content>
531 <#list currentArticleRelatedLinks as related_entry>
532 <#assign relatedAssetEntryId = related_entry.getEntryId2() />
533 <#assign relatedAssetEntry = assetEntryLocalService.getEntry(relatedAssetEntryId) />
534 <#assign relatedAssetEntryPrimKey = relatedAssetEntry.getClassPK() />
535
536 <#if relatedAssetEntry.getClassName() == 'com.liferay.document.library.kernel.model.DLFileEntry' >
537 <#assign hasAllegato = "true" />
538 <#elseif relatedAssetEntry.getClassName() == 'com.liferay.journal.model.JournalArticle' >
539 <#assign hasLink = "true" />
540 </#if>
541 </#list>
542 </#if>
543
544 <#if (hasAllegato == "true")>
545 <div class="rt-container">
546 <div class="rt-wrapper">
547 <section class="rt-section rt-section--grid rt-section--grid-3" aria-label="Sezione link e allegati">
548 <div class="rt-section-title-wrapper">
549 <h2 class="rt-section-title"><i aria-hidden="true" class="far fa-paperclip"></i> Allegati</h2>
550 </div>
551
552 <div class="rt-section__wrapper">
553 <#if hasAllegato == "true">
554 <#list currentArticleRelatedLinks as related_entry>
555 <#assign relatedAssetEntryId = related_entry.getEntryId2() />
556 <#assign relatedAssetEntry = assetEntryLocalService.getEntry(relatedAssetEntryId) />
557 <#assign relatedAssetEntryPrimKey = relatedAssetEntry.getClassPK() />
558
559 <#if relatedAssetEntry.getClassName() == 'com.liferay.document.library.kernel.model.DLFileEntry' >
560 <#attempt>
561 <#assign fileEntry = DLFileEntryLocalServiceUtil.getFileEntry(relatedAssetEntryPrimKey) />
562 <#assign fileUrl = "/documents/" + fileEntry.getGroupId() + "/" + fileEntry.getFolderId() + "/" + fileEntry.getTitle() + "/" + fileEntry.getUuid() />
563 <#recover> </#attempt>
564 <#if fileEntry?? && fileUrl != "">
565 <#if fileEntry.getExtension() == 'mp3'>
566 <div class="rt-box rt-box--link rt-box--audio">
567 <div class="rt-box__header">
568 <div class="rt-box__wrapper">
569 <div class="rt-box__title">
570 <a title="Scarica ${fileEntry.getTitle()}"
571 aria-label="Scarica ${fileEntry.getTitle()}"
572 href="${fileUrl}" target="_blank">
573 ${fileEntry.getTitle()}
574 </a>
575 </div>
576 <audio controls>
577 <source src="${fileUrl}" type="audio/ogg">
578 <source src="${fileUrl}" type="audio/mpeg">
579 Il tuo browser non supporta questo tipo di oggetto html
580 </audio>
581 </div>
582 </div>
583 </div>
584 <#else>
585 <div class="rt-box rt-box--link">
586 <div class="rt-box__header">
587 <div class="rt-box__wrapper">
588 <div class="rt-box__title">
589 <a target="_blank" href="${fileUrl}"
590 aria-label="Vedi ${fileEntry.getTitle()}"
591 title="Vedi ${fileEntry.getTitle()}">
592 ${fileEntry.getTitle()}
593 </a>
594 </div>
595 </div>
596
597 <div class="rt-box__icon">
598 <i aria-hidden="true" class="far fa-download"></i>
599 </div>
600 </div>
601 </div>
602 </#if>
603 </#if>
604 </#if>
605 </#list>
606 </#if>
607 </div>
608 </section>
609 </div>
610 </div>
611 </#if>
612
613</#macro>
614
615
616<#macro getEditIcon>
617 <#if assetRenderer.hasEditPermission(themeDisplay.getPermissionChecker())>
618 <#if renderResponse??>
619 <#assign redirectURL = themeDisplay.getURLCurrent() />
620
621 <#assign editPortletURL = assetRenderer.getURLEdit(renderRequest, renderResponse, windowStateFactory.getWindowState("normal"), redirectURL)!"" />
622 <#assign url = htmlUtil.escapeURL(editPortletURL) />
623
624 <#if validator.isNotNull(editPortletURL)>
625
626 <@liferay_ui["icon"]
627 cssClass="icon-monospaced visible-interaction"
628 icon="pencil"
629 markupView="lexicon"
630 message=title
631 url="javascript:Liferay.Util.navigate('${url}');"
632 />
633
634
635 <@liferay_ui["icon"]
636 cssClass="icon-monospaced visible-interaction"
637 icon="paste-plaintext"
638 markupView="lexicon"
639 message=title
640 url="javascript:openModal()"
641 />
642 </#if>
643 </#if>
644 </#if>
645</#macro>
646
647<script type="text/javascript">
648
649 var a2a_config = a2a_config || {};
650 a2a_config.onclick = 1;
651 a2a_config.locale = "it";
652 a2a_config.num_services = 5;
653 a2a_config.title = '${.vars['reserved-article-title'].data?html}';
654 a2a_config.track_links = 'custom';
655 a2a_config.track_links_key = '${urlSocial?html}';
656 a2a_config.linkurl = '${urlSocial?html}';
657 a2a_config.linkname = 'aaaa ${.vars['reserved-article-title'].data?html}';
658
659 a2a_config.templates = a2a_config.templates || {};
660 a2a_config.templates.twitter = {
661 text: "${.vars['reserved-article-title'].data?html} ${urlSocial?html}",
662 related: "AddToAny,Twitter"
663 };
664 console.log(a2a_config);
665
666
667</script>
668<script async src="https://static.addtoany.com/menu/page.js"></script>
669
670<style>
671 .a2a_kit .a2a_svg.a2a_s_twitter::before {
672 font-family: 'Font Awesome 6 Brands';
673 content: "\e61b";
674 }
675</style>
676
677<script>
678
679 function openModal() {
680 var modalContentElement = document.getElementById('modalContent');
681
682 // Apri la modale con il contenuto HTML già incluso nel DOM
683 Liferay.Util.openModal({
684 size: 'full-screen',
685 bodyHTML: modalContentElement.innerHTML,
686 title: 'Preview Testuale',
687 centered: true,
688 destroyOnHide: true
689 });
690
691 // Attendi che la modale venga aggiunta al DOM
692 setTimeout(function () {
693 var copyButton = document.querySelector('.modal-content #copyButton');
694 var textContent = document.querySelector('.modal-content .copy-text');
695
696 if (copyButton && textContent) {
697 copyButton.addEventListener('click', function () {
698 var range = document.createRange();
699 range.selectNode(textContent);
700 window.getSelection().removeAllRanges();
701 window.getSelection().addRange(range);
702
703 try {
704 var successful = document.execCommand('copy');
705 if (successful) {
706 alert('Contenuto copiato con successo!');
707 } else {
708 alert('Errore nella copia del contenuto.');
709 }
710 } catch (err) {
711 alert('Copia non supportata nel browser.');
712 }
713
714 // Rimuovi la selezione
715 window.getSelection().removeAllRanges();
716 });
717 }
718 }, 300); // tempo per assicurarsi che la modale sia pronta nel DOM
719 }
720</script>