1<#assign JournalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")>
2<#assign AssetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService")>
3<#assign AssetCategoryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService")>
4
5<#assign statusApproved = 0>
6<#assign journalArticle = JournalArticleLocalService.fetchLatestArticle(groupId, reserved\-article\-id.data, statusApproved)>
7<#assign assetEntry = AssetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle", journalArticle.getResourcePrimKey())>
8<#assign categories = AssetCategoryLocalService.getEntryCategories(assetEntry.getEntryId())>
9
10
11<#assign contentUrl = themeDisplay.getScopeGroup().getDisplayURL(themeDisplay,false) + "/-/" + journalArticle.getUrlTitle() />
12
13<#-- Cmbiar nombre de la clase -->
14<div class="card destacado-listado margen-portal">
15 <div class="row">
16 <div class="col-sm-12 col-md-6">
17 <#if (titulo.getData())??>
18 <strong><h3 class="card-title">${titulo.getData()}</strong></h3>
19 </#if>
20
21 <#assign fecha_Data = getterUtil.getString(fecha.getData())>
22 <#if validator.isNotNull(fecha_Data)>
23 <#assign fecha_DateObj = dateUtil.parseDate("yyyy-MM-dd", fecha_Data, locale)>
24 <p class="card-date">
25 ${dateUtil.getDate(fecha_DateObj, "dd MMM yyyy", locale)}
26 <#assign fechaFin_Data = getterUtil.getString(fechaFin.getData())>
27 <#if validator.isNotNull(fechaFin_Data)>
28 <#assign fechaFin_DateObj = dateUtil.parseDate("yyyy-MM-dd", fechaFin_Data, locale)>
29 - ${dateUtil.getDate(fechaFin_DateObj, "dd MMM yyyy", locale)}
30 </#if>
31 </p>
32 </#if>
33
34 <#if categories?? && (categories?size >0)>
35 <div class="categorias">
36 <#list categories as cat>
37 <span class="categoria"><strong>${cat.getTitle(locale)}</strong></span>
38 </#list>
39 </div>
40 </#if>
41
42 <#if (subtitulo.getData())??>
43 <p class="card-text">${subtitulo.getData()}</p>
44 </#if>
45
46 </div>
47 <div class="col-sm-12 col-md-6">
48 <#if (ImagenPrincipal.getData())?? && ImagenPrincipal.getData() != "">
49 <img class="card-img-top" style='height: 100%; width: 100%; object-fit: contain' alt="${ImagenPrincipal.getAttribute('alt')}" data-fileentryid="${ImagenPrincipal.getAttribute('fileEntryId')}" src="${ImagenPrincipal.getData()}" />
50 </#if>
51 <ul class="share-social js-share-social">
52 <li><a class="facebook" href="" onclick="window.open('http://www.facebook.com/sharer.php?u=${contentUrl}', '${titulo.getData()}', 'width=600,height=400'); return false;" aria-label="Compartir en Facebook">
53 <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-facebook" viewBox="0 0 16 16">
54 <path d="M16 8.049c0-4.446-3.582-8.05-8-8.05C3.58 0-.002 3.603-.002 8.05c0 4.017 2.926 7.347 6.75 7.951v-5.625h-2.03V8.05H6.75V6.275c0-2.017 1.195-3.131 3.022-3.131.876 0 1.791.157 1.791.157v1.98h-1.009c-.993 0-1.303.621-1.303 1.258v1.51h2.218l-.354 2.326H9.25V16c3.824-.604 6.75-3.934 6.75-7.951z"/>
55 </svg>
56 </a></li>
57 <li><a class="twitter" href="" onclick="window.open('https://twitter.com/intent/tweet?text=${titulo.getData()}&tw_p=tweetbutton&url=${currentUrl}', '${titulo.getData()}', 'width=600,height=400'); return false;" aria-label="Compartir en Twitter">
58 <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-twitter-x" viewBox="0 0 16 16">
59 <path d="M12.6.75h2.454l-5.36 6.142L16 15.25h-4.937l-3.867-5.07-4.425 5.07H.316l5.733-6.57L0 .75h5.063l3.495 4.633L12.601.75Zm-.86 13.028h1.36L4.323 2.145H2.865z"/>
60 </svg>
61 </a></li>
62 <li><a class="linkedin" href="" onclick="window.open('http://www.linkedin.com/shareArticle?&title=${titulo.getData()}&mini=true&url=${contentUrl}&summary=', '${titulo.getData()}', 'width=600,height=400'); return false;" aria-label="Compartir en Linkedin">
63 <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-linkedin" viewBox="0 0 16 16">
64 <path d="M0 1.146C0 .513.526 0 1.175 0h13.65C15.474 0 16 .513 16 1.146v13.708c0 .633-.526 1.146-1.175 1.146H1.175C.526 16 0 15.487 0 14.854V1.146zm4.943 12.248V6.169H2.542v7.225h2.401zm-1.2-8.212c.837 0 1.358-.554 1.358-1.248-.015-.709-.52-1.248-1.342-1.248-.822 0-1.359.54-1.359 1.248 0 .694.521 1.248 1.327 1.248h.016zm4.908 8.212V9.359c0-.216.016-.432.08-.586.173-.431.568-.878 1.232-.878.869 0 1.216.662 1.216 1.634v3.865h2.401V9.25c0-2.22-1.184-3.252-2.764-3.252-1.274 0-1.845.7-2.165 1.193v.025h-.016a5.54 5.54 0 0 1 .016-.025V6.169h-2.4c.03.678 0 7.225 0 7.225h2.4z"/>
65 </svg>
66 </a></li>
67 <li><a class="print" href="" onclick="handlePrint()" aria-label="Imprimir">
68 <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-printer" viewBox="0 0 16 16">
69 <path d="M2.5 8a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1z"/>
70 <path d="M5 1a2 2 0 0 0-2 2v2H2a2 2 0 0 0-2 2v3a2 2 0 0 0 2 2h1v1a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2v-1h1a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2h-1V3a2 2 0 0 0-2-2H5zM4 3a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1v2H4V3zm1 5a2 2 0 0 0-2 2v1H2a1 1 0 0 1-1-1V7a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3a1 1 0 0 1-1 1h-1v-1a2 2 0 0 0-2-2H5zm7 2v3a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1v-3a1 1 0 0 1 1-1h6a1 1 0 0 1 1 1z"/>
71 </svg>
72 </a></li>
73 </ul>
74 </div>
75 </div>
76</div>
77
78<div class="bloque-info margen-portal">
79
80 <#-- SECCIÓN INFORMACIÓN -->
81 <#if TextoNoticia.getData()?has_content >
82 <section class="contenedor_informacion ">
83 <#if
84 ImagenContenido.getData()?has_content ||
85 TextoNoticia.getData()?has_content
86 >
87 <#-- <div class="${posicionImg}"> -->
88 <div class="">
89 <#if ImagenContenido.getData()?has_content>
90 <div class="informacion_contenido_img centrar-tablet ">
91 <img
92 alt="${ImagenContenido.getAttribute('alt')}"
93 title="${ImagenContenido.getAttribute('alt')}"
94 data-fileentryid="${ImagenContenido.getAttribute('fileEntryId')}"
95 src="${ImagenContenido.getData()}"
96 />
97 </div>
98 </#if>
99
100 <div class="informacion_contenido margin-contenido">
101 <#if TextoNoticia.getData()?has_content>
102 <div class="informacion_contenido_texto">
103 ${TextoNoticia.getData()}
104 </div>
105 </#if>
106 </div>
107 </div>
108
109 <#else>
110 <#if TextoNoticia.getData()?has_content>
111 <div class="informacion_contenido_texto ">
112 ${TextoNoticia.getData()}
113 </div>
114 </#if>
115 </#if>
116 </section>
117 </#if>
118
119 <#-- YOUTUBE Y FLICKR OK -->
120 <#if ((video.getData())?? && video.getData()!= "") ||
121 (flickr.flickrLink.getData()?? && flickr.flickrLink.getData()!= "" &&
122 flickr.flickrImage.getData()?? && flickr.flickrImage.getData()!= "")
123 >
124 <div class="youtube-fickr-container row">
125 <#assign claseContenedor = ''>
126 <#if (flickr.flickrLink.getData()?? && flickr.flickrLink.getData()!= "" && flickr.flickrImage.getData()?? && flickr.flickrImage.getData()!= "")>
127 <#if (video.getData())?? && video.getData()!= "">
128 <#assign claseContenedor = 'next-to-youtube'>
129 </#if>
130 <div class="col-md-6 ${claseContenedor}">
131 <div class="flickr-container">
132 <a data-flickr-embed="true" href="${flickr.flickrLink.getData()}" title="Ãlbum de Flickr asociado a ${titulo.getData()}" target="_black">
133 <img
134 src="${flickr.flickrImage.getData()}"
135 width="100%"
136 height="auto"
137 alt="Ãlbum de Flickr asociado a ${titulo.getData()}"
138 >
139 </a>
140 <script async src="//embedr.flickr.com/assets/client-code.js" charset="utf-8"></script>
141 </div>
142 </div>
143 </#if>
144 <#if (video.getData())?? && video.getData()!= "">
145 <div class="col-md-6">
146 <div class="youtube-container">
147 <iframe class="youtube-iframe" src="${video.getData()}" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
148 </div>
149 </div>
150 </#if>
151 </div>
152 </#if>
153
154 <#-- INFORMACIÓN DESTACADA -->
155 <#if ((grupoTextosDestacados.TextBlue.getData()?? && grupoTextosDestacados.TextBlue.getData()!="" && grupoTextosDestacados.TextBlack.getData()?? && grupoTextosDestacados.TextBlack.getData()!="") ||
156 (textosConIconos.textoConIconos.getData()?? && textosConIconos.textoConIconos.getData()!="" && textosConIconos.tipoTextoConIconos.getData()?? && textosConIconos.tipoTextoConIconos.getData()!=""))>
157 <div class="informacion-destacada">
158 <h2 class="section-title">
159 Información
160 </h2>
161 <#-- Pendiente de modificar en función del idioma-->
162 <#if (grupoTextosDestacados.TextBlue.getData()?? && grupoTextosDestacados.TextBlue.getData()!="" && grupoTextosDestacados.TextBlack.getData()?? && grupoTextosDestacados.TextBlack.getData()!="")>
163 <div class="">
164 <#list grupoTextosDestacados.getSiblings() as item>
165 <#if ((item.TextBlue.getData())?? || (item.TextBlack.getData())??)>
166 <h3 class="title">
167 <#if (item.TextBlue.getData())??>
168 ${item.TextBlue.getData()}:
169 </#if>
170 </h3>
171 <#if (item.TextBlack.getData())??>
172 <span>
173 ${item.TextBlack.getData()}
174 </span>
175 </#if>
176 </#if>
177 </#list>
178 </div>
179 </#if>
180 <#if (textosConIconos.textoConIconos.getData()?? && textosConIconos.textoConIconos.getData()!="" && textosConIconos.tipoTextoConIconos.getData()?? && textosConIconos.tipoTextoConIconos.getData()!="")>
181 <div class="info-container">
182 <div class="row">
183 <#assign counter = 1>
184 <#list textosConIconos.getSiblings() as item>
185 <div class="col-sm-6">
186 <div class="info-element-container row">
187 <#if (item.tipoTextoConIconos.getData())??>
188 <#if (item.tipoTextoConIconos.getData()=="Opción39670654")>
189 <h3 class="info-title col-12"><i class="icon-time"></i> Horario</h3>
190 <#elseif (item.tipoTextoConIconos.getData()=="Opción89861468")>
191 <h3 class="info-title col-12"><i class="icon-map-marker"></i> Dirección</h3>
192 <#elseif (item.tipoTextoConIconos.getData()=="Opción14583174")>
193 <h3 class="info-title col-12"><i class="icon-phone"></i> Contacto</h3>
194 <#elseif (item.tipoTextoConIconos.getData()=="Opción79332648")>
195 <h3 class="info-title col-12"><i class="icon-euro"></i> Tarifas</h3>
196 <#elseif (item.tipoTextoConIconos.getData()=="Opción05861862")>
197 <h3 class="info-title col-12"><i class="icon-user"></i> Personal de Dirección</h3>
198 <#elseif (item.tipoTextoConIconos.getData()=="Opción49936084")>
199 <h3 class="info-title col-12"><i class="icon-road"></i> Accesos</h3>
200 </#if>
201 </#if>
202 <#if (item.textoConIconos.getData())??>
203 <div class="info-text">${item.textoConIconos.getData()}</div>
204 </#if>
205 </div>
206 </div>
207 <#if ((counter % 2) == 0)>
208 <div class="line-after-info-container col-12"></div>
209 </#if>
210 <#assign counter = counter + 1 >
211 </#list>
212 </div>
213 </div>
214 </#if>
215 </div>
216 </#if>
217
218 <div class="row">
219
220 <#-- SECCIÓN LINKS DE INTERÉS -->
221 <#if (grupoLinks.tituloLinks.getData()?? && grupoLinks.tituloLinks.getData() != "") ||
222 (grupoLinks.grupoLink.getSiblings()?? && grupoLinks.grupoLink.textoLink.getData()?? && grupoLinks.grupoLink.textoLink.getData()!="")
223 >
224 <div class="col-12 col-md">
225 <ul class="link-group-section">
226 <#list grupoLinks.getSiblings() as item>
227 <li class="link-group-container">
228 <#if (item.tituloLinks.getData())?? && item.tituloLinks.getData() != "">
229 <h2 class="section-title">${item.tituloLinks.getData()}</h2>
230 </#if>
231 <ul class="link-group row g-2">
232 <#list item.grupoLink.getSiblings() as link>
233 <#assign enlace=''>
234 <#assign enlaceExterno = ''/>
235 <#if link.linkExterno.getData()?? && link.linkExterno.getData() != "">
236 <#assign enlace="${link.linkExterno.getData()}">
237 <#assign enlaceExterno = 'target="_blank"' />
238 <#elseif link.linkInterno.getData()?? && link.linkInterno.getData() != "">
239 <#assign enlace="${link.linkInterno.getFriendlyUrl()}">
240 <#else>
241 <#assign enlace="#">
242 </#if>
243 <li class="link-container col-xl-6 col-md-12 col-12">
244 <a href="${enlace}" ${enlaceExterno} class="interesting-link divider">
245 <div class="diagonal-button"><span class="link-icon"></span></div>
246 <#if (link.textoLink.getData())?? && link.textoLink.getData() != "">
247 ${link.textoLink.getData()}
248 <#else>
249 ${enlace}
250 </#if>
251 </a>
252 </li>
253 </#list>
254 </ul>
255 </li>
256 </#list>
257 </ul>
258 </div>
259 </#if>
260
261 <#-- SECCIÓN GALERÃAS MIGUEL OK -->
262 <#if (grupoGalerias.tituloGaleria.getData()?? && grupoGalerias.tituloGaleria.getData() != "") ||
263 (grupoGalerias.grupoImagen.getSiblings()?? && grupoGalerias.grupoImagen.textoImagen.getData()?? && grupoGalerias.grupoImagen.textoImagen.getData()!="")>
264 <div class="gallery col-12 col-md">
265 <ul class="row">
266 <#list grupoGalerias.getSiblings() as item>
267 <li class="col-12">
268 <#if (item.tituloGaleria.getData())?? && item.tituloGaleria.getData() != "">
269 <h2 class="section-title">
270 ${item.tituloGaleria.getData()}
271 </h2>
272 </#if>
273 <ul class="row" tabindex="0">
274 <#list item.grupoImagen.getSiblings() as imagen>
275 <li class="col-4">
276 <#if (imagen.ImagenGaleria.getData())?? && imagen.ImagenGaleria.getData() != "">
277 <a
278 href="${imagen.ImagenGaleria.getData()}"
279 class="fancylight popup-btn"
280 data-fancybox-group="light"
281 data-title="${imagen.textoImagen.getData()}"
282 >
283
284 <img
285 alt="${imagen.ImagenGaleria.getAttribute('alt')}"
286 data-fileentryid="${imagen.ImagenGaleria.getAttribute('fileEntryId')}"
287 src="${imagen.ImagenGaleria.getData()}"
288 />
289 </a>
290 <#if (imagen.textoImagen.getData())?? && imagen.textoImagen.getData() != "">
291 <div class="">
292 <!-- div class="texto-imagen" -->
293 <div class="texto-imagen">
294 ${imagen.textoImagen.getData()}
295 </div>
296 </div>
297 </#if>
298 </#if>
299 </li>
300 </#list>
301 </ul>
302 </li>
303 </#list>
304 <li>
305 <figure id="fullimagecontainer">
306 <figcaption></figcaption>
307 </figure>
308 </li>
309 </ul>
310 </div>
311 </#if>
312
313 </div>
314
315 <#-- SECCIÓN DESCARGA DOCUMENTOS OK -->
316 <#if (grupoDocumentos.tituloDocumentos.getData()?? && grupoDocumentos.tituloDocumentos.getData() != "") ||
317 (grupoDocumentos.grupoDocumento.getSiblings()?? && grupoDocumentos.grupoDocumento.textoDocumento.getData()?? && grupoDocumentos.grupoDocumento.textoDocumento.getData()!="")
318 >
319 <ul class="document-group-section">
320 <#list grupoDocumentos.getSiblings() as item>
321 <li class="document-group-container">
322 <#if (item.tituloDocumentos.getData())?? && item.tituloDocumentos.getData() != "">
323 <h2 class="section-title">
324 ${item.tituloDocumentos.getData()}
325 </h2>
326 </#if>
327 <ul class="document-group">
328 <#list item.grupoDocumento.getSiblings() as documento>
329 <#assign enlace=''>
330 <#assign tipoDocumento='PDF'>
331 <#assign sizeDocumento= ''>
332 <#assign longExtensionDocumento = ''>
333 <#assign atributoEnlace = 'download'/>
334 <#if documento.linkExternoDocumento.getData()?? && documento.linkExternoDocumento.getData() != "">
335 <#assign enlace="${documento.linkExternoDocumento.getData()}">
336 <#--En caso de enlace externo, detecta y pinta la extensión del documento: "PDF", "DOCX", etc -->
337 <#--sólo si la extensión es menor a 5 caracteres -->
338 <#assign nuevoTipoDocumento = enlace?keep_after_last(".")>
339 <#if nuevoTipoDocumento?contains("?")>
340 <#assign nuevoTipoDocumento = nuevoTipoDocumento?keep_before("?")>
341 </#if>
342 <#if nuevoTipoDocumento?length < 5>
343 <#assign tipoDocumento = nuevoTipoDocumento>
344 </#if>
345 <#assign atributoEnlace = 'target="_blank"' />
346 <#elseif documento.documentoDL.getData()?? && documento.documentoDL.getData() != "">
347 <#assign enlace="${documento.documentoDL.getData()}">
348 <#--En caso de enlace interno, detecta y pinta la extensión del documento: "PDF", "DOCX", etc -->
349 <#--sólo si la extensión es menor a 5 caracteres -->
350 <#assign counter = 0 >
351 <#list enlace?split("/") as x>
352 <#if counter == 2>
353 <#assign tipoDocumento = x?number >
354 </#if>
355 <#if counter == 4>
356 <#if x?keep_after_last(".")?length < 5>
357 <#assign tipoDocumento = x?keep_after_last(".")>
358 </#if>
359 </#if>
360 <#if counter == 5>
361 <#assign uuId = x?keep_before("?")>
362 </#if>
363 <#assign counter = counter+1 >
364 </#list>
365 <#assign dlFileEntry = serviceLocator.findService("com.liferay.document.library.kernel.service.DLFileEntryLocalService")>
366 <#if (uuId??) && (groupId??)>
367 <#assign file = dlFileEntry.getFileEntryByUuidAndGroupId(uuId,groupId)>
368 <#assign nuevoTipoDocumento = file.getMimeType()?keep_after_last("/")>
369 <#if ((nuevoTipoDocumento)?? && (nuevoTipoDocumento?length < 5))>
370 <#assign tipoDocumento = nuevoTipoDocumento>
371 </#if>
372 <#assign newSizeDocumento = file.getSize()/1000000 > <#--tamaño en MB-->
373 <#if ((newSizeDocumento)?? && (newSizeDocumento > 0) && (newSizeDocumento < 5))>
374 <#assign sizeDocumento = newSizeDocumento?string(",##0.00;roundingMode=HALF_UP")>
375 </#if>
376 </#if>
377 <#else>
378 <#assign enlace="#">
379 </#if>
380 <#if (tipoDocumento?length > 3)>
381 <#assign longExtensionDocumento = ' long-ext'>
382 </#if>
383 <li class="download-document row">
384 <div class="title-container col-sm-9 col-xl-10">
385 <span class="link-icon"></span>
386 <h3 class="document-title">
387 <#if (documento.textoDocumento.getData())?? && documento.textoDocumento.getData() != "">
388 ${documento.textoDocumento.getData()}
389 <#else>
390 ${languageUtil.format(locale, "download-x", "Documento", false)}
391 </#if>
392
393 <#if (!((documento.subtituloDocumento.getData())?? && documento.subtituloDocumento.getData() != "") && sizeDocumento != '')>
394 <span class="document-size">
395 ( ${sizeDocumento} MB )
396 </span>
397 </#if>
398 </h3>
399 <#if (documento.subtituloDocumento.getData())?? && documento.subtituloDocumento.getData() != "">
400 <h4 class="document-subtitle">
401 ${documento.subtituloDocumento.getData()}
402 <#if sizeDocumento != "">
403 <span class="document-size">
404 ( ${sizeDocumento} MB )
405 </span>
406 </#if>
407 </h4>
408 </#if>
409 </div>
410 <a href="${enlace}" class="descarga-documento col-sm-3 col-xl-2" ${atributoEnlace}>
411 <span class="download-icon ${longExtensionDocumento}">
412 ${tipoDocumento}
413 </span>
414 <#--PENDIENTE mostrar "Descargar" en función del idioma-->
415 <span class="download-text">
416 Descargar
417 </span>
418 </a>
419 </li>
420 </#list>
421 </ul>
422 </li>
423 </#list>
424 </ul>
425 </#if>
426
427 <#-- Botón de volver -->
428 <#-- Pendiente de cambiar "Atrás" dependiendo de idioma-->
429 <div class="back-button-container">
430 <button class="more-info" onclick="history.back()">
431 Atrás
432 </button>
433 </div>
434</div>
435
436<script type="text/javascript">
437 const handlePrint = () => {
438 var actContents = document.body.innerHTML;
439 document.body.innerHTML = actContents;
440 window.print();
441 }
442</script>
443
444<#if grupoGalerias.getSiblings()??>
445 <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.1.0/magnific-popup.css" />
446 <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.isotope/3.0.6/isotope.pkgd.js"></script>
447 <script src="https://cdnjs.cloudflare.com/ajax/libs/magnific-popup.js/1.1.0/jquery.magnific-popup.js"></script>
448
449 <script>
450 $(document).ready(function () {
451 var popup_btn = $('.popup-btn');
452 popup_btn.magnificPopup({
453 type: 'image',
454 image: {
455 titleSrc: 'data-title'
456 },
457 gallery: {
458 enabled: true
459 }
460 });
461 });
462 </script>
463</#if>