Publicador de continguts

Ángel Luis Sánchez Iglesias, de la ITSS: "Les noves tecnologies han permès avenços importants en la formació en línia que permeten la seva adequació a les exigències establertes legalment"
S'ha produït un error mentre es processava la plantilla.
The following has evaluated to null or missing:
==> imagenDownload  [in template "20116#20152#89922" at line 562, column 59]

----
Tip: If the failing expression is known to be 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: ${imagenDownload}  [in template "20116#20152#89922" at line 562, column 57]
----
1<#-- Web content templates are used to lay out the fields defined in a web content structure. Please use the left panel 
2    to quickly add commonly used variables. Autocomplete is also available and can be invoked by typing "${" . --> 
3<#assign JournalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")> 
4<#assign AssetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") /> 
5<#assign groupid = themeDisplay.getLayout().getGroupId()>   
6<#assign currentURL = themeDisplay.getPortalURL() + themeDisplay.getURLCurrent() /> 
7<#assign portalURL = themeDisplay.getPortalURL() /> 
8<#assign images_folder = themeDisplay.getPathThemeImages()> 
9<#assign fecha_actual = .vars['reserved-article-display-date'].data> 
10<#assign tipo_noticia = tiposelect.getData()> 
11<#assign currentTitulo = titulo.getData() /> 
12<#assign titulomodificado=currentTitulo?replace('"',' ')> 
13<#assign imagenDisplay = imagen.getData() /> 
14<#assign xcon = 0/> 
15<#assign imagenDescarga0 = ''/> 
16<#assign imagenDescarga1 = ''/> 
17<#assign imagenDescarga2 = ''/> 
18<#assign imagenDescarga3 = ''/> 
19<#assign imagenDescarga4 = ''/> 
20<#assign imagenDescarga5 = ''/> 
21<#assign imagenDescarga6 = ''/> 
22<#assign imagenDescarga7 = ''/> 
23<#assign imagenDescarga8 = ''/> 
24<#assign tituloDownload = titulo.getData()?replace("'","")/> 
25<#assign avatarDownload = portalURL + avatarEntrevistado.getData() /> 
26<#assign currentArticle = JournalArticleLocalService.getArticle(groupId,.vars['reserved-article-id'].data) /> 
27<#assign currentArticleResourcePrimKey = currentArticle.getResourcePrimKey() /> 
28<#assign currentArticleAssetEntry = AssetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle", currentArticleResourcePrimKey) /> 
29 
30<#assign ddmStructureLocalService = serviceLocator.findService("com.liferay.dynamic.data.mapping.service.DDMStructureLocalService")> 
31<#assign PropertyFactoryUtil = staticUtil["com.liferay.portal.kernel.dao.orm.PropertyFactoryUtil"]> 
32<#assign OrderByComparatorUtil=staticUtil["com.liferay.portal.kernel.util.OrderByComparatorFactoryUtil"]> 
33<#assign comparador = OrderByComparatorUtil.create("JournalArticle","createDate","desc")> 
34<#assign JournalArticleService = serviceLocator.findService("com.liferay.journal.service.JournalArticleService")> 
35 
36 
37<div id="mc-detalle-articulo-full" class="mc-detalle-contenido"> 
38    <div class="container"> 
39        <a href="#" id="mc-detalle-contenido-back-link" onClick="javascript: window.close()" style="color:#f9b000;"> 
40        <span ><@liferay.language key="mcmutual.cerrar"/></span></a> 
41         
42            <div id="heading-hidden" style="display:none"> 
43                <div class="site-title"> 
44                    <h1>  
45                        <a class="logo custom-logo" href="${portalURL}/web/prevencion" title="Ir a MC - PRL"> <img alt="MC - PRL" src="${images_folder}/mcmutual/logo_mc.jpg" width="150" height="100" id="mc-site-logo"> </a> 
46                    </h1> 
47                </div>  
48            </div> 
49         
50        <div class="row"> 
51            <div id="cont-izq" class="col-md-8"> 
52                <div class="mc-detalle-select"> 
53                    ${tiposelect.getData()} 
54                </div> 
55                <div class="mc-detalle-titulo"> 
56                    ${titulo.getData()} 
57                </div> 
58                <div class="mc-detalle--autor-fecha"> 
59                        <#if (currentArticleAssetEntry.getPublishDate())??> 
60                            <#assign fecha=currentArticleAssetEntry.getPublishDate()?date?string["dd/MM/yyyy"]?capitalize> 
61                        <#else> 
62                            <#assign fecha="Se llenara al publicar"> 
63                        </#if> 
64                        <span id="fecha" class="mc-detalle-fecha">${fecha}</span> 
65                </div> 
66                <div class="mc-detalle-subtitulo"> 
67                    ${subtitulo.getData()} 
68                </div> 
69                <div class="mc-detalle-iconos"> 
70                    <ul class="list-group list-group-horizontal"> 
71                        <li class="list-group-item mc-detalles-icono-individual hide-sm hide-xs hide-md"><img title="Imprimir" alt="Icono imprimir" src="${images_folder}/mcmutual/icons/share/mc-imprimir.png" onclick="printDiv()" /></li> 
72                        <li class="list-group-item mc-detalles-icono-individual hide-sm hide-xs hide-md"><a id="downloadLink" href="#" /><img src="${images_folder}/mcmutual/icons/share/mc-descarga.png" alt="Icono descarga" title='<@liferay.language key="mcmutual.personalizar.recurso.descargar"/>'/></a></li> 
73                        <li class="list-group-item mc-detalles-icono-individual"><a onclick="compartir()" title="Compartir"><img alt="Icono compartir" src="${images_folder}/mcmutual/icons/share/mc-compartir.png" /></a> 
74                         
75                        <div id="compartir" class="ifj-social-icons" style="display: none;"><div class="btn-group" > <div id="first-load"  class="ib-spa-loading-bar"></div><div id="mostrar" style="display:none;"><div class="row"><div class="col-md-12"><span style="cursor:pointer;display:inline-block;float:right" onclick="$('#compartir').css('display','none')">X</span><h3>Compartir en...</h3></div></div><a id="linkedin" class="btn" href="https://linkedin.com/shareArticle?url=${currentURL}&;title=${titulo.getData()}" target="_blank" title="(Abre una nueva ventana)" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;"><span class="sr-only">ifj.theme.footer.linkedin</span><div class="con-lk-cuadrado"><div class="cont-lk-redondo"><img src="${images_folder}/mcmutual/icons/redessociales/linkd.svg" alt="linkedin"> </div> <span class="social-name">LINKEDIN</span></div></a><a id="twitter" class="btn" href="https://twitter.com/intent/tweet?url=${currentURL}&;text=${titulo.getData()}" target="_blank" title="(Abre una nueva ventana)" data-size="large"> <span class="sr-only">ifj.theme.footer.twitter</span> <div class="con-tw-cuadrado"> <div class="cont-tw-redondo"> <img src="${images_folder}/mcmutual/icons/redessociales/twt.svg" alt="twitter"> </div> <span class="social-name">TWITTER</span> </div> </a><a id="facebook" class="btn" href="http://www.facebook.com/sharer.php?u=${currentURL}&;t=${titulo.getData()}" target="_blank" title="(Abre una nueva ventana)"> <span class="sr-only"> ifj.theme.footer.facebook </span> <div class="con-fb-cuadrado"> <div class="cont-fb-redondo"> <img src="${images_folder}/mcmutual/icons/redessociales/fb.svg" alt="facebook"> </div> <span class="social-name">FACEBOOK</span> </div> </a><a id="whatsapp"class="btn" href="https://api.whatsapp.com/send?text=${currentURL}" data-action="share/whatsapp/share" target="_blank" title="(Abre una nueva ventana)" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;"> <span class="sr-only">ifj.theme.footer.whatsapp</span> <div class="con-wa-cuadrado"> <div class="cont-wa-redondo"> <img src="${images_folder}/mcmutual/icons/redessociales/wa.png" alt="whatsapp"> </div> <span class="social-name">WHATSAPP</span> </div> </a><a id="telegram"class="btn" href="https://telegram.me/share/url?url=${currentURL}" target="_blank" title="(Abre una nueva ventana)" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;"> <span class="sr-only">ifj.theme.footer.telegram</span> <div class="con-tl-cuadrado"> <div class="cont-tl-redondo"> <img src="${images_folder}/mcmutual/icons/redessociales/tl.png" alt="telegram"> </div> <span class="social-name">TELEGRAM</span> </div> </a><a id="email" class="btn" href="mailto:?subject=${titulo.getData()}&body=${currentURL}" target="_blank" title="(Abre una nueva ventana)" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;"> <span class="sr-only">ifj.theme.footer.mail</span> <div class="con-ma-cuadrado"> <div class="cont-ma-redondo"> <img src="${images_folder}/mcmutual/icons/redessociales/ma.png" alt="mail"> </div> <span class="social-name">EMAIL</span> </div> </a><br></div></div></div> 
76                                                 
77                        </li> 
78 
79                    </ul> 
80                </div> 
81                <div class ='mc-persona-entrevistada mc-persona-entrevistada-mobile'><div class='row'><div class='col-xs-3 mc-persona-entrevistada-avatar-arreglo'><img src='${avatarEntrevistado.getData()}' id="avatarImagenMobile" class='mc-persona-entrevistada-avatar' alt="Icono avatar persona entrevistada"/></div><div class='col-xs-9'><span class='mc-persona-entrevistada-nombre'>${nombreEntrevistado.getData()}</span><br><span class='mc-persona-entrevistada-desc'>${cargoEntrevistado.getData()}</span></div></div><hr><div class='row'><div class='col-md-12'><div class='mc-persona-entrevistada-titulo'><span>${tituloEntrevistado.getData()}</span></div><div class='mc-persona-entrevistada-cuerpo'><span>${cuerpoEntrevistado.getData()}</span></div></div></div></div> 
82                 
83                <div class="mc-detalle-cuerpo"> 
84                    ${cuerpo.getData()} 
85                </div> 
86            </div> 
87            <div id="cont-dcha" class="col-md-4"> 
88                <div class="mc-persona-entrevistada mc-persona-entrevistada-desktop"><div class='row'><div id="mc-avatar-entr" class='col-xs-3 mc-persona-entrevistada-avatar-arreglo'><img src='${avatarEntrevistado.getData()}' id="avatarImagenDesktop" class='mc-persona-entrevistada-avatar' alt="Icono avatar persona entrevistada"/></div><div class='col-xs-9'><span class='mc-persona-entrevistada-nombre'>${nombreEntrevistado.getData()}</span><br><span class='mc-persona-entrevistada-desc'>${cargoEntrevistado.getData()}</span></div></div><hr><div class='row'><div class='col-md-12'><div class='mc-persona-entrevistada-titulo'><span>${tituloEntrevistado.getData()}</span></div><div class='mc-persona-entrevistada-cuerpo'><span>${cuerpoEntrevistado.getData()}</span></div></div></div></div> 
89            </div> 
90        </div> 
91    </div> 
92  <#assign JournalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")> 
93    <#assign AssetLinkLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetLinkLocalService") /> 
94    <#assign AssetCategoryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetCategoryLocalService") /> 
95    <#assign AssetVocabularyLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyLocalService") /> 
96    <#assign AssetEntryLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetEntryLocalService") />    
97    <#assign currentArticle = JournalArticleLocalService.getArticle(groupId,.vars['reserved-article-id'].data) /> 
98    <#assign currentArticleResourcePrimKey = currentArticle.getResourcePrimKey() /> 
99    <#assign currentArticleAssetEntry = AssetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle", currentArticleResourcePrimKey) /> 
100    <#assign currentArticleAssetEntryId = currentArticleAssetEntry.getEntryId() /> 
101    <#assign currentArticleRelatedLinks = AssetLinkLocalService.getDirectLinks(currentArticleAssetEntryId) /> 
102     
103    <!-- MÓDULO DE LIKE/DISLIKE --> 
104        <@liferay_portlet["runtime"] portletName="mc_portlet_portalprevencion_valoracion_view_McPortletPortalprevencionValoracionViewPortlet_INSTANCE_lD4IvoyaeoWF" queryString="assetId=${currentArticleAssetEntryId}"/> 
105    <!-- --> 
106     
107    <#assign originalLocale = .locale> 
108    <#setting locale = localeUtil.getDefault()> 
109     
110    <#assign categoryList= currentArticleAssetEntry.getCategories() /> 
111     
112 
113    <#assign assetLists = [] /> 
114    <#assign noticiaCategorias=[]> 
115    <#list categoryList as category> 
116        <#assign vocabulary = AssetVocabularyLocalService.getVocabulary(category.getVocabularyId()) /> 
117        <#if vocabulary.getName() == 'Sector' || vocabulary.getName() == 'Tematica'> 
118             <#assign noticiaCategorias+=[category.getCategoryId()]> 
119        </#if> 
120    </#list> 
121         
122    <#assign contadorAsset = 0> 
123    <#assign assetListUnfiltered = [] > 
124     
125<#assign dynamicQuery = ddmStructureLocalService.dynamicQuery()> 
126 
127    <#assign dynamicQuery = dynamicQuery.add(PropertyFactoryUtil.forName("name").like("%Actualidad PRL - Noticias<%"))> 
128    <#assign array = ddmStructureLocalService.dynamicQuery(dynamicQuery)> 
129    <#if (array?has_content)> 
130        <#assign noticiasKey = array[0].getStructureKey()> 
131        <#assign noticias=JournalArticleService.getArticlesByStructureId(groupId?number,noticiasKey?string,-1,20,comparador)> 
132    <#else> 
133    </#if> 
134 
135    <#list noticias as entry> 
136        <#assign trobat="false"> 
137        <#assign noticiasentry = AssetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle", entry.getResourcePrimKey()) /> 
138        <#assign notCategorias=noticiasentry.getCategories()> 
139        <#if (JournalArticleLocalService.getLatestVersion(groupid,entry.getArticleId()))??> 
140            <#assign version = JournalArticleLocalService.getLatestVersion(groupid,entry.getArticleId())> 
141            <#assign latestArticle = JournalArticleLocalService.getArticle(groupid,entry.getArticleId(),version)> 
142            <#if latestArticle.isApproved()> 
143                <#list notCategorias as category> 
144                    <#assign vocabulary = AssetVocabularyLocalService.getVocabulary(category.getVocabularyId()) /> 
145                    <#if vocabulary.getName() == 'Sector' || vocabulary.getName() == 'Tematica'> 
146                        <#list noticiaCategorias as noticiaCategoria> 
147                            <#if noticiaCategoria==category.getCategoryId()> 
148                                <#assign trobat="true"> 
149                            </#if> 
150                        </#list> 
151                    </#if> 
152                </#list> 
153                <#if trobat=="true"> 
154                    <#assign assetListUnfiltered+=[noticiasentry]> 
155                </#if> 
156            </#if> 
157        </#if> 
158    </#list> 
159 
160    <#assign dynamicQueryEntrevista = ddmStructureLocalService.dynamicQuery()> 
161    <#assign dynamicQueryEntrevista = dynamicQueryEntrevista.add(PropertyFactoryUtil.forName("name").like("%Actualidad PRL - Entrevista<%"))> 
162    <#assign array = ddmStructureLocalService.dynamicQuery(dynamicQueryEntrevista)> 
163    <#if (array?has_content)> 
164        <#assign entrevistaKey = array[0].getStructureKey()> 
165        <#assign entrevistas=JournalArticleService.getArticlesByStructureId(groupId?number,entrevistaKey?string,-1,20,comparador)> 
166    </#if> 
167 
168    <#list entrevistas as entry> 
169        <#assign trobat="false"> 
170        <#assign entrevistaentry = AssetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle", entry.getResourcePrimKey()) /> 
171        <#assign entCategorias=entrevistaentry.getCategories()> 
172        <#if (JournalArticleLocalService.getLatestVersion(groupid,entry.getArticleId()))??> 
173            <#assign version = JournalArticleLocalService.getLatestVersion(groupid,entry.getArticleId())> 
174            <#assign latestArticle = JournalArticleLocalService.getArticle(groupid,entry.getArticleId(),version)> 
175            <#if latestArticle.isApproved()> 
176                <#list entCategorias as category> 
177                    <#assign vocabulary = AssetVocabularyLocalService.getVocabulary(category.getVocabularyId()) /> 
178                    <#if vocabulary.getName() == 'Sector' || vocabulary.getName() == 'Tematica'> 
179                        <#list noticiaCategorias as noticiaCategoria> 
180                            <#if noticiaCategoria==category.getCategoryId()> 
181                                <#assign trobat="true"> 
182                            </#if> 
183                        </#list> 
184                    </#if> 
185                </#list> 
186                <#if trobat=="true" && entrevistaentry.getPrimaryKey()!=currentArticleAssetEntry.getPrimaryKey()> 
187                    <#assign assetListUnfiltered+=[entrevistaentry]> 
188                </#if> 
189            </#if> 
190        </#if> 
191    </#list> 
192 
193    <#assign dynamicQueryArticulo = ddmStructureLocalService.dynamicQuery()> 
194    <#assign dynamicQueryArticulo = dynamicQueryArticulo.add(PropertyFactoryUtil.forName("name").like("%Actualidad PRL - Artículos<%"))> 
195    <#assign array = ddmStructureLocalService.dynamicQuery(dynamicQueryArticulo)> 
196    <#if (array?has_content)> 
197        <#assign articuloKey = array[0].getStructureKey()> 
198        <#assign articulos=JournalArticleService.getArticlesByStructureId(groupId?number,articuloKey?string,-1,20,comparador)> 
199    </#if> 
200 
201    <#list articulos as entry> 
202        <#assign trobat="false"> 
203        <#assign articuloentry = AssetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle", entry.getResourcePrimKey()) /> 
204        <#assign artCategorias=articuloentry.getCategories()> 
205        <#if (JournalArticleLocalService.getLatestVersion(groupid,entry.getArticleId()))??> 
206            <#assign version = JournalArticleLocalService.getLatestVersion(groupid,entry.getArticleId())> 
207            <#assign latestArticle = JournalArticleLocalService.getArticle(groupid,entry.getArticleId(),version)> 
208            <#if latestArticle.isApproved()> 
209                <#list artCategorias as category> 
210                    <#assign vocabulary = AssetVocabularyLocalService.getVocabulary(category.getVocabularyId()) /> 
211                    <#if vocabulary.getName() == 'Sector' || vocabulary.getName() == 'Tematica'> 
212                        <#list noticiaCategorias as noticiaCategoria> 
213                            <#if noticiaCategoria==category.getCategoryId()> 
214                                <#assign trobat="true"> 
215                            </#if> 
216                        </#list> 
217                    </#if> 
218                </#list> 
219                <#if trobat=="true"> 
220                    <#assign assetListUnfiltered+=[articuloentry]> 
221                </#if> 
222            </#if> 
223        </#if> 
224    </#list> 
225 
226 
227    <#assign dynamicQueryCasos = ddmStructureLocalService.dynamicQuery()> 
228    <#assign dynamicQueryCasos = dynamicQueryCasos.add(PropertyFactoryUtil.forName("name").like("%Actualidad PRL - Casos de éxito<%"))> 
229    <#assign array = ddmStructureLocalService.dynamicQuery(dynamicQueryCasos)> 
230    <#if (array?has_content)> 
231        <#assign casosKey = array[0].getStructureKey()> 
232        <#assign casos=JournalArticleService.getArticlesByStructureId(groupId?number,casosKey?string,-1,20,comparador)> 
233    </#if> 
234 
235    <#list casos as entry> 
236        <#assign trobat="false"> 
237        <#assign casoentry = AssetEntryLocalService.getEntry("com.liferay.journal.model.JournalArticle", entry.getResourcePrimKey()) /> 
238        <#assign casoCategorias=articuloentry.getCategories()> 
239        <#if (JournalArticleLocalService.getLatestVersion(groupid,entry.getArticleId()))??> 
240            <#assign version = JournalArticleLocalService.getLatestVersion(groupid,entry.getArticleId())> 
241            <#assign latestArticle = JournalArticleLocalService.getArticle(groupid,entry.getArticleId(),version)> 
242            <#if latestArticle.isApproved()> 
243                <#list casoCategorias as category> 
244                    <#assign vocabulary = AssetVocabularyLocalService.getVocabulary(category.getVocabularyId()) /> 
245                    <#if vocabulary.getName() == 'Sector' || vocabulary.getName() == 'Tematica'> 
246                        <#list noticiaCategorias as noticiaCategoria> 
247                            <#if noticiaCategoria==category.getCategoryId()> 
248                                <#assign trobat="true"> 
249                            </#if> 
250                        </#list> 
251                    </#if> 
252                </#list> 
253                <#if trobat=="true"> 
254                    <#assign assetListUnfiltered+=[casoentry]> 
255                </#if> 
256            </#if> 
257        </#if> 
258    </#list> 
259     
260    <div class="mc-contenido-relacionado"> 
261        <div class="container"> 
262            <h2 class="mc-carousel-title"><@liferay.language key="mcmutual.actualidadrelacionada"/></h2> 
263            <div class="row"> 
264                <div id="carousel-premios-generic" class="carousel slide"> 
265                    <div class="mc-carousel-detalle"> 
266                        <div class="container"> 
267                            <div class="carousel-inner" role="listbox" title="Carousel Actualidad Relacionada"> 
268                                   <#assign cont = 0 /> 
269                            <#if assetListUnfiltered?has_content> 
270                                <#list assetListUnfiltered as al >                                   
271                                    <#assign relatedArticle = JournalArticleLocalService.fetchLatestArticle(al.getClassPK()) /> 
272                                    <#assign docXml = saxReaderUtil.read(relatedArticle.getContentByLocale(themeDisplay.getLocale()))/> 
273                                    <#assign rootElement = docXml.getRootElement() > 
274                                         
275                                    <#attempt>                                     
276                                    <#assign titulo = saxReaderUtil.createXPath("dynamic-element[@name='titulo']/dynamic-content").selectSingleNode(rootElement).getStringValue() /> 
277                                    <#recover> 
278                                        <#assign titulo = "" /> 
279                                    </#attempt> 
280                                     
281                                    <#attempt> 
282                                        <#assign imagen = saxReaderUtil.createXPath("dynamic-element[@name='imagen']/dynamic-content").selectSingleNode(rootElement).getStringValue() /> 
283                                    <#recover> 
284                                        <#assign imagen = "" /> 
285                                    </#attempt> 
286                                     
287                                    <#attempt> 
288                                        <#assign autor = saxReaderUtil.createXPath("dynamic-element[@name='autorContenido']/dynamic-content").selectSingleNode(rootElement).getStringValue() /> 
289                                    <#recover> 
290                                        <#assign autor = "mc-prl" /> 
291                                    </#attempt> 
292                                     
293                                    <#attempt> 
294                                        <#assign tipoRelacionado = saxReaderUtil.createXPath("dynamic-element[@name='tiposelect']/dynamic-content").selectSingleNode(rootElement).getStringValue() /> 
295                                    <#recover> 
296                                        <#assign tipoRelacionado = "no entra" /> 
297                                    </#attempt> 
298 
299                                    <#assign fecha = .vars['reserved-article-display-date'].data > 
300                                    <#assign fecha = fecha?datetime("EEE, d MMM yyyy HH:mm:ss Z")> 
301                                    <#assign locale = originalLocale> 
302                                    <#assign viewURL = relatedArticle.getUrlTitle() /> 
303                                     
304                                    <#assign defUrl = themeDisplay.getURLPortal() + themeDisplay.getPathFriendlyURLPublic()+"/prevencion/actualidad-detalle/-/asset_publisher/ksRMfI4DgwKI/content/">   
305                                    <#if cont == 0> 
306                                        <div class="item active"> 
307                                        <div class="row"> 
308                                    <#elseif cont == 3 || cont == 6> 
309                                        <div class="item"> 
310                                        <div class="row"> 
311                                    </#if> 
312                                    <div class="col-md-4"> 
313                                        <div class="mc-container-contenido"> 
314                                            <img id="img_rel${xcon}" src=${imagen} alt="Actualidad relacionada"> 
315                                            <p class="mc-sparate-line-content mc-texto-normal"> 
316                                             
317                                            </p> 
318                                            <h3 class="mc-sparate-line-content mc-titulo"> 
319                                                <a class="titulo-relacionado" href="${defUrl}${viewURL}" target="_blank">${titulo}</a> 
320                                            </h3> 
321                                            <p class="mc-sparate-line-content mc-fecha-autor mc-fecha-autor-relacionado">${relatedArticle.getModifiedDate()?date?string["dd/MM/yyyy"]?capitalize} | Por ${autor}</p>    
322                                        </div> 
323                                    </div> 
324                                    <#if xcon == 0 && imagen != ""> 
325                                        <#assign imagenDescarga0 = portalURL + imagen> 
326                                    <#elseif xcon == 1 && imagen != ""> 
327                                        <#assign imagenDescarga1 = portalURL + imagen> 
328                                    <#elseif xcon == 2 && imagen != ""> 
329                                        <#assign imagenDescarga2 = portalURL + imagen> 
330                                    <#elseif xcon == 3 && imagen != ""> 
331                                        <#assign imagenDescarga3 = portalURL + imagen> 
332                                    <#elseif xcon == 4 && imagen != ""> 
333                                        <#assign imagenDescarga4 = portalURL + imagen> 
334                                    <#elseif xcon == 5 && imagen != ""> 
335                                        <#assign imagenDescarga5 = portalURL + imagen> 
336                                    <#elseif xcon == 6 && imagen != ""> 
337                                        <#assign imagenDescarga6 = portalURL + imagen> 
338                                    <#elseif xcon == 7 && imagen != ""> 
339                                        <#assign imagenDescarga7 = portalURL + imagen> 
340                                    <#elseif xcon == 8 && imagen != ""> 
341                                        <#assign imagenDescarga8 = portalURL + imagen> 
342                                    </#if> 
343                                     
344                                    <#assign xcon++> 
345                                    <#assign cont++> 
346                                    <#if cont == 3 || cont == 6 || cont == 9> 
347                                        </div> 
348                                        </div> 
349                                    </#if> 
350                                    <#if cont == 9> 
351                                        <#break> 
352                                    </#if>                             
353                                </#list> 
354     <#else> 
355        <div class="text-center"> 
356            <h3><@liferay.language key="mcmutual.noactualidadrelacionada"/></h3> 
357        </div> 
358    </#if> 
359    </div> 
360    </div> 
361    </div> 
362                    <#if cont gt 3> 
363                        <a class="left carousel-control center-carousel-img" href="#carousel-premios-generic" role="button" data-slide="prev" title="Atras actualidad relacionada"> 
364                            <img src="${images_folder}/mcmutual/icons/mc-carousel-left-arrow.png" alt="Icono anterior"/> 
365                             
366                        </a> 
367                        <a class="right carousel-control center-carousel-img" href="#carousel-premios-generic" role="button" data-slide="next" title="Siguiente actualidad relacionada"> 
368                            <img src="${images_folder}/mcmutual/icons/mc-carousel-right-arrow.png" alt="Icono siguiente"/> 
369                             
370                        </a> 
371                    </#if> 
372            </div> 
373        </div> 
374    </div> 
375</div> 
376 
377<div id="paginaImpresion" style="display:none"> 
378<div id="heading-hidden-impr" style="display:flex"><div class="site-title"><h1> <a class="logo custom-logo" href="${portalURL}/web/prevencion" title="Ir a MC - PRL"> <img alt="MC - PRL" src="${images_folder}/mcmutual/logo_mc.jpg" width="150" height="100" id="mc-site-logo"></a></h1></div></div><div style="font-family: ITCAvantGardeStd-Md;font-size: 18px;font-weight: normal;font-stretch: normal;font-style: normal;line-height: 1.56;letter-spacing: normal;color: #255b70;padding: 23px 0 9px;">${tiposelect.getData()}</div><div style="font-family: ITCAvantGardeStd-Md;font-size: 28px;font-weight: 600;font-stretch: normal;font-style: normal;line-height: 1.29;letter-spacing: normal;color: #255b70;">${currentTitulo}</div><div style="padding-top: 10px;"><span id="fechaPrint" style="font-size: 13px;color: #888 !important;letter-spacing: .22px;"></span></div><div style="font-size: 13px;color: #888;letter-spacing: .22px;">${subtitulo.getData()}</div><#if imagenDisplay?? && imagenDisplay != ""><img style="padding: 33px 0;width: 100%;" src="${imagenDisplay}" alt="Imagen impresion"/></#if><div style="font-family: Open-Sans;font-size: 16px;font-weight: normal;font-stretch: normal;font-style: normal;line-height: 1.56;letter-spacing: normal;color: #383838;">${cuerpo.getData()}</div> 
379</div> 
380 
381 
382 
383<script> 
384    var titulos = document.getElementsByClassName("titulo-relacionado"); 
385    var limit = 90; 
386  
387    for(var i=0; i < titulos.length; i++){ 
388        if(titulos[i].innerHTML != null){ 
389            if(titulos[i].innerHTML.length >= limit){ 
390                var j = limit; 
391                while(titulos[i].innerHTML.charAt(j) != " "){ 
392                    j--; 
393
394  
395                titulos[i].innerHTML = titulos[i].innerHTML.substr(0, j); 
396                titulos[i].innerHTML += "..."; 
397
398
399
400 
401 
402    titulos = document.getElementsByClassName("mc-fecha-autor-relacionado"); 
403    limit = 60; 
404  
405    for(var i=0; i < titulos.length; i++){ 
406        if(titulos[i].innerHTML != null){ 
407            if(titulos[i].innerHTML.length >= limit){ 
408                var j = limit; 
409                while(titulos[i].innerHTML.charAt(j) != " "){ 
410                    j--; 
411
412  
413                titulos[i].innerHTML = titulos[i].innerHTML.substr(0, j); 
414                titulos[i].innerHTML += "..."; 
415
416
417
418</script> 
419 
420<script> 
421 
422var mostrar=0; 
423function compartir(){ 
424    getURLcorta(); 
425    0==mostrar?($("#compartir").show(),mostrar=1):($("#compartir").hide(),mostrar=0); 
426
427</script> 
428 
429<script> 
430var portal='${portalURL}'; 
431$('#paginaFull .mc-detalle-cuerpo img').each(function(){ 
432  var src=$(this).attr('src'); 
433  if (!src.includes("http")){ 
434      $(this).attr('src',portal+src); 
435
436}); 
437</script> 
438 
439<script type="text/javascript"> 
440    //FORMATEAMOS LA FECHA QUE VIENE DEBAJO DEL TIPO DE NOTICIA 
441    var fecha_actual = "${fecha_actual}";/* 
442     
443    if(fecha_actual.includes("ene")){ 
444        var fecha_format = fecha_actual.replace('ene', 'jan');  
445    }else if(fecha_actual.includes("abr")){ 
446        var fecha_format = fecha_actual.replace('abr', 'apr'); 
447    }else if(fecha_actual.includes("ago")){ 
448        var fecha_format = fecha_actual.replace('ago', 'aug'); 
449    }else if(fecha_actual.includes("dic")){ 
450        var fecha_format = fecha_actual.replace('dic', 'dec'); 
451
452     
453    if(fecha_actual.includes("lun")){ 
454        fecha_format = fecha_actual.replace('lun', 'Mon');  
455    }else if(fecha_actual.includes("mar")){ 
456        fecha_format = fecha_actual.replace('mar', 'Tue'); 
457    }else if(fecha_actual.includes("mie")){ 
458        fecha_format = fecha_actual.replace('mie', 'Wed'); 
459    }else if(fecha_actual.includes("jue")){ 
460        fecha_format = fecha_actual.replace('jue', 'Thu'); 
461    }else if(fecha_actual.includes("vie")){ 
462        fecha_format = fecha_actual.replace('vie', 'Fri'); 
463    }else if(fecha_actual.includes("sab")){ 
464        fecha_format = fecha_actual.replace('sab', 'Sat'); 
465    }else if(fecha_actual.includes("dom")){ 
466         fecha_format = fecha_actual.replace('dom', 'Sun'); 
467
468 
469    var date_to_unix = new Date(fecha_format); 
470    var timestamp = date_to_unix.getTime()/1000; 
471    var date = convertTimestamp(timestamp); 
472     
473    function convertTimestamp(timestamp) { 
474        var d = new Date(timestamp * 1000), // Convert the passed timestamp to milliseconds 
475            yyyy = d.getFullYear(), 
476            mm = ('0' + (d.getMonth() + 1)).slice(-2),  // Months are zero based. Add leading 0. 
477            dd = ('0' + d.getDate()).slice(-2),         // Add leading 0. 
478     
479        time = dd + '/' + mm + '/' + yyyy; 
480        return time; 
481
482     
483    jQuery(document).ready(function(){ 
484         
485        $("#fecha").html(date); 
486        $("#fechaPrint").html(date); 
487         
488    });*/ 
489     
490    var isMobile = { 
491        Android: function() { 
492            return navigator.userAgent.match(/Android/i); 
493        }, 
494        BlackBerry: function() { 
495            return navigator.userAgent.match(/BlackBerry/i); 
496        }, 
497        iOS: function() { 
498            return navigator.userAgent.match(/iPhone|iPad|iPod/i); 
499        }, 
500        Opera: function() { 
501            return navigator.userAgent.match(/Opera Mini/i); 
502        }, 
503        Windows: function() { 
504            return navigator.userAgent.match(/IEMobile/i); 
505        }, 
506        any: function() { 
507            return (isMobile.Android() || isMobile.BlackBerry() || isMobile.iOS() || isMobile.Opera() || isMobile.Windows()); 
508
509    }; 
510 
511    /* 
512    $('.carousel-inner').carousel ({ 
513        interval: isMobile.any() ? false : 5000 
514    }); 
515    */ 
516 
517    </script> 
518 
519 
520    <script> 
521     
522    function printDiv() { 
523      var objeto=document.getElementById('paginaImpresion');  
524    //obtenemos el objeto a imprimir 
525      var ventana=window.open('','_blank','width=652,height=447');  //abrimos una ventana vacía nueva 
526      ventana.document.write(objeto.innerHTML);  //imprimimos el HTML del objeto en la nueva ventana 
527      ventana.document.close();  //cerramos el documento 
528      ventana.print();  //imprimimos la ventana 
529      ventana.close();  //cerramos la ventana 
530
531     
532    function downloadInnerHtml(filename, elId, mimeType) { 
533        var elHtml = document.getElementById(elId); 
534        var link = document.createElement('a'); 
535     
536        //OCULTAMOS EN EL HTML LO QUE NO SIRVE 
537         
538        elHtml.querySelector("#banner").style.display = "none"; 
539        elHtml.querySelector(".mc-navigation-top").style.display = "none"; 
540 
541        if (elHtml.querySelector(".lfr-alert-container") !== null) { 
542          elHtml.querySelector(".lfr-alert-container").style.display="none"; 
543
544        if (elHtml.querySelector(".mc-detalle-contenido-back-to") !== null) { 
545            elHtml.querySelector(".mc-detalle-contenido-back-to").style.display = "none"; 
546
547         
548        if (elHtml.querySelector(".mc-detalle-contenido-back-to") !== null) { 
549            elHtml.querySelector(".mc-detalle-contenido-back-to").style.display = "none"; 
550
551 
552        if (elHtml.querySelector(".mc-detalle-select") !== null) { 
553            elHtml.querySelector(".mc-detalle-select").style.paddingTop = "0px"; 
554
555 
556 
557        if (elHtml.querySelector(".mc-detalle-iconos") !== null) { 
558            elHtml.querySelector(".mc-detalle-iconos").style.display = "none"; 
559
560 
561        if (elHtml.querySelector(".mc-main-img") !== null) { 
562            elHtml.querySelector(".mc-main-img").src = "${imagenDownload}"; 
563
564         
565 
566        if (elHtml.querySelector("#cont-izq") !== null) { 
567            elHtml.querySelector("#cont-izq").classList.add('col-md-12'); 
568            elHtml.querySelector("#cont-izq").classList.remove('col-md-8'); 
569
570        if (elHtml.querySelector("#cont-dcha") !== null) { 
571            elHtml.querySelector("#cont-dcha").classList.add('col-md-12'); 
572            elHtml.querySelector("#cont-dcha").classList.add('col-md-4'); 
573
574 
575        if (elHtml.querySelector(".mc-portlet-portalprevencion-valoracion-view") !== null) { 
576            elHtml.querySelector(".mc-portlet-portalprevencion-valoracion-view").style.display = "none"; 
577
578        if (elHtml.querySelector(".footer") !== null) { 
579            elHtml.querySelector(".footer").style.display = "none"; 
580
581         
582 
583        elHtml.style.fontFamily = "Arial"; 
584        /* SE DEFINE EN GENERAL ARRIBA 
585            elHtml.querySelector("#mc-detalle-articulo-full").style.fontFamily = "Arial"; 
586            elHtml.querySelector(".mc-detalle-titulo").style.fontFamily = "Arial"; 
587            elHtml.querySelector(".mc-detalle-redaccion").style.fontFamily = "Arial"; 
588            elHtml.querySelector(".mc-detalle-cuerpo").style.fontFamily = "Arial"; 
589            elHtml.querySelector(".mc-carousel-title").style.fontFamily = "Arial"; 
590            elHtml.querySelector(".mc-contenido-relacionado h3").style.fontFamily = "Arial"; 
591            elHtml.querySelector(".mc-footer-title").style.fontFamily = "Arial"; 
592        */ 
593 
594     
595    if (elHtml.querySelector(".lfr-alert-container") !== null) { 
596        elHtml.querySelector(".lfr-alert-container").style.display="none"; 
597    }     
598    if (elHtml.querySelector("#avatarImagenDesktop") !== null) { 
599        elHtml.querySelector("#avatarImagenDesktop").src = "${avatarDownload}"; 
600
601     if (elHtml.querySelector("#avatarImagenMobile") !== null) { 
602        elHtml.querySelector("#avatarImagenMobile").src = "${avatarDownload}"; 
603
604  
605    if (elHtml.querySelector("#mc-avatar-entr") !== null) { 
606        elHtml.querySelector("#mc-avatar-entr").classList.remove('col-xs-3'); 
607        elHtml.querySelector("#mc-avatar-entr").classList.add('col-xs-1'); 
608
609     
610     
611    elHtml.querySelector(".mc-persona-entrevistada-nombre").style.fontFamily = "Arial"; 
612    elHtml.querySelector(".mc-persona-entrevistada-nombre").style.setProperty("font-family", "Arial", "important"); 
613    elHtml.querySelector(".mc-persona-entrevistada-desc").style.fontFamily = "Arial"; 
614    elHtml.style.fontFamily = "Arial"; 
615         
616    if(elHtml.querySelector(".mc-submenu")){ 
617        elHtml.querySelector(".mc-submenu").style.display = "none"; 
618
619    if(elHtml.querySelector(".portlet-navigation")){ 
620        elHtml.querySelector(".portlet-navigation").style.display = "none"; 
621
622    if(elHtml.querySelector("#controlMenu")){ 
623        elHtml.querySelector("#ControlMenu").style.display = "none"; 
624
625    elHtml.querySelector("#wrapper").style.marginTop = "0px"; 
626    elHtml.querySelector("#heading-hidden").style.display = "flex"; 
627     
628    var myEle = document.getElementById("img_rel0"); 
629        if(myEle){ 
630        elHtml.querySelector("#img_rel0").src = "${imagenDescarga0}"; 
631
632        myEle = document.getElementById("img_rel1"); 
633        if(myEle){ 
634        elHtml.querySelector("#img_rel1").src = "${imagenDescarga1}"; 
635
636        myEle = document.getElementById("img_rel2"); 
637        if(myEle){ 
638        elHtml.querySelector("#img_rel2").src = "${imagenDescarga2}"; 
639
640         myEle = document.getElementById("img_rel3"); 
641        if(myEle){ 
642        elHtml.querySelector("#img_rel3").src = "${imagenDescarga3}"; 
643
644        myEle = document.getElementById("img_rel4"); 
645        if(myEle){ 
646        elHtml.querySelector("#img_rel4").src = "${imagenDescarga4}"; 
647
648        myEle = document.getElementById("img_rel5"); 
649        if(myEle){ 
650        elHtml.querySelector("#img_rel5").src = "${imagenDescarga5}"; 
651
652        myEle = document.getElementById("img_rel6"); 
653        if(myEle){ 
654        elHtml.querySelector("#img_rel6").src = "${imagenDescarga6}"; 
655
656        myEle = document.getElementById("img_rel7"); 
657        if(myEle){ 
658        elHtml.querySelector("#img_rel7").src = "${imagenDescarga7}"; 
659
660        myEle = document.getElementById("img_rel8"); 
661        if(myEle){ 
662        elHtml.querySelector("#img_rel8").src = "${imagenDescarga8}"; 
663
664    if (navigator.msSaveBlob) { // IE 
665        console.log('IE'); 
666         
667        var blob = new Blob([elHtml.innerHTML]);  
668        window.navigator.msSaveBlob(blob, fileName); 
669        setTimeout(function(){ location.reload(true); }, 5000); 
670         
671         
672    }else{ 
673 
674        mimeType = mimeType || 'text/plain'; 
675        link.setAttribute('download', filename); 
676        var anchors = elHtml.getElementsByTagName("a"); 
677 
678        for (var i = 0; i < anchors.length; i++) { 
679            anchors[i].href = "" + anchors[i].href 
680
681        link.setAttribute('href', 'data:' + mimeType  +  ';charset=utf-8,' + encodeURIComponent(elHtml.innerHTML)); 
682        link.click();  
683        location.reload(true); 
684
685
686 
687 
688    var fileName =  '${tituloDownload}.html'; // 
689     
690    $('#downloadLink').click(function(){ 
691        downloadInnerHtml(fileName, 'paginaFull','text/html'); 
692         
693    }); 
694    </script> 
695     
696    <script> 
697     
698    //SCROLL TOP A LA VALORACION 
699    $(document).ready(function(){ 
700        $.urlParam = function(name){ 
701            var results = new RegExp('[\?&]' + name + '=([^&#]*)').exec(window.location.href); 
702            if (results==null){ 
703            return null; 
704
705            else{ 
706            return results[1] || 0; 
707
708
709 
710        var likeDislike = $.urlParam('like-dislike') 
711 
712        if(likeDislike == "true"){ 
713            $('html, body').animate({ 
714                scrollTop: $("#mc-portlet-portalprevencion-valoracion-ancla").offset().top 
715            }, 50); 
716
717    }) 
718 
719</script> 
720 
721 
722<script> 
723    $(".header-back-to").remove(); 
724</script> 
725 
726<script> 
727function getURLcorta(){ 
728		Liferay.Service( 
729			'/mc_prl.urlacortada/add-url-acortada', 
730
731			URLLarga: '${currentURL}', 
732			}, 
733			function(obj) { 
734				if(obj!=undefined){ 
735                    document.getElementById("linkedin").href="https://linkedin.com/shareArticle?url="+obj.URLCorta+"&;title=${titulomodificado}"; 
736                    document.getElementById("twitter").href="https://twitter.com/intent/tweet?url="+obj.URLCorta+"&;text=${titulomodificado}"; 
737                    document.getElementById("facebook").href="http://www.facebook.com/sharer.php?u="+obj.URLCorta+"&;t=${titulomodificado}"; 
738                    document.getElementById("whatsapp").href="https://api.whatsapp.com/send?text="+obj.URLCorta; 
739                    document.getElementById("telegram").href="https://telegram.me/share/url?url="+obj.URLCorta; 
740                    document.getElementById("email").href="mailto:?subject=${titulomodificado}&body="+obj.URLCorta; 
741                    document.getElementById("first-load").style.display="none"; 
742                    document.getElementById("mostrar").style.display="initial"; 
743                }else{ 
744                    document.getElementById("first-load").style.display="none"; 
745                    document.getElementById("mostrar").style.display="initial"; 
746                }						 
747
748		); 
749
750</script>