Se ha producido un error al procesar la plantilla.
The string doesn't match the expected date/time/date-time format. The string to parse was: "null:null". The expected format was: "HH:mm". The nested reason given follows: Unparseable date: "null:null" ---- FTL stack trace ("~" means nesting-related): - Failed at: #assign dateFull = (dateFull?datetime... [in template "10112#522485#25803229" in macro "getHourMin" at line 239, column 21] - Reached through: @getHourMin hora=horaInicio minutos=m... [in template "10112#522485#25803229" at line 102, column 75] ----
1<#--
2Centros - Listado de eventos
3https://dev74.ehu.eus/es/web/bilboko-ingeniaritza-eskola
4Nota: solo se usa con global-theme. Listado de eventos para home de centros (al dar a mostrar más hay otro publicador con esta ADT)
5-->
6<#assign groupLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.GroupLocalService")>
7<#assign layoutLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.LayoutLocalService")>
8<#if themeDisplay.getTheme().getContextPath() == "/o/upv-ehu-global-theme">
9<#assign colorSchemeId = themeDisplay.getColorSchemeId() />
10<#if colorSchemeId?has_content && colorSchemeId=="08">
11 <#if entries?has_content>
12 <#assign randomName = randomNamespace />
13 <div class="news_list-wrapper">
14 <div class="news_title">
15 <h2 id="title_${randomName}">${languageUtil.get(locale, "centros.title.events")}</h2>
16 <#list portletPreferences?keys as key>
17 <#assign values = portletPreferences[key] />
18
19 <#if values?has_content>
20 <#if key == "paginationType">
21 <#list values as value>
22 <#if value == "none">
23 <#-- Se recupera la página de visualización del campo personalizado correspondiente del site -->
24 <#assign groupId = themeDisplay.getScopeGroupId()/>
25 <#assign sitio = groupLocalService.fetchGroup(groupId)/>
26 <#assign FriendlyPageEvents = (sitio.getExpandoBridge().getAttribute("FriendlyPageEvents"))!"">
27 <#if FriendlyPageEvents?has_content>
28 <#assign friendlyURL = FriendlyPageEvents?string />
29 <#if friendlyURL?has_content >
30 <#if layoutLocalService.fetchLayoutByFriendlyURL(groupId, false, friendlyURL)??>
31 <#assign layout = layoutLocalService.fetchLayoutByFriendlyURL(groupId, false, friendlyURL)/>
32 <#if layout?? >
33 <#assign urlLayout>${portalUtil.getLayoutFriendlyURL(layout, themeDisplay)}</#assign>
34 <#if urlLayout?? >
35 <a href="${urlLayout}" id="btn_${randomName}" aria-labelledby="btn_${randomName} title_${randomName}" class="linkArrow">
36 <span>${languageUtil.get(locale, "ehu-view-more")}</span>
37 </a>
38 </#if>
39 </#if>
40 </#if>
41 </#if>
42 </#if>
43 </#if>
44 </#list>
45 </#if>
46 </#if>
47 </#list>
48
49 </div>
50 <ul class="list-group news_list-list">
51 <#list entries as entry>
52 <#assign assetRenderer = entry.getAssetRenderer() />
53
54 <#assign docXml = saxReaderUtil.read(entry.getAssetRenderer().getArticle().getContentByLocale(locale))/>
55 <#assign pretitulo = docXml.valueOf("//dynamic-element[@name='ehupretitle']/dynamic-content/text()") />
56 <#assign titulo = docXml.valueOf("//dynamic-element[@name='ehutitle']/dynamic-content/text()") />
57 <#assign subtitulo = docXml.valueOf("//dynamic-element[@name='ehunewsubtitle']/dynamic-content/text()") />
58
59 <#assign viewURL = assetPublisherHelper.getAssetViewURL(renderRequest, renderResponse, entry) />
60
61 <#-- <#if assetLinkBehavior != "showFullContent">
62 <#assign viewURL = assetRenderer.getURLViewInContext(renderRequest, renderResponse, viewURL) />
63 </#if> -->
64 <#if assetRenderer?has_content && assetRenderer.getArticle??>
65 <#assign journal = assetRenderer.getArticle() />
66 <#if journal?has_content>
67 <#assign layoutUuid = journal.getLayoutUuid() />
68 <#if layoutUuid?has_content >
69 <#assign viewURL = assetRenderer.getURLViewInContext(renderRequest, renderResponse, viewURL) />
70 </#if>
71 </#if>
72 </#if>
73
74 <li class="list-group-item news_list-item">
75 <a href="${viewURL}" class="linkArrow sombra">
76 <div class="news_col">
77 <#if titulo?has_content >
78 <strong>${titulo}</strong>
79 </#if>
80
81 <span class="metadata-entry metadata-publish-date">
82
83 <#assign fechaInicio = docXml.valueOf("//dynamic-element[@name='ehustartdatehour']/dynamic-content/text()")!"" />
84 <#assign horaInicio = docXml.valueOf("//dynamic-element[@name='ehustartdatehourhh']/dynamic-content/text()")!""/>
85 <#assign minInicio = docXml.valueOf("//dynamic-element[@name='ehustartdatehourmm']/dynamic-content/text()")!"" />
86 <#assign fechaFin = docXml.valueOf("//dynamic-element[@name='ehuenddatehour']/dynamic-content/text()")!""/>
87 <#assign horaFin = docXml.valueOf("//dynamic-element[@name='ehuenddatehourhh']/dynamic-content/text()")!""/>
88 <#assign minFin = docXml.valueOf("//dynamic-element[@name='ehuenddatehourmm']/dynamic-content/text()")!""/>
89 <#assign showOnlyYearMonth = docXml.valueOf("//dynamic-element[@name='ehushowonlyyearmonth']/dynamic-content/text()")!""/>
90
91 <#-- Cuando hay hora de inicio y hora de fin es un caso especial ya que hay que pintar primero los días y luego las horas -->
92 <#if (fechaInicio?has_content || fechaFin?has_content) && (horaInicio?has_content || horaFin?has_content) && (showOnlyYearMonth == "false" || showOnlyYearMonth == "") >
93 <#if fechaInicio?has_content >
94 <@getDayAndMonth fecha=fechaInicio />
95 </#if>
96 <#if (fechaInicio?has_content && fechaFin?has_content) >
97 -
98 </#if>
99 <#if fechaFin?has_content >
100 <@getDayAndMonth fecha=fechaFin />
101 </#if>
102 , <@getHourMin hora=horaInicio minutos=minInicio />
103 <#if horaFin?has_content >
104 - <@getHourMin hora=horaFin minutos=minFin />
105 </#if>
106 <#else>
107 <#--fecha inicio -->
108 <#if showOnlyYearMonth == "true">
109 <@getyearmonth fecha=fechaInicio />
110 <#else>
111 <@getDateField fecha=fechaInicio hora=horaInicio minutos=minInicio />
112 </#if>
113
114 <#--fecha fin -->
115 <#if fechaFin?has_content >
116 <#if showOnlyYearMonth == "true">
117 - <@getyearmonth fecha=fechaFin />
118 <#else>
119 - <@getDateField fecha=fechaFin hora=horaFin minutos=minFin />
120 </#if>
121 </#if>
122 </#if>
123 </span>
124
125 <#if pretitulo?has_content >
126 <span class="pretitle">${pretitulo}</span>
127 <#elseif subtitulo?has_content >
128 <span class="subtitle">${subtitulo}</span>
129 </#if>
130 </div>
131 </a>
132 </li>
133 </#list>
134
135 </ul>
136 </div>
137 </#if>
138<#else>
139 <div class="alert alert-error">
140 <@liferay.language key="ehu.error.theme-color" />
141 </div>
142</#if>
143<#else>
144 <div class="alert alert-error">
145 <@liferay.language key="ehu.error.theme-color" />
146 </div>
147</#if>
148
149<#macro getDateField fecha hora minutos >
150
151 <#assign localeStr = themeDisplay.getLocale() />
152 <#setting locale = localeStr>
153 <#-- Cuando la hora o el minuto es "00" Liferay devuelve "0" así que hay que arreglarlo -->
154 <#if hora?has_content && hora == "0">
155 <assign hora = "00">
156 </#if>
157 <#if minutos?has_content && minutos == "0">
158 <assign minutos = "00">
159 </#if>
160
161 <#-- <#if fecha?has_content && (hora?has_content && minutos?has_content) && (hora!="0" || minutos!="0") > -->
162 <#if fecha?has_content && (hora?has_content && minutos?has_content)>
163 <#assign dateFull = fecha+" "+hora+":"+minutos />
164 <#assign dateFormat = "dd MMMM, HH:mm" />
165 <#if localeStr=='eu_ES'>
166 <#assign dateFormat = "MMMM@ dd, HH:mm" />
167 <#elseif localeStr=='en_GB'>
168 <#assign dateFormat = "MMMM dd, HH:mm" />
169 </#if>
170 <#setting date_format=dateFormat>
171 <#if dateFull?has_content>
172 <#assign dateFull = (dateFull?datetime("yyyy-MM-dd HH:mm"))?date>
173 </#if>
174 <#else>
175 <#assign dateFormat = "dd MMMM" />
176 <#if localeStr=='eu_ES'>
177 <#assign dateFormat = "MMMM@ dd" />
178 <#elseif localeStr=='en_GB'>
179 <#assign dateFormat = "MMMM dd" />
180 </#if>
181 <#setting date_format=dateFormat>
182 <#if fecha?has_content >
183 <#assign dateFull = (fecha?datetime("yyyy-MM-dd"))?date>
184 </#if>
185 </#if>
186
187 <#if dateFull?has_content >
188 <#assign modifiedStr = dateFull?string>
189 <#if localeStr=='eu_ES'>
190 ${modifiedStr?replace("@", "k")}
191 <#else>
192 ${modifiedStr}
193 </#if>
194 </#if>
195</#macro>
196
197<#macro getyearmonth fecha >
198 <#assign localeStr = themeDisplay.getLocale() />
199 <#setting locale = localeStr>
200
201 <#if fecha?has_content >
202 <#assign dateFull = fecha />
203 <#assign dateFormat = "MMMM" />
204 <#setting date_format=dateFormat>
205 <#if dateFull?has_content>
206 <#assign dateFull = (dateFull?datetime("yyyy-MM-dd"))?date>
207 </#if>
208 <#else>
209 <#assign dateFormat = "MMMM" />
210 <#setting date_format=dateFormat>
211 <#if fecha?has_content >
212 <#assign dateFull = (fecha?datetime("yyyy-MM-dd"))?date>
213 </#if>
214 </#if>
215
216 <#if dateFull?has_content >
217 <#assign modifiedStr = dateFull?string>
218 ${modifiedStr}
219 </#if>
220</#macro>
221
222<#macro getHourMin hora minutos >
223
224 <#assign localeStr = themeDisplay.getLocale() />
225 <#setting locale = localeStr>
226 <#-- Cuando la hora o el minuto es "00" Liferay devuelve "0" así que hay que arreglarlo -->
227 <#if hora?has_content && hora == "0">
228 <assign hora = "00">
229 </#if>
230 <#if minutos?has_content && minutos == "0">
231 <assign minutos = "00">
232 </#if>
233
234 <#if hora?has_content && minutos?has_content>
235 <#assign dateFull = hora+":"+minutos />
236 <#assign dateFormat = "HH:mm" />
237 <#setting date_format=dateFormat>
238 <#if dateFull?has_content>
239 <#assign dateFull = (dateFull?datetime("HH:mm"))?date>
240 </#if>
241 <#else>
242 <#assign dateFormat = "HH:mm" />
243 <#setting date_format=dateFormat>
244 <#if fecha?has_content >
245 <#assign dateFull = (fecha?datetime("HH:mm"))?date>
246 </#if>
247 </#if>
248
249 <#if dateFull?has_content >
250 <#assign modifiedStr = dateFull?string>
251 <#if localeStr=='eu_ES'>
252 ${modifiedStr?replace("@", "k")}
253 <#else>
254 ${modifiedStr}
255 </#if>
256 </#if>
257</#macro>
258
259<#macro getDayAndMonth fecha >
260 <#assign localeStr = themeDisplay.getLocale() />
261 <#setting locale = localeStr>
262
263 <#if fecha?has_content>
264 <#assign dateFull = fecha />
265 <#assign dateFormat = "dd MMMM" />
266 <#if localeStr=='eu_ES'>
267 <#assign dateFormat = "MMMM@ dd" />
268 <#elseif localeStr=='en_GB'>
269 <#assign dateFormat = "MMMM dd" />
270 </#if>
271 <#setting date_format=dateFormat>
272 <#if dateFull?has_content>
273 <#assign dateFull = (dateFull?datetime("yyyy-MM-dd"))?date>
274 </#if>
275 <#else>
276 <#assign dateFormat = "dd MMMM" />
277 <#if localeStr=='eu_ES'>
278 <#assign dateFormat = "MMMM@ dd" />
279 <#elseif localeStr=='en_GB'>
280 <#assign dateFormat = "MMMM dd" />
281 </#if>
282 <#setting date_format=dateFormat>
283 <#if fecha?has_content >
284 <#assign dateFull = (fecha?datetime("yyyy-MM-dd"))?date>
285 </#if>
286 </#if>
287
288 <#if dateFull?has_content >
289 <#assign modifiedStr = dateFull?string>
290 <#if localeStr=='eu_ES'>
291 ${modifiedStr?replace("@", "k")}
292 <#else>
293 ${modifiedStr}
294 </#if>
295 </#if>
296</#macro>
—
15 Resultados por página