Eventi
Eventi oranizzati nel quartiere e dal Comitato
Si è verificato un errore nell'elaborarazione del modello.
The following has evaluated to null or missing: ==> immagineprincipale.getTitolo() [in template "20096#20121#609304" at line 88, column 168] ---- Tip: If the failing expression is known to legally refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing</#if>. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: @adaptive_media_image.img fileVersion... [in template "20096#20121#609304" at line 88, column 105] ----
1<#assign error = false />
2<#assign errorMessage = "" />
3
4<#assign structureService = serviceLocator.findService("it.inera.structure.service.StructureService")>
5<#assign jac = serviceLocator.findService("it.inera.journalarticleconverter.service.JournalArticleConverter")>
6<#assign dlFileEntryService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService")>
7<#assign dlAppLocalService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLAppLocalService")>
8<#assign eventoStructureId = structureService.getStructureEventoId()>
9<#assign tipiEventoVocabularyId = structureService.getVocabularyTipieventoId()>
10
11<#if entries?has_content>
12 <#list entries as curEntry>
13 <#assign assetRenderer = curEntry.getAssetRenderer()/>
14 <#if validator.isNotNull(assetRenderer)>
15 <#assign className = assetRenderer.getClassName() />
16 <#if className == "com.liferay.journal.model.JournalArticle">
17 <#assign ja = assetRenderer.getArticle() />
18 <#assign structureId = ja.getDDMStructureId() />
19 <#if structureId != eventoStructureId>
20 <#assign error = true />
21 <#assign errorMessage = "Il template gestisce solo Web Content di tipo Evento" />
22 </#if>
23 <#else>
24 <#assign error = true />
25 <#assign errorMessage = "Il template gestisce solo asset di tipo Web Content" />
26 </#if>
27 <#else>
28 <#assign error = true />
29 <#assign errorMessage = "Errore generico" />
30 </#if>
31 </#list>
32<#else>
33 <#assign error = true />
34 <#assign errorMessage = "Nessun evento disponibile" />
35</#if>
36
37<#if !error>
38 <#assign categoryConfig = "" >
39 <#if portletPreferences?has_content>
40 <#assign categoriesConfig = portletPreferences['queryValues0'] >
41 <#if categoriesConfig?has_content>
42 <#assign categoryConfig = "/w/category_eventi/" + categoriesConfig[0] >
43 </#if>
44 </#if>
45
46 <section id="eventi">
47 <div class="py-3">
48 <div class="container">
49 <div class="row pt-4 mt-lg-2 pb-lg-4">
50
51 <#list entries as curEntry>
52 <#assign assetRenderer = curEntry.getAssetRenderer()/>
53 <#assign ja = assetRenderer.getArticle() />
54 <#assign structureId = ja.getDDMStructureId() />
55 <#assign evento = jac.getEvento(ja) />
56 <#assign vocabularies = evento.getCategories() />
57
58 <#assign urlTitle = evento.getUrlTitle() />
59 <#assign titolo = evento.getTitolo() />
60 <#assign inizioDate = evento.getDataorainizio() />
61 <#assign fineDate = evento.getDataorafine() />
62 <#assign sottotitolo = "" />
63 <#if evento.getSottotitolo()??>
64 <#assign sottotitolo = evento.getSottotitolo() />
65 </#if>
66 <#assign immagineprincipale = evento.getImmagineprincipale() >
67
68 <#if vocabularies?? && vocabularies?has_content >
69 <#list vocabularies as vocabularyId, categories>
70 <#if categories?? && categories?has_content && vocabularyId == tipiEventoVocabularyId >
71 <#list categories as category>
72 <#assign tipoEvento = category.getTitle(locale) >
73 <#assign paginaCategoriaEvento = "/eventi/-/category_eventi/" + category.getCategoryId() >
74 </#list>
75 </#if>
76 </#list>
77 </#if>
78
79 <div class="col-12 col-md-6 col-lg-4">
80 <div class="card-wrapper">
81 <div class="card card-img no-after rounded border <#if immagineprincipale?? && immagineprincipale.getImmagine()?? && immagineprincipale.getImmagine().getUrl()?? && immagineprincipale.getImmagine().getUrl()?has_content>sm-row</#if>">
82 <#if immagineprincipale?? && immagineprincipale.getImmagine()?? && immagineprincipale.getImmagine().getUrl()?? && immagineprincipale.getImmagine().getUrl()?has_content>
83 <div class="img-responsive-wrapper">
84 <div class="img-responsive img-responsive-panoramic">
85 <#assign fileEntryImg = dlFileEntryService.getDLFileEntry(immagineprincipale.getImmagine().getFileEntryId()?number) />
86 <#assign fileVersionImg = dlAppLocalService.getFileVersion(fileEntryImg.getFileVersion().getFileVersionId()) />
87 <figure class="img-wrapper">
88 <@adaptive_media_image.img fileVersion=fileVersionImg title="${immagineprincipale.getTitolo()}" alt="${immagineprincipale.getImmagine().getAlt()}" />
89 </figure>
90 <#if inizioDate?? && inizioDate?has_content>
91 <div class="card-calendar d-flex flex-column justify-content-center">
92 <span class="card-date">${inizioDate?string["dd"]}</span>
93 <span class="card-day">${inizioDate?string["MMM"]}</span>
94 </div>
95 </#if>
96 </div>
97 </div>
98 </#if>
99
100 <div class="card-body p-4">
101 <div class="category-top">
102 <a title="${tipoEvento}" class="text-decoration-none fw-semibold" href="${paginaCategoriaEvento}" data-element="news-category-link" >${tipoEvento}</a>
103 <span class="data text-secondary"><#if inizioDate?? && inizioDate?has_content>${inizioDate?string["dd/MM/yyyy HH:mm"]}</#if><#if fineDate?? && fineDate?has_content> - ${fineDate?string["dd/MM/yyyy HH:mm"]}</#if></span>
104 </div>
105 <h3 class="mb-0">
106 <a href="/w/${urlTitle}" class="text-decoration-none" data-element="news-link">
107 ${titolo}
108 </a>
109 </h3>
110 <p class="pt-3 text-secondary">${sottotitolo}</p>
111 </div>
112 </div>
113 </div>
114 </div>
115 </#list>
116
117 </div>
118
119 <#-- div class="row">
120 <div class="col-12 col-lg-3 offset-lg-9">
121 <a href="/eventi${categoryConfig}" class="btn btn-primary text-button w-100" title="<@liferay.language key="argomento.seceventi.tutti" />"><@liferay.language key="argomento.seceventi.tutti" /></a>
122 </div>
123 </div -->
124
125 </div>
126 </div>
127 </section>
128<#else>
129 <section id="eventi">
130 <div class="section section-muted pb-90 pb-lg-50 px-lg-5 pt-0">
131 <div class="container">
132 <div class="row g-4">
133 <i>${errorMessage}</i>
134 </div>
135 </div>
136 </div>
137 </section>
138</#if>