Indicatore - Rsa
An error occurred while processing the template.
The following has evaluated to null or missing: ==> id_indicatore [in template "20155#20195#639516" at line 140, column 71] ---- 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: ${id_indicatore} [in template "20155#20195#639516" at line 140, column 69] ----
1<#--
2Widget 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
8nome_indicatore
9descrizione
10classificazione_dpsir
11copertura_temporale
12copertura_spaziale
13-->
14<style>
15
16/*
17.Grid {
18
19 display: flex !important;
20 justify-content: space-around !important;
21}
22
23.news_top{
24 border: 1px solid lightgray;
25 background: #FBFBFB !important;
26
27}
28
29*/
30
31.fixed-width-30 {
32 width: 30%; /* Imposta la larghezza della colonna al 30% */
33}
34
35.fixed-width-70 {
36 width: 70%; /* Imposta la larghezza della colonna al 70% */
37}
38
39
40table {
41 table-layout: fixed; /* Imposta il layout fisso */
42 width: 100%; /* Larghezza uniforme per le tabelle */
43 border-collapse: collapse; /* (Facoltativo) Migliora la visualizzazione delle tabelle */
44}
45
46/* Gestione della prima colonna */
47table th:first-child, table td:first-child {
48 width: 5%; /* Prima colonna al 10% */
49}
50
51/* Gestione delle altre colonne */
52table th:not(:first-child), table td:not(:first-child) {
53 width: calc((100% - 10%) / (X - 1)); /* Divide equamente lo spazio restante tra le altre colonne */
54 word-wrap: break-word; /* Gestisce il testo lungo */
55}
56
57
58
59
60</style>
61
62
63
64
65<#assign serviceContext = staticUtil["com.liferay.portal.kernel.service.ServiceContextThreadLocal"].getServiceContext() />
66<#assign dlService = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService") />
67<#assign ddmFieldLocalService = serviceLocator.findService("com.liferay.dynamic.data.mapping.service.DDMFieldLocalService")/>
68
69<#assign coreLocalService = serviceLocator.findService("com.agilae.core.service.CoreLocalService") />
70<#assign testService = coreLocalService.getAgilaeJournalArticleUtil() />
71
72<#assign themeDisplay = serviceContext.getThemeDisplay() />
73<#assign dateFormat = "dd MMM yyyy" />
74<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")>
75
76
77
78<div class="container mt-5">
79 <table class="table table-striped table-bordered">
80 <thead>
81 <tr>
82 <th class="align-top">N</th>
83 <th class="align-top fixed-width-20">Nome dell’Indicatore</th>
84 <th class="align-top fixed-width-20">Descrizione del Significato dell’Indicatore</th>
85 <th class="align-top fixed-width-20">Classificazione dell’Indicatore secondo il Modello DPSIR</th>
86 <th class="align-top fixed-width-20">Copertura Temporale</th>
87 <th class="align-top fixed-width-20">Copertura Spaziale</th>
88 </tr>
89 </thead>
90 <tbody>
91
92<#if entries?has_content>
93
94<#list entries as curEntry>
95
96 <#assign assetRenderer = curEntry.getAssetRenderer() />
97
98 <#assign currentURL = themeDisplay.getURLCurrent()>
99
100 <#assign viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, assetRenderer, curEntry, !stringUtil.equals(assetLinkBehavior, "showFullContent")) />
101 <#assign entryTitle = htmlUtil.escape(assetRenderer.getTitle(locale)) />
102 <#assign entrySummary = assetRenderer.getSummary(renderRequest,renderResponse)/>
103
104 <#assign journalArticle = assetRenderer.getArticle() />
105 <#if journalArticle?has_content>
106 <#assign ddmStructure = journalArticle.getDDMStructure() />
107 <#assign ddmForm = ddmStructure.getDDMForm()/>
108 <#assign ddmFormValues = ddmFieldLocalService.getDDMFormValues(ddmForm, journalArticle.getId()) />
109 <#assign ddmFormFieldValues = ddmFormValues.getDDMFormFieldValues() />
110
111
112
113
114 <#list ddmFormFieldValues as fieldName>
115
116 <#switch fieldName.getFieldReference()>
117 <#case "id_indicatore">
118 <#assign id_indicatore = fieldName.getValue().getString(locale) />
119 <#break>
120 <#case "nome_indicatore">
121 <#assign nome_indicatore = fieldName.getValue().getString(locale) />
122 <#break>
123 <#case "descrizione_breve_indicatore">
124 <#assign descrizione_breve_indicatore = fieldName.getValue().getString(locale) />
125 <#break>
126 <#case "classificazione_dpsir">
127 <#assign classificazione_dpsir = fieldName.getValue().getString(locale) />
128 <#break>
129 <#case "copertura_temporale">
130 <#assign copertura_temporale = fieldName.getValue().getString(locale) />
131 <#break>
132 <#case "copertura_spaziale">
133 <#assign copertura_spaziale = fieldName.getValue().getString(locale) />
134 <#break>
135 </#switch>
136 </#list>
137
138
139 <tr>
140 <td>${id_indicatore}</td>
141 <td><a class="u-text-r-xs u-color-black u-textClean verdeArpac" href="${viewURL}&callerPage=${currentURL}">${nome_indicatore}</a></td>
142 <td>${descrizione_breve_indicatore}</td>
143 <td>${classificazione_dpsir}</td>
144 <td>${copertura_temporale}</td>
145 <td>${copertura_spaziale}</td>
146 </tr>
147
148 <#else>
149 <!-- Qui gestisci il caso in cui journalArticle è null -->
150 <p>L'articolo non è disponibile.</p>
151 </#if>
152
153
154</#list>
155</#if>
156
157</tbody>
158</table>
159
160
161</div>
162
163
164<script>
165document.addEventListener("DOMContentLoaded", function() {
166
167 // Se l'item è 'home', salva "home" in localStorage
168 localStorage.setItem("callerPage", "currentURL");
169 console.log("callerPage set to home");
170
171});
172</script>