Personale Amministrativo
Donec gravida laoreet nisl, in fermentum leo dignissim ac. Vestibulum diam nisl, suscipit id lorem at, facilisis venenatis urna. Praesent tempor erat nec auctor accumsan. Morbi ut aliquet magna. Mauris iaculis at magna a rhoncus.
Si è verificato un errore nell'elaborarazione del modello.
The following has evaluated to null or missing:
==> incarico_data.classPK [in template "20095#20121#43204" at line 259, column 91]
----
Tip: It's the step after the last dot that caused this error, not those before it.
----
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: Incarichi = JournalArticleLocalServic... [in template "20095#20121#43204" at line 259, column 25]
----
1<#setting locale=themeDisplay.getLanguageId()>
2<#assign
3 assetCategoryLocalServiceUtil = staticUtil["com.liferay.asset.kernel.service.AssetCategoryLocalServiceUtil"]
4 AssetVocabularyLocalServiceUtil = staticUtil["com.liferay.asset.kernel.service.AssetVocabularyLocalServiceUtil"]
5 JournalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")
6 FriendlyURLEntryLocalService = serviceLocator.findService("com.liferay.friendly.url.service.FriendlyURLEntryLocalService")
7 ClassNameService = serviceLocator.findService("com.liferay.portal.kernel.service.ClassNameService")
8 currentLayout=themeDisplay.getLayout()
9 current_page=currentLayout.getName()
10 current_page_url=currentLayout.friendlyURL
11 novità_counter = 0
12 notizie_counter = 0
13 comunicati_counter = 0
14 avvisi_counter = 0
15 eventi_counter = 0
16 luoghi_counter = 0
17 documenti_counter = 0
18 dataset_counter = 0
19 persone_counter = 0
20 uo_counter = 0
21 generiche_counter = 0
22 total_entries = entries?size
23 no_subtitle_pages = ["/uffici", "/personale-amministrativo", "/politici"]
24 tags = []
25 in_evidenza = false
26/>
27
28<#list portletPreferences as k,v >
29 <#if k?contains("queryValues")>
30 <#list v as i>
31 <#if i?lower_case == "in evidenza">
32 <#assign in_evidenza = true />
33 </#if>
34 </#list>
35 </#if>
36</#list>
37
38<#list entries as curEntry>
39 <#assign
40 renderer = curEntry.getAssetRenderer()
41 journalArticle = renderer.getArticle()
42 tmp_categories = curEntry.getCategories()
43 structureName = journalArticle.getDDMStructure().getName(themeDisplay.getLanguageId())
44 />
45
46 <#if structureName == "Notizia">
47 <#assign novità_counter += 1 />
48 <#list tmp_categories as categoryEntry>
49 <#assign vocabulary=AssetVocabularyLocalServiceUtil.getVocabulary(categoryEntry.getVocabularyId()) />
50 <#if vocabulary.name=="tassonomia tipi di notizia">
51 <#assign top_category=categoryEntry.name />
52 <#if top_category?lower_case?contains("comunicat")>
53 <#assign comunicati_counter +=1 />
54 <#elseif top_category?lower_case=="notizia">
55 <#assign notizie_counter +=1 />
56 <#elseif top_category?lower_case=="avviso">
57 <#assign avvisi_counter +=1 />
58 </#if>
59 </#if>
60 </#list>
61 <#elseif structureName == "Evento">
62 <#assign eventi_counter += 1 />
63 <#list tmp_categories as categoryEntry>
64 <#assign vocabulary=AssetVocabularyLocalServiceUtil.getVocabulary(categoryEntry.getVocabularyId()) />
65 <#if vocabulary.name=="tassonomia tipo di evento">
66 <#assign top_category=categoryEntry.name />
67 <#if top_category?lower_case=="mostra">
68 <#assign mostre_counter +=1 />
69 <#elseif top_category?lower_case=="evento">
70 <#assign eventi_counter +=1 />
71 </#if>
72 </#if>
73 </#list>
74 <#elseif structureName == "Luogo">
75 <#assign luoghi_counter += 1 />
76 <#elseif
77 structureName == "Documento Pubblico"
78 || structureName == "Dataset"
79 >
80 <#assign documenti_counter += 1 />
81 <#elseif structureName == "Persona Pubblica">
82 <#assign persone_counter += 1 />
83 <#elseif structureName == "Unità Organizzativa">
84 <#assign uo_counter += 1 />
85 <#elseif structureName == "Pagina Generica">
86 <#assign generiche_counter += 1 />
87 </#if>
88
89</#list>
90
91<#assign
92 is_only_luoghi = luoghi_counter == total_entries
93 is_all_novità = novità_counter == total_entries
94 is_only_notizie = notizie_counter == total_entries
95 is_only_comunicati = comunicati_counter == total_entries
96 is_only_avvisi = avvisi_counter == total_entries
97 is_only_documenti = documenti_counter == total_entries
98 is_only_dataset = dataset_counter == total_entries
99 is_only_eventi = eventi_counter == total_entries
100 is_only_persone = persone_counter == total_entries
101 is_only_uo = uo_counter == total_entries
102 is_only_generiche = generiche_counter == total_entries
103 sottotitolo = ""
104 all_btn_txt = ""
105 all_btn_url = ""
106 are_same_type = false
107/>
108
109<#if is_only_luoghi>
110 <#assign
111 sottotitolo = "${languageUtil.get(locale, 'places')}"
112 are_same_type = true
113 />
114 <#if in_evidenza && current_page_url != "/luoghi">
115 <#assign
116 all_btn_txt = "${languageUtil.get(locale, 'all-places')}"
117 all_btn_url = "/portal/web/guest/luoghi"
118 />
119 </#if>
120<#elseif is_all_novità>
121 <#if is_only_notizie>
122 <#assign
123 sottotitolo = "${languageUtil.get(locale, 'announcements')}"
124 are_same_type = true
125 />
126 <#elseif is_only_comunicati>
127 <#assign
128 sottotitolo = "${languageUtil.get(locale, 'press-releases')}"
129 are_same_type = true
130 />
131 <#elseif is_only_avvisi>
132 <#assign
133 sottotitolo = "${languageUtil.get(locale, 'alerts')}"
134 are_same_type = true
135 />
136 <#else>
137 <#assign
138 sottotitolo = "${languageUtil.get(locale, 'news')}"
139 are_same_type = true
140 />
141 </#if>
142<#elseif is_only_documenti>
143 <#assign
144 sottotitolo = "${languageUtil.get(locale, 'documents')}"
145 are_same_type = true
146 />
147<#elseif is_only_dataset>
148 <#assign
149 sottotitolo = "${languageUtil.get(locale, 'dataset')}"
150 are_same_type = true
151 />
152<#elseif is_only_eventi>
153 <#assign
154 sottotitolo = "${languageUtil.get(locale, 'events')}"
155 are_same_type = true
156 />
157 <#if in_evidenza && current_page_url != "/eventi">
158 <#assign
159 all_btn_txt = "${languageUtil.get(locale, 'all-events')}"
160 all_btn_url = "/portal/web/guest/eventi"
161 />
162 </#if>
163<#elseif is_only_persone>
164 <#assign are_same_type = true />
165<#elseif is_only_uo && current_page_url != "/amministrazione">
166 <#assign
167 sottotitolo = "${languageUtil.get(locale, 'organization-units')}"
168 are_same_type = true
169 />
170</#if>
171
172<#if in_evidenza>
173 <#if sottotitolo?has_content>
174 <#if locale?contains("en")>
175 <#assign sottotitolo = "${languageUtil.get(locale, 'highlighted')} " + sottotitolo />
176 <#else>
177 <#assign sottotitolo += " ${languageUtil.get(locale, 'highlighted')}" />
178 </#if>
179 <#else>
180 <#assign sottotitolo = "${languageUtil.get(locale, 'highlighted')}" />
181 </#if>
182</#if>
183
184<#if are_same_type && !in_evidenza>
185 <#assign sottotitolo = "${languageUtil.get(locale, 'explore')}" />
186 <#if current_page_url == "/documenti-e-dati">
187 <#assign sottotitolo += " ${languageUtil.get(locale, 'all_documents')?lower_case}" />
188 </#if>
189</#if>
190
191<#if entries?has_content>
192<div class="container py-5">
193 <#if !no_subtitle_pages?seq_contains(current_page_url)>
194 <h2 class="title-xxlarge mb-4">${sottotitolo}</h2>
195 </#if>
196 <#if
197 !in_evidenza
198 && entries?size gt 6
199 >
200 <div class="col-12 pt-lg-50 pb-lg-50 px-0 pe-4">
201 <div class="cmp-input-search">
202 <div class="form-group autocomplete-wrapper mb-2 mb-lg-4">
203 <div class="input-group">
204 <label for="autocomplete-autocomplete-three" class="visually-hidden"><@liferay.language key="search" /><@liferay.language key="keyword" /></label>
205 <input type="search" class="autocomplete form-control" placeholder="${languageUtil.get(locale, 'search')} ${languageUtil.get(locale, 'keyword')}" id="autocomplete-autocomplete-three" name="autocomplete-three" data-bs-autocomplete="[]" />
206 <div class="input-group-append">
207 <button class="btn btn-primary" type="button" id="button-3" onclick="search()"><@liferay.language key="search" /></button>
208 </div>
209 <span class="autocomplete-icon" aria-hidden="true">
210 <svg class="icon icon-sm icon-primary">
211 <use href="${themeDisplay.getPathThemeImages()}/sprite.svg#it-search"></use>
212 </svg>
213 </span>
214 </div>
215 </div>
216 </div>
217 </div>
218 </#if>
219 <div class="row g-4">
220 <#list entries as curEntry>
221 <#assign
222 renderer = curEntry.getAssetRenderer()
223 journalArticle = renderer.getArticle()
224 document = saxReaderUtil.read(journalArticle.getContent())
225 rootElement = document.getRootElement()
226 categorie_cur_entry = curEntry.getCategories()
227 titolo = ""
228 descrizione = ""
229 immagine = ""
230 biografia = ""
231 incarichi = []
232 tipo_incarico = ""
233 tipo_notizia = ""
234 tipo_notizia_url = ""
235 data = journalArticle.getCreateDate()
236 url = "/portal/-/${journalArticle.getUrlTitle()}"
237 structureName = journalArticle.getDDMStructure().getName(themeDisplay.getLanguageId())
238 top_category = ""
239 tipo_notizia_url = ""
240 argomenti = []
241 />
242
243 <#list rootElement.elements() as dynamicElement>
244 <#if dynamicElement.element("dynamic-content")?? && dynamicElement.element("dynamic-content")?has_content>
245 <#if dynamicElement.attributeValue("field-reference") == "Titolo">
246 <#assign titolo = dynamicElement.element("dynamic-content").getText()/>
247 <#elseif dynamicElement.attributeValue("field-reference") == "Nome">
248 <#assign titolo = dynamicElement.element("dynamic-content").getText()/>
249 <#elseif dynamicElement.attributeValue("field-reference") == "Cognome">
250 <#assign
251 cognome = dynamicElement.element("dynamic-content").getText()
252 titolo += " ${cognome}"
253 />
254 <#elseif dynamicElement.attributeValue("field-reference") == "Incarichi">
255 <#assign
256 incarichi = dynamicElement.element("dynamic-content").getText()?eval
257 incarico_data=jsonFactoryUtil.createJSONObject(dynamicElement.element("dynamic-content").getData())
258 Incarichi=JournalArticleLocalService.getArticlesByResourcePrimKey(incarico_data.classPK?number)
259 Incarico=Incarichi[0]
260 document=saxReaderUtil.read(Incarico.getContent())
261 rootElement=document.getRootElement()
262 incarico_categories = assetCategoryLocalServiceUtil.getCategories("com.liferay.journal.model.JournalArticle",incarico_data.classPK?number)
263 />
264 <#assign tipo_incarico = incarico_categories?first.name />
265 <#if tipo_incarico == "Politico">
266 <#assign tipo_notizia_url = "/portal/web/guest/politici" />
267 <#elseif tipo_incarico == "Amministrativo">
268 <#assign tipo_notizia_url = "/portal/web/guest/personale-amministrativo" />
269 </#if>
270 <#elseif dynamicElement.attributeValue("field-reference") == "Biografia">
271 <#assign biografia = dynamicElement.element("dynamic-content").getText() />
272 <#elseif dynamicElement.attributeValue("field-reference") == "DescrizioneBreve">
273 <#assign descrizione = dynamicElement.element("dynamic-content").getText()/>
274 <#elseif dynamicElement.attributeValue("field-reference") == "Immagine" >
275 <#assign immagine = dynamicElement.element("dynamic-content").getText() />
276 <#elseif structureName == "Evento" && dynamicElement.attributeValue("field-reference") == "DataInizio">
277 <#assign
278 data_object = getterUtil.getString(dynamicElement.element("dynamic-content").getData())
279 dataMonth = data_object?datetime("yyyy-MM-dd")?string["MMMM"]
280 dataDate = data_object?datetime("yyyy-MM-dd")?string["dd"]
281 />
282 </#if>
283 </#if>
284 </#list>
285
286 <#list categorie_cur_entry as cat>
287 <#assign
288 vocabulary = AssetVocabularyLocalServiceUtil.getVocabulary(cat.vocabularyId?number)
289 className = ClassNameService.fetchClassName("com.liferay.asset.kernel.model.AssetCategory")
290 friendlyUrlEntry = FriendlyURLEntryLocalService.getMainFriendlyURLEntry(className.getClassNameId(), cat.categoryId)
291 friendlyUrlList = FriendlyURLEntryLocalService.getFriendlyURLEntryLocalizations(friendlyUrlEntry.friendlyURLEntryId)
292 top_category = cat.getTitle(themeDisplay.getLocale(), true)
293 top_category_url = friendlyUrlList[0].urlTitle
294 />
295 <#if structureName == "Notizia">
296 <#if cat.name == "Notizia">
297 <#assign tipo_notizia_url = "/portal/web/guest/notizie" />
298 <#elseif cat.name == "Avviso">
299 <#assign tipo_notizia_url = "/portal/web/guest/avvisi" />
300 <#elseif cat.name == "Comunicato (stampa)">
301 <#assign tipo_notizia_url = "/portal/web/guest/comunicati" />
302 </#if>
303 <#elseif structureName == "Evento">
304 <#assign tipo_notizia_url = "/portal/web/guest/eventi" />
305 <#elseif structureName == "Documento Pubblico">
306 <#assign tipo_notizia_url = "/portal/web/guest/documenti-e-dati" />
307 <#elseif structureName == "Luogo">
308 <#assign tipo_notizia_url = "/portal/web/guest/luoghi" />
309 <#elseif structureName == "Unità Organizzativa">
310 <#if
311 cat.name == "ente"
312 || cat.name == "fondazione"
313 >
314 <#assign tipo_notizia_url = "/portal/web/guest/enti-e-fondazioni" />
315 <#elseif
316 cat.name == "commissione"
317 || cat.name == "consiglio comunale"
318 || cat.name == "giunta comunale"
319 >
320 <#assign tipo_notizia_url = "/portal/web/guest/organi-di-governo" />
321 <#elseif cat.name == "ufficio">
322 <#assign tipo_notizia_url = "/portal/web/guest/uffici" />
323 <#elseif cat.name == "area">
324 <#assign tipo_notizia_url = "/portal/web/guest/aree-amministrative" />
325 </#if>
326 <#elseif
327 structureName == "Scheda Servizio"
328 || structureName == "Scheda Dinamica"
329 >
330 <#assign
331 cat_slug = cat.name?lower_case?replace(" ", "-")?replace("'", "-")?replace(",", "")
332 tipo_notizia_url = "/portal/web/guest/" + cat_slug
333 />
334 </#if>
335
336 <#if vocabulary.name == "tassonomia argomento">
337 <#assign
338 argomenti +=
339 [{
340 "name": top_category,
341 "url": top_category_url
342 }]
343 />
344 </#if>
345
346 </#list>
347
348 <#if immagine?has_content>
349 <#assign immagine = immagine?eval />
350 </#if>
351 <#if current_page_url == "/amministrazione">
352 <div class="col-md-6 col-xl-4 searchable">
353 <div class="cmp-card-simple card-wrapper pb-0 rounded border border-light bg-white">
354 <div class="card shadow-sm rounded">
355 <div class="card-body">
356 <a href="${url}" class="text-decoration-none">
357 <h3 class="card-title t-primary title-xlarge">${titolo}</h3>
358 </a>
359 <p class="titillium text-paragraph mb-0 line-clamp">
360 ${descrizione}
361 </p>
362 </div>
363 </div>
364 </div>
365 </div>
366 <#elseif structureName != "Persona Pubblica">
367 <div class="col-md-6 col-xl-4 searchable">
368 <div class="card-wrapper border border-light rounded shadow-sm cmp-list-card-img cmp-list-card-img-hr">
369 <div class="card no-after rounded">
370 <div class="row g-2 g-md-0 flex-md-column">
371 <div class="col-4 order-2 order-md-1 position-relative">
372 <#if structureName == "Evento">
373 <div class="card-calendar d-flex flex-column justify-content-center">
374 <span class="card-date">${dataDate}</span>
375 <span class="card-day">${dataMonth}</span>
376 </div>
377 <#elseif
378 structureName == "Documento Pubblico"
379 || structureName == "Dataset"
380 >
381 <div class="categoryicon-top m-3 mb-0">
382 <svg class="icon icon-sm" aria-hidden="true">
383 <use href="${themeDisplay.getPathThemeImages()}/sprite.svg#it-file"></use>
384 </svg>
385 <span class="text fw-semibold">
386 <a class="category text-decoration-none" href="/portal/web/guest/documenti-e-dati">${top_category}</a>
387 </span>
388 </div>
389 </#if>
390 <#if
391 immagine?has_content
392 && immagine.url?has_content
393 && structureName != "Documento Pubblico"
394 >
395 <img class="rounded-top img-fluid img-responsive" src="${immagine.url}" title="${titolo}" alt="${titolo}">
396 </#if>
397 </div>
398 <div class="col-8 order-1 order-md-2">
399 <div class="card-body pb-0">
400 <#if
401 structureName != "Documento Pubblico"
402 && structureName != "Dataset"
403 >
404 <div class="category-top cmp-list-card-img__body">
405 <div>
406 <span class="category">
407 <a href="${top_category_url}" class="t-primary">${top_category?upper_case}</a>
408 </span>
409 <#if structureName == "Notizia">
410 <span class="data">${dateUtil.getDate(data, "dd MMM yyyy", locale)}</span>
411 </#if>
412 </div>
413 </div>
414 </#if>
415 <a href="${url}" class="text-decoration-none">
416 <h3 class="h5 card-title">${titolo}</h3>
417 </a>
418 <p class="card-text d-none d-md-block lora">${descrizione}</p>
419 <#list argomenti>
420 <div class="topics-wrapper mt-3">
421 <p class="fw-semibold small d-flex align-items-center flex-wrap"><@liferay.language key="topics" />:</p>
422 <#items as argomento>
423 <a href="${argomento.url}" class="chip chip-simple">
424 <span class="chip-label">${argomento.name}</span>
425 </a>
426 </#items>
427 </div>
428 </#list>
429 </div>
430 </div>
431 </div>
432 </div>
433 </div>
434 </div>
435 <#else>
436 <#if
437 current_page_url == "/politici"
438 && tipo_incarico == "Politico"
439 >
440 <@persona_o_documento_card titolo=titolo descrizione=descrizione url=url />
441 <#elseif
442 current_page_url == "/personale-amministrativo"
443 && tipo_incarico != "Politico"
444 >
445 <@persona_o_documento_card titolo=titolo descrizione=descrizione url=url />
446 </#if>
447
448 </#if>
449 </#list>
450 </div>
451 <#if
452 all_btn_txt?has_content
453 && all_btn_url?has_content
454 >
455 <div class="d-flex justify-content-end mt-5">
456 <a href="${all_btn_url}" class="btn btn-primary px-5 py-3 full-mb text-decoration-none">
457 <span class="">${all_btn_txt}</span>
458 </a>
459 </div>
460 </#if>
461</div>
462<#else>
463<#if !in_evidenza>
464<p class="text-center fw-semibold border-bottom border-light pb-4 mx-auto w-50"><@liferay.language key="no-results-found" /></p>
465</#if>
466</#if>
467
468<script defer>
469 const input = document.getElementById("autocomplete-autocomplete-three");
470 input.addEventListener("keyup", (e) => {
471 if (e.key === "Enter") search();
472 if (
473 e.key === "Backspace" &&
474 document.getElementById("autocomplete-autocomplete-three").value === ""
475 ) {
476 cleanSearch();
477 }
478 })
479 const collapseButtonRisultati = document.getElementById("collapse-button-risultati");
480 const allCards = Array.from(document.querySelectorAll('.searchable'));
481
482 function cleanSearch() {
483 allCards.forEach(card => card.classList.remove("d-none"));
484 }
485
486 function search() {
487 let search_query = document.getElementById("autocomplete-autocomplete-three").value;
488 console.log('search ' + search_query);
489 if (search_query !== "") {
490 let activeCards = 0;
491 allCards.forEach(card => {
492 if (card.innerText.toLowerCase().includes(search_query.toLowerCase())) {
493 card.classList.remove("d-none");
494 activeCards++;
495 } else {
496 card.classList.add("d-none");
497 }
498 });
499 if(collapseButtonRisultati) {
500 collapseButtonRisultati.style.display = activeCards < 6 ? "none" : "block";
501 }
502 } else {
503 cleanSearch();
504 }
505 }
506</script>
507
508<style>
509.card-calendar {
510 right: 1rem !important;
511 top: 1rem !important;
512}
513
514.event-date-absolute .content {
515 font-weight: 700;
516}
517.event-date-absolute .content .day {
518 font-size: 1.7em;
519}
520.event-date-absolute .content .month {
521 font-size: 1.2;
522}
523
524</style>
525
526<#macro persona_o_documento_card titolo descrizione url>
527<div class="col-md-6 col-xl-4 searchable">
528 <div class="card-wrapper border border-light rounded shadow-sm cmp-list-card-img cmp-list-card-img-hr">
529 <div class="card no-after rounded">
530 <div class="row g-2 g-md-0 flex-md-column">
531 <div class="top d-flex align-items-center justify-content-between">
532 <div class="info-holder p-3" style="width: 70%;">
533 <a href="${url}" class="text-decoration-none">
534 <h3 class="h5 card-title">${titolo}</h3>
535 </a>
536 <#if
537 incarichi?has_content
538 && tipo_incarico?has_content
539 && tipo_notizia_url?has_content
540 >
541 <a href="${tipo_notizia_url}" class="d-block fw-light text-primary small">${incarichi.title}</a>
542 </#if>
543 </div>
544 <#if
545 immagine?has_content
546 && immagine.url?has_content
547 && structureName != "Documento Pubblico"
548 >
549 <div class="img-holder" style="width: 30%;">
550 <img
551 style="width: 100%; max-height: 160px; object-fit: cover;"
552 class="rounded-top img-fluid img-responsive"
553 src="${immagine.url}"
554 title="${titolo}"
555 alt="${titolo}"
556 >
557 </div>
558 </#if>
559 </div>
560 <div class="bottom p-3">${biografia}</div>
561 </div>
562 </div>
563 </div>
564</div>
565</#macro>