Logo Gobierno de España Logo Ministerio de ciencia, innovación y universidades

Protegemos tu salud a través de la Ciencia

Agenda

Seleccione el tipo de la publicación
Ordenar
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: "". The expected format was: "yyyy-MM-dd".
The nested reason given follows:
Unparseable date: ""

----
FTL stack trace ("~" means nesting-related):
	- Failed at: #assign fechaInicio = fechaInicioStri...  [in template "20096#20121#514005" at line 177, column 9]
----
1<#-- 
2ADT-ResultadosActualidadDetallado 
3 
4    Autor: Mario Gonzalez Vega 
5    Fecha de creacion: 25/06/2024 
6		Descripcion: Esta version tiene imagen, el titulo del evento, la fecha y la hora 
7-------------------------------------------- 
8    Autor: Mario Gonzalez Vega 
9    Fecha modificacion: 03/09/2024 
10		Descripcion: Cambios para separar los eventos en EVENTOS PROXIMOS y EVENTOS PASADOS: Añadidos saxReader, xPathSelector, la fecha del dia de hoy etc. 
11		 Se consigue la fecha de la TPL para luego compararla con la fecha del dia de hoy y separar por grupos los eventos 
12-------------------------------------------- 
13    Autor: Abdón Hernández Perera & Alberto Gonzalez Obreo 
14    Fecha modificacion: 12/09/2024 
15		Descripcion: Los eventos próximos salen por su lado en orden ascendente filtrados por su fecha de cierre, por otro lado los eventos pasados se muestran por  
16    orden descendente en su apartado. 
17-------------------------------------------- 
18    Autor: Mario Gonzalez Vega 
19    Fecha modificacion: 09/01/2025 
20		Descripcion: Traduccion de eventos pasados y eventos futuros, incluidos en el hook de traducciones 
21--> 
22<style> 
23	.lfr-layout-structure-item-row { 
24        overflow: unset; 
25
26    .contSecActualidad ul, .contSecActualidad li { 
27        list-style: none; 
28
29	.contSecActualidad img, .contSecActualidad iframe { 
30		height: 10rem; 
31		object-fit: cover; 
32		width: 100%; 
33		border: 1px solid lightgray; 
34		border-radius: 5px; 
35
36	 
37	.contSecActualidad .titulo { 
38		-webkit-line-clamp: 4; 
39		line-clamp: 4; 
40		-webkit-box-orient: vertical; 
41		overflow: hidden; 
42		text-overflow: ellipsis; 
43		display: -webkit-box; 
44		color: var(--brand-color-1); 
45		font-size: 1.25rem; 
46    font-family: Lato; 
47    margin-bottom: 1.5rem !important; 
48		margin-top: 1rem !important; 
49		font-weight: 500; 
50		height: 6rem; 
51
52	 
53	.contSecActualidad svg{ 
54		width: 24px; 
55    height: 24px; 
56    margin-right: 10px; 
57	  overflow: hidden; 
58    vertical-align: middle; 
59
60	 
61	.contSecActualidad .resumen { 
62		-webkit-line-clamp: 3; 
63		-webkit-box-orient: vertical; 
64		overflow: hidden; 
65		text-overflow: ellipsis; 
66		display: -webkit-box; 
67        font-size: 1rem; 
68        margin-bottom: 1.5rem !important; 
69
70 
71    .secNoticiaItem p.my-1{ 
72        margin-bottom: 1.5rem !important; 
73
74	 
75	.contSecActualidad .numItems { 
76		color: var(--brand-color-1); 
77		font-size: var(--fs-small, 14px); 
78
79	 
80	.contSecActualidad .urlDetalleNoticia { 
81		color: var(--brand-color-1); 
82		display: block; 
83		width: 60%; 
84		border-bottom: 1px solid var(--brand-color-1); 
85		text-decoration: none!important; 
86    /*position: absolute; 
87    bottom: 3.5rem;*/ 
88
89	 
90	.contSecActualidad .urlDetalleNoticia:hover { 
91		opacity: .5; 
92		text-decoration: none; 
93
94	 
95	.secNoticiaItem { 
96		margin-bottom: 3.5rem; 
97    height: 25rem; 
98
99	 
100	.noticiaClickable{ 
101		color: inherit; 
102		text-decoration: none; 
103
104	.noticiaClickable:hover{ 
105		color: inherit; 
106		opacity: .7; 
107		text-decoration: none; 
108
109	 
110	.textoDato{ 
111		word-break: break-word; 
112		display: -webkit-box; 
113  -webkit-box-orient: vertical; 
114  -webkit-line-clamp: 2; 
115  overflow: hidden; 
116  text-overflow: ellipsis; 
117  line-height: 1.5em; /* Ajusta esto según la altura de línea de tu texto */ 
118  height: 3em; 
119
120	 
121	@media screen and (max-width: 991px ) { 
122 
123        .secNoticiaItem { 
124            height: auto; 
125
126        .contSecActualidad .urlDetalleNoticia { 
127            position: unset; 
128            bottom: unset; 
129
130		.contSecActualidad { 
131			padding: 0 10px; 
132
133		 
134		.contSecActualidad h2 {  
135			height: auto; 
136
137		 
138		.contSecActualidad .resumen { 
139			height: auto; 
140
141		 
142		.contSecActualidad img, .contSecActualidad iframe { 
143			height: 20rem; 
144
145
146</style> 
147 
148 
149<style> 
150    /* Tus estilos aquí */ 
151</style> 
152<#-- Inicialización de servicios y variables --> 
153<#assign AssetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") /> 
154<#assign JournalArticleLocalServiceUtil = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService") /> 
155<#assign saxReaderUtil = serviceLocator.findService("com.liferay.portal.kernel.xml.SAXReaderUtil") /> 
156<#assign todayString = .now?string("yyyy-MM-dd") /> 
157<#assign today = todayString?date("yyyy-MM-dd") /> 
158<#assign proximosEventos = [] /> 
159<#assign eventosPasados = [] /> 
160 
161<#if entries?has_content> 
162    <#-- Clasificar eventos en "Próximos" y "Pasados" --> 
163    <#list entries as entry> 
164        <#assign curEntry = AssetEntryLocalService.getEntry(entry.getClassName(), entry.getClassPK())/> 
165        <#assign renderer = curEntry.getAssetRenderer() /> 
166        <#assign article = renderer.getArticle() /> 
167        <#assign journalArticle = renderer.getAssetObject() /> 
168 
169        <#assign classPK = entry.getClassPK() /> 
170        <#assign journalArticle = JournalArticleLocalServiceUtil.getLatestArticle(classPK) /> 
171        <#assign xmlContent = journalArticle.getContent() /> 
172        <#assign document = saxReaderUtil.read(xmlContent) /> 
173        <#assign rootElement = document.getRootElement() /> 
174 
175        <#assign xPathSelectorInicio = saxReaderUtil.createXPath("dynamic-element[@field-reference='startDate']") /> 
176        <#assign fechaInicioString = xPathSelectorInicio.selectSingleNode(rootElement).getStringValue()?trim />  
177        <#assign fechaInicio = fechaInicioString?date("yyyy-MM-dd")> 
178 
179        <#assign xPathSelectorFin = saxReaderUtil.createXPath("dynamic-element[@field-reference='endDate']") /> 
180        <#assign fechaFinString = xPathSelectorFin.selectSingleNode(rootElement).getStringValue()?trim /> 
181        <#assign fechaFin = fechaFinString?date("yyyy-MM-dd")> 
182 
183        <#-- Clasificar eventos en "Próximos Eventos" o "Eventos Pasados" --> 
184        <#if fechaFin gte today> 
185            <#assign proximosEventos = proximosEventos + [{ 
186                'entry': entry, 
187                'fechaInicio': fechaInicio 
188            }] /> 
189        <#else> 
190            <#assign eventosPasados = eventosPasados + [{ 
191                'entry': entry, 
192                'fechaInicio': fechaInicio 
193            }] /> 
194        </#if> 
195    </#list> 
196 
197    <#-- Ordenar ambas listas --> 
198    <#assign proximosEventos = proximosEventos?sort_by("fechaInicio") /> 
199    <#assign eventosPasados = eventosPasados?sort_by("fechaInicio")?reverse /> 
200 
201    <#-- Mostrar títulos de sección --> 
202    <div class="contSecActualidad"> 
203        <#-- Mostrar Próximos Eventos --> 
204        <#if proximosEventos?size gt 0> 
205            <li class="col-12 mt-3 mb-3" tabindex="0"> 
206                <h3>${languageUtil.get(locale, "eventos.proximos")}</h3> 
207                <hr> 
208            </li> 
209            <ul class="row" aria-labelledby="descUl_contSecActualidad" tabindex="0"> 
210                <#list proximosEventos as entryData> 
211                    <#assign entry = entryData.entry /> 
212                    <#assign curEntry = AssetEntryLocalService.getEntry(entry.getClassName(), entry.getClassPK())/> 
213                    <#assign renderer = curEntry.getAssetRenderer() /> 
214                    <#assign journalArticle = renderer.getAssetObject() /> 
215 
216                    <li class="col-12 col-lg-3" tabindex="0"> 
217                        <@liferay_journal["journal-article"]  
218                            articleId=journalArticle.getArticleId()  
219                            ddmTemplateKey="TPL_ACTUALIDAD_ITEM_DETALLADO"  
220                            groupId=journalArticle.getGroupId() /> 
221                    </li> 
222                </#list> 
223            </ul> 
224        </#if> 
225 
226        <#-- Mostrar Eventos Pasados --> 
227        <#if eventosPasados?size gt 0> 
228            <li class="col-12 mt-3 mb-3" tabindex="0"> 
229                <h3>${languageUtil.get(locale, "eventos.pasados")}</h3> 
230                <hr> 
231            </li> 
232            <ul class="row" aria-labelledby="descUl_contSecActualidad" tabindex="0"> 
233                <#list eventosPasados as entryData> 
234                    <#assign entry = entryData.entry /> 
235                    <#assign curEntry = AssetEntryLocalService.getEntry(entry.getClassName(), entry.getClassPK())/> 
236                    <#assign renderer = curEntry.getAssetRenderer() /> 
237                    <#assign journalArticle = renderer.getAssetObject() /> 
238 
239                    <li class="col-12 col-lg-3" tabindex="0"> 
240                        <@liferay_journal["journal-article"]  
241                            articleId=journalArticle.getArticleId()  
242                            ddmTemplateKey="TPL_ACTUALIDAD_ITEM_DETALLADO"  
243                            groupId=journalArticle.getGroupId() /> 
244                    </li> 
245                </#list> 
246            </ul> 
247        </#if> 
248    </div> 
249</#if>