Publicador de contenidos

Se ha producido un error al procesar la plantilla.
The following has evaluated to null or missing:
==> ImagenDeFondo  [in template "20101#20128#34371" at line 3, column 34]

----
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: ${ImagenDeFondo.getData()}  [in template "20101#20128#34371" at line 3, column 32]
----
1<style> 
2    #newsHeader .content-right .content { 
3        background-image: url("${ImagenDeFondo.getData()}"); 
4        background-size: cover; 
5        background-position: center; 
6        width: 100%; 
7        padding-top: 70%; 
8
9     
10    .icon-red-social { 
11        width: 40px; 
12        height: auto; 
13
14     
15    .compartir-otros__interior { 
16        margin-left: 40px; 
17        background-color: #F7F7F7; 
18        border: 0.063rem solid #D6D6D6; 
19        border-radius: 1.250rem; 
20        z-index: 50; 
21        width: 200px; 
22
23     
24    #verVideoLock, #leerPDFlock { 
25        text-align: center; 
26        display: inline-block; 
27        position: relative; 
28        text-decoration: none; 
29        overflow: hidden; 
30        transition: all 0.3s linear 0s;        
31
32 
33    #verVideoLock:before, #leerPDFlock:before { 
34        content: "${languageUtil.get(themeDisplay.getLocale(), "cu.premium")}"; 
35        background: white; 
36        display: flex; 
37        align-items: center; 
38        justify-content: center; 
39        position: absolute; 
40        top: 0; 
41        right: -100%; 
42        width: 100%; 
43        height: 100%; 
44        border-radius: 0px $border-radius $border-radius 0px; 
45        transition: all 0.2s linear 0s; 
46        text-align: center; 
47
48 
49    #verVideoLock:hover, #leerPDFlock:hover { 
50        text-indent: -100%; 
51        opacity: 1; 
52
53 
54    #verVideoLock:hover::before, #leerPDFlock:hover::before { 
55        right: 0; 
56        text-indent: 0px; 
57        color: #2157de; 
58        text-transform: uppercase; 
59
60     
61    #verVideoLock img, #leerPDFlock img { 
62        max-width: 16px; 
63        margin-left: 10px; 
64
65     
66    #verVideoLock.sinEfecto:hover, 
67    #leerPDFlock.sinEfecto:hover { 
68        text-indent: unset; 
69
70     
71    #verVideoLock.sinEfecto:before, 
72    #leerPDFlock.sinEfecto:before { 
73        content: none; 
74
75     
76    #botonVolver button { 
77        background: transparent; 
78        border: none; 
79        color: #2157de; 
80        padding: 10px 30px; 
81
82</style> 
83 
84<#assign journalArticleId=.vars[ 'reserved-article-id'].data /> 
85<#assign journalArticleLocalService=serviceLocator.findService( "com.liferay.journal.service.JournalArticleLocalService")> 
86<#assign article=journalArticleLocalService.getArticle(groupId, .vars[ 'reserved-article-id'].data) /> 
87<#assign resourceprimKey=article.getResourcePrimKey() /> 
88<#assign assetEntryLocalService=serviceLocator.findService( "com.liferay.asset.kernel.service.AssetEntryLocalService")> 
89<#assign assetEntry=assetEntryLocalService.getEntry( "com.liferay.journal.model.JournalArticle", resourceprimKey)> 
90<#assign listCategories=assetEntry.getCategories()> 
91<#assign empty = assetEntryLocalService.incrementViewCounter(user.getUserId(), assetEntry)> 
92<#assign serviceBuilder = serviceLocator.findService("arcano.service.builder.service.ReportUserLocalService")> 
93<#assign groupID = themeDisplay.getScopeGroupId()> 
94<#assign companyID = company.getCompanyId()> 
95<#assign companyName = company.getShortName()> 
96<#assign userID = user.getUserId()> 
97<#assign userName = user.getLogin()> 
98<#assign userAgent = request.getHeader("User-Agent")> 
99<#assign reportUser = serviceBuilder.findCustom(userID, resourceprimKey)!> 
100<#if reportUser?has_content> 
101    <#assign reportUserLike = reportUser.isLike()> 
102    <#assign reportUserLeerDespues = reportUser.isLeerDespues()> 
103    <#assign reportUserLeido = reportUser.isLeido()> 
104<#else> 
105    <#assign reportUserLike = false> 
106    <#assign reportUserLeerDespues = false> 
107    <#assign reportUserLeido = false> 
108</#if> 
109<#assign currentUrl = themeDisplay.getURLCurrent()>   
110<#assign currentUrlPortal = themeDisplay.getURLPortal()>    
111<#assign AssetVocabularyLocalService = serviceLocator.findService("com.liferay.asset.kernel.service.AssetVocabularyLocalService")> 
112<#assign vocabularyTiposDeContenido = "Tipos_de_contenido"/> 
113<#assign vocabularyRegion = "Región"/> 
114<#assign vocabularyCaategoria = "Categorías"/> 
115<#assign vocabularyTopics = "Topics"/> 
116<#assign categoriasTiposDeContenido = ""/> 
117<#assign categoriasRegion = ""/> 
118<#assign categoriasCategoria = ""/> 
119<#assign categoriasTopics = ""/> 
120<#assign categoriasOtros = ""/> 
121<#list listCategories as categoryList> 
122    <#assign vocabularyy = AssetVocabularyLocalService.getVocabulary(categoryList.getVocabularyId())> 
123    <#switch vocabularyy.getName()> 
124        <#case vocabularyTiposDeContenido> 
125            <#assign categoriasTiposDeContenido = categoriasTiposDeContenido + categoryList.getTitle(themeDisplay.getLocale())/> 
126            <#break> 
127        <#case vocabularyRegion> 
128            <#assign categoriasRegion = categoriasRegion + categoryList.getTitle(themeDisplay.getLocale()) + ","/> 
129            <#break> 
130        <#case vocabularyCaategoria> 
131            <#assign categoriasCategoria = categoriasCategoria + categoryList.getTitle(themeDisplay.getLocale()) + ","/> 
132            <#break> 
133        <#case vocabularyTopics> 
134            <#assign categoriasTopics = categoriasTopics + categoryList.getTitle(themeDisplay.getLocale()) + ","/> 
135            <#break> 
136        <#default> 
137            <#assign categoriasOtros = categoriasOtros + categoryList.getTitle(themeDisplay.getLocale()) + ","/> 
138    </#switch> 
139</#list> 
140 
141<#assign httpUtil=serviceLocator.findService("com.liferay.portal.kernel.util.HttpUtil")> 
142<#assign decodeURL=httpUtil.decodeURL(enlaceAPDF.getData())> 
143 
144<#assign formatFound=""/> 
145<#assign videoFormatMP4 = ".mp4"/> 
146<#assign videoFormatOGG = ".ogg"/> 
147<#assign videoFormatMKV = ".mkv"/> 
148<#assign videoFormatFLV = ".flv"/> 
149<#assign videoFormatMOV = ".mov"/> 
150 
151<#assign audioFormatMP3 = ".mp3"/> 
152<#assign audioFormatWAV = ".wav"/> 
153 
154<#if URLDeVideo.getData()?has_content> 
155     
156    <#if URLDeVideo.getData()?contains(videoFormatMP4)> 
157        <#assign formatFound=videoFormatMP4/> 
158    </#if> 
159    <#if URLDeVideo.getData()?contains(videoFormatOGG)> 
160        <#assign formatFound=videoFormatOGG /> 
161    </#if> 
162    <#if URLDeVideo.getData()?contains(videoFormatMKV)> 
163        <#assign formatFound=videoFormatMKV/> 
164    </#if> 
165    <#if URLDeVideo.getData()?contains(videoFormatFLV)> 
166        <#assign formatFound=videoFormatFLV/> 
167    </#if> 
168    <#if URLDeVideo.getData()?contains(videoFormatMOV)> 
169        <#assign formatFound=videoFormatMOV/> 
170    </#if> 
171    <#if URLDeVideo.getData()?contains(audioFormatMP3)> 
172        <#assign formatFound=audioFormatMP3/> 
173    </#if> 
174    <#if URLDeVideo.getData()?contains(audioFormatWAV)> 
175        <#assign formatFound=audioFormatWAV/> 
176    </#if> 
177     
178</#if> 
179 
180<div id="botonVolver"> 
181    <button onclick="goBack()"> 
182        <i class="icon-long-arrow-left"></i> Volver 
183    </button> 
184</div> 
185<div class="container container-news"> 
186    <div id="newsHeader"> 
187        <div class="row h-100 rowHeader"> 
188            <div class="col-12 order-2 order-lg-1 col-lg-6"> 
189                <div class="row newsContent"> 
190                    <div class="newsType">  
191                        ${categoriasTiposDeContenido} 
192                    </div> 
193                    <div class="newsTitle"> ${Titulo.getData()} </div> 
194                    <div class="newsDate"> 
195                        <#assign FechaDePublicacion_Data=getterUtil.getString(FechaDePublicacion.getData())> 
196 
197                            <#if validator.isNotNull(FechaDePublicacion_Data)> 
198                                <#assign FechaDePublicacion_DateObj=dateUtil.parseDate( "yyyy-MM-dd", FechaDePublicacion_Data, locale)> 
199 
200                                    ${dateUtil.getDate(FechaDePublicacion_DateObj, "dd MMM yyyy", locale)} 
201                            </#if> 
202                    </div> 
203                </div> 
204                <div class="row newsButtons"> 
205                    <#assign like = ""> 
206                    <#assign likeFull = ""> 
207                    <#assign leerDespues = ""> 
208                    <#assign leerDespuesFull = ""> 
209                    <#if reportUser?has_content> 
210                        <#if reportUserLike> 
211                            <#assign like = "d-none"> 
212                        <#else> 
213                            <#assign likeFull = "d-none"> 
214                        </#if> 
215                        <#if reportUserLeerDespues> 
216                            <#assign leerDespues = "d-none"> 
217                        <#else> 
218                            <#assign leerDespuesFull = "d-none"> 
219                        </#if> 
220                    <#else> 
221                        <#assign likeFull = "d-none"> 
222                        <#assign leerDespuesFull = "d-none"> 
223                    </#if> 
224                    <img id="like" class="${like}" src="/o/arcano-theme/images/like.svg" alt="Like" data-toggle="tooltip" data-placement="top" title="Me gusta"> 
225                    <img id="likeFull" class="${likeFull}" src="/o/arcano-theme/images/like-full.svg" alt="Like" data-toggle="tooltip" data-placement="top" title="Me gusta"> 
226                    <img id="leerDespues" class="${leerDespues}" src="/o/arcano-theme/images/saved.svg" alt="Save" data-toggle="tooltip" data-placement="top" title="My research"> 
227                    <img id="leerDespuesFull" class="${leerDespuesFull}" src="/o/arcano-theme/images/saved-full.svg" alt="Save" data-toggle="tooltip" data-placement="top" title="My research"> 
228                    <a  data-toggle="collapse" data-target="#collapseShare" aria-expanded="true" aria-controls="collapse"><img src="/o/arcano-theme/images/share.svg" alt="Share"  title="Compartir"></a>                 
229                </div> 
230                <!-- Collapse redes sociales--> 
231                <div class="collapse compartir-otros__interior mt-1" id="collapseShare"> 
232         
233                    <#assign urlTobody = currentUrlPortal + currentUrl> 
234                     
235                    <a href="javascript:openMail()"> 
236                        <img src="/o/arcano-theme/images/emailShare.svg" class="ml-1 mt-1 icon-red-social" alt="compartirEmail"> 
237                    </a> 
238                    <a href="#" onclick="javascript:openTwitter()" title="Twitter"> 
239                        <img src="/o/arcano-theme/images/twitterShare.svg" class="ml-1 icon-red-social" alt="compartirTwitter"> 
240                    </a> 
241                    <a href="#" onclick="javascript:openLinkedin()" title="Linkedin"> 
242                        <img src="/o/arcano-theme/images/linkedinShare.svg" class="ml-1 icon-red-social" alt="compartirLinkedin"> 
243                    </a> 
244                 </div> 
245            </div> 
246            <div class="col-12 order-1 order-lg-2 col-lg-6 content-right"> 
247                <div class="row"> 
248                    <div class="content"> 
249                        <div class="timeRemaining"> <img src="/o/arcano-theme/images/clock.svg" alt="Clock"> <span>${TiempoDeLecturaEstimada.getData()}</span> 
250                        </div> 
251                    </div> 
252                </div> 
253            </div> 
254        </div> 
255         
256    </div> 
257</div> 
258<div class="container container-news"> 
259     <div id="topics"> 
260        <div class="col-12"> 
261            <div class="row"> 
262                <span class="resalted">${languageUtil.get(themeDisplay.getLocale(), "cu.category")}:</span> 
263                <span class="divider"></span> 
264                <#if categoriasCategoria?has_content> 
265                    <#list categoriasCategoria?remove_ending(",")?split(",") as cat> 
266                        <#if (cat == "AER Personal")> 
267                            <span class="categoryName d-none">${cat}</span> 
268                        <#else> 
269                            <span class="categoryName">${cat}</span> 
270                            <span class="divider"></span> 
271                        </#if> 
272                    </#list> 
273                </#if> 
274                <#if categoriasRegion?has_content> 
275                    <#list categoriasRegion?remove_ending(",")?split(",") as cat> 
276                        <span class="categoryName">${cat}</span> 
277                        <span class="divider"></span> 
278                    </#list> 
279                </#if> 
280                <#if categoriasTopics?has_content> 
281                    <#list categoriasTopics?remove_ending(",")?split(",") as cat> 
282                        <span class="categoryName">${cat}</span> 
283                        <span class="divider"></span> 
284                    </#list> 
285                </#if> 
286                <#if categoriasOtros?has_content> 
287                    <#list categoriasOtros?remove_ending(",")?split(",") as cat> 
288                        <span class="categoryName">${cat}</span> 
289                        <span class="divider"></span> 
290                    </#list> 
291                </#if>     
292            </div> 
293        </div> 
294    </div> 
295</div> 
296<div class="container container-news"> 
297    <div id="analistas"> 
298        <div class="row"> 
299            <div class="col-12 col-md-8 content-left"> 
300                <div class="row"> 
301                    <div class="text"> 
302                        <h6>${languageUtil.get(themeDisplay.getLocale(), "cu.analysts")}:</h6> 
303                        
304                        <#if Nombre.getSiblings()?has_content> 
305                            <#list Nombre.getSiblings() as cur_Nombre> 
306 
307                                <div class="contact"> <img src="/o/arcano-theme/images/point.svg" alt="dot"> 
308                                    <div>  
309                                        <span class="name"> 
310                                            ${cur_Nombre.getData()} 
311                                            <#if cur_Nombre.getChildren()?size gte 3> 
312                                                ${cur_Nombre.apellidos.getData()} 
313                                            </#if> 
314                                        </span> 
315                                    </div> 
316                                </div> 
317                            </#list> 
318                        </#if> 
319                    </div> 
320                </div> 
321            </div> 
322        </div> 
323    </div> 
324</div> 
325<div class="container container-news"> 
326    <div class="newsContent"> 
327        <div class="paragraph">${textoComplementario.getData()}  
328                        <br> 
329                           <div class="bullet"> 
330                            <#list textoComplementario.Bullet.getSiblings() as cur_textoComplementario> 
331                                <#if cur_textoComplementario.getData()?has_content> 
332                                <div class="contact"> <img class="bulletPoint" src="/o/arcano-theme/images/point.svg" alt="dot"> 
333                                 <span class="name">${cur_textoComplementario.getData()}</span>  
334                                </div> 
335                                </#if> 
336                            </#list> 
337                        </div> 
338                         
339         </div> 
340 
341    </div> 
342</div> 
343<div class="downloaded"> 
344    <div class="center"> 
345        <#if URLDeVideo.getData()?has_content> 
346            <button id="visorVideo" class="buttonArcano buttonTransparent mr-1 d-none" data-toggle="modal" data-src="${URLDeVideo.getData()}" data-target="#modalVideoReport">${languageUtil.get(themeDisplay.getLocale(), "cu.watch-informative-video")}</button> 
347         
348            <a id="verVideoLockLink" href="/servicios"> 
349                <button id="verVideoLock" role="button" class="buttonArcano buttonColored .effect" role="button"> 
350                    ${languageUtil.get(themeDisplay.getLocale(), "cu.watch-informative-video")}<img src="/o/arcano-theme/images/lockWhite.png"/> 
351                </button> 
352            </a> 
353        </#if> 
354 
355         <button id="leerPDF" role="button" class="buttonArcano buttonColored d-none">${languageUtil.get(themeDisplay.getLocale(), "cu.read-document")}</button>  
356 
357         <a id="leerPDFlockLink" href="/servicios"><button id="leerPDFlock" role="button" class="buttonArcano buttonColored .effect" role="button">${languageUtil.get(themeDisplay.getLocale(), "cu.read-document")}<img src="/o/arcano-theme/images/lockWhite.png"/></button></a> 
358    </div> 
359</div> 
360<!-- Modal --> 
361<div class="modal fade" id="modalVideoReport" tabindex="-1" role="dialog" aria-hidden="true"> 
362    <div class="modal-dialog" role="document"> 
363        <div class="modal-content"> 
364            <div class="modal-body"> 
365                <button type="button" class="close" data-dismiss="modal" aria-label="Close"> 
366                    <span aria-hidden="true">&times;</span> 
367                </button> 
368                <!-- 16:9 aspect ratio --> 
369                <#if formatFound == videoFormatMP4 ||  
370                     formatFound == videoFormatOGG ||  
371                     formatFound == videoFormatMKV ||  
372                     formatFound == videoFormatMOV ||  
373                     formatFound == videoFormatFLV> 
374                <div class="embed-responsive embed-responsive-16by9"> 
375                    <video class="reportVideoPlayer" width="620" height="400" controls controlsList="nodownload" id="reportVideoPlayer"> 
376                        <source src="${URLDeVideo.getData()}" type="video/${formatFound[1..]}"> 
377                    </video> 
378                </div> 
379                </#if> 
380                <#if formatFound == audioFormatMP3 ||  
381                     formatFound == audioFormatWAV> 
382                <div class="embed-responsive"> 
383                    <audio class="reportAudioPlayer" controls controlsList="nodownload" id="reportVideoPlayer"> 
384                        <source src="${URLDeVideo.getData()}" type="audio/${formatFound[1..]}"> 
385                    </audio> 
386                </div> 
387                </#if> 
388            </div> 
389        </div> 
390    </div> 
391</div> 
392<div class="modal fade bd-example-modal-sm" id="iosModal" tabindex="-1" role="dialog" aria-labelledby="iosModalLabel" aria-hidden="true"> 
393    <div class="modal-dialog modal-dialog-centered modal-sm" role="document"> 
394        <div class="modal-content"> 
395            <div class="modal-header"> 
396                <h5 class="modal-title" id="exampleModalLabel"> 
397                    ${languageUtil.get(themeDisplay.getLocale(), "ios.modal.title")} 
398                </h5> 
399                <button type="button" class="close" data-dismiss="modal" aria-label="Close"> 
400                    <span aria-hidden="true">&times;</span> 
401                </button> 
402            </div> 
403            <div class="modal-body"> 
404                ${languageUtil.get(themeDisplay.getLocale(), "ios.modal.message")} 
405            </div> 
406        </div> 
407    </div> 
408</div> 
409 
410<!-- VISOR PDF --> 
411<div class="container container-news collapse" id="collapsePDF"> 
412    <div id='pdfviewer'  class="pdfContainer"></div> 
413</div> 
414 
415<script src='/o/arcano-theme/js/lib/WebViewer/lib/webviewer.min.js'></script> 
416 
417<script type="text/javascript"> 
418    var deviceSSOO = "" + localStorage.getItem("ssooDevice"); 
419    if ((deviceSSOO.toLowerCase().indexOf("ios") != -1)){ 
420        var textoBoton = $('#leerPDFlock').text(); 
421        var imageHtml = $('#leerPDFlock img'); 
422        $('#leerPDFlockLink').remove(); 
423        var buttonModal = $('<button/>', { 
424            type: 'button', 
425            class: 'buttonArcano buttonColored d-none sinEfecto', 
426            text: textoBoton, 
427            id: 'leerPDFlock' 
428        }); 
429        buttonModal.attr("data-toggle", "modal"); 
430        buttonModal.attr("data-target", "#iosModal"); 
431        buttonModal.append(imageHtml); 
432        $('.downloaded').append(buttonModal); 
433         
434        var textoBoton = $('#verVideoLock').text(); 
435        var imageHtml = $('#verVideoLock img'); 
436        $('#verVideoLockLink').remove(); 
437        var buttonModal = $('<button/>', { 
438            type: 'button', 
439            class: 'buttonArcano buttonColored d-none sinEfecto', 
440            text: textoBoton, 
441            id: 'verVideoLock' 
442        }); 
443        buttonModal.attr("data-toggle", "modal"); 
444        buttonModal.attr("data-target", "#iosModal"); 
445        buttonModal.append(imageHtml); 
446        $('.downloaded').prepend(buttonModal); 
447
448</script> 
449 
450<script type="text/javascript"> 
451    var userLogado = themeDisplay.isSignedIn(); 
452    var showDownload = false; 
453    var usuario = themeDisplay.getUserId(); 
454    var nombreUsuario; 
455    var compania; 
456    var marcaDeAgua; 
457    var like = ${reportUserLike?c}; 
458    var leido = ${reportUserLeido?c}; 
459    var leerDespues = ${reportUserLeerDespues?c}; 
460    var soyUserAdhoc = ${UsuariosAdHoc.getData()?contains(user.getEmailAddress())?c}; 
461    var pdfWebViewer; 
462     
463    var INSIGHTS='insights'; 
464    var AER_PUBLICO='aer público'; 
465    var AER_PUBLICO_EN='aer public' 
466    var MACROECONOMIC='aer premium'; 
467    var ADHOC='ad hoc'; 
468    var PROMOCION='aer personal'; 
469     
470    var GROUP_CLIENTE='cliente'; 
471    var GROUP_CLIENTE_DESCARGA='clientedescarga'; 
472    var GROUP_CLIENTE_SOLO_INFORMES='clientesoloinformes'; 
473    var GROUP_EMPLEADO='empleadoarcano'; 
474    var GROUP_EMPLEADO_DESCARGA='empleadoarcanodescarga'; 
475    var GROUP_EMPLEADO_SOLO_INFORMES='empleadosoloinformes'; 
476    var GROUP_PROMOCION='aer personal'; 
477 
478    var categorias = document.getElementsByClassName("categoryName"); 
479    var leerPDF = document.getElementById('leerPDF'); 
480    var leerPDFlock = document.getElementById('leerPDFlock'); 
481    var visorVideo = document.getElementById('visorVideo');        
482    var verVideoLock = document.getElementById('verVideoLock'); 
483 
484    callCreateRegistroService('Visualizacion'); 
485     
486    if (userLogado == false) { 
487        document.getElementById('like').classList.add("d-none"); 
488        document.getElementById('likeFull').classList.add("d-none"); 
489        document.getElementById('leerDespues').classList.add("d-none");                  
490        document.getElementById('leerDespuesFull').classList.add("d-none"); 
491
492     
493    if (soyUserAdhoc == true) { 
494        leerPDF.classList.remove("d-none");                                 
495        leerPDFlock.classList.add("d-none"); 
496        if (visorVideo) { 
497            visorVideo.classList.remove("d-none"); 
498            verVideoLock.classList.add("d-none"); 
499
500        showDownload = true; 
501
502 
503    for (var i = 0; i < categorias.length; i++) { 
504        switch (String(categorias[i].innerHTML).toLowerCase()) { 
505            case AER_PUBLICO: 
506            case AER_PUBLICO_EN: 
507            case ADHOC: 
508                leerPDF.classList.remove("d-none");                                 
509                leerPDFlock.classList.add("d-none"); 
510                if (visorVideo) { 
511                    visorVideo.classList.remove("d-none"); 
512                    verVideoLock.classList.add("d-none"); 
513
514                if (userLogado == true) { 
515                    showDownload = true; 
516
517                break; 
518            case MACROECONOMIC: 
519                if (userLogado == true) { 
520                    Liferay.Service( 
521                        '/usergroup/get-user-user-groups', { 
522                            userId: this.usuario 
523                        }, 
524                        function(obj) { 
525                            if(String(obj[0].name) != 'undefined'){ 
526                                var usuarioTieneGrupo=true; 
527                                if ( obj.length == 0 ) { 
528                                    usuarioTieneGrupo=false; 
529
530                                if (usuarioTieneGrupo && String(obj[0].name).toLowerCase() != GROUP_PROMOCION) { 
531                                    leerPDF.classList.remove("d-none"); 
532                                    leerPDFlock.classList.add("d-none"); 
533                                    if (String(obj[0].name).toLowerCase() == GROUP_CLIENTE_DESCARGA || String(obj[0].name).toLowerCase() == GROUP_EMPLEADO_DESCARGA) { 
534                                        showDownload = true;                               
535                                    }  
536                                    if (!(String(obj[0].name).toLowerCase() == GROUP_CLIENTE_SOLO_INFORMES || String(obj[0].name).toLowerCase() == GROUP_EMPLEADO_SOLO_INFORMES)) { 
537                                        if (visorVideo) { 
538                                            visorVideo.classList.remove("d-none"); 
539                                            verVideoLock.classList.add("d-none"); 
540
541
542
543
544
545                    ); 
546                }                   
547                break; 
548            case PROMOCION: 
549                if (userLogado == true) { 
550                    Liferay.Service( 
551                        '/usergroup/get-user-user-groups', { 
552                            userId: this.usuario 
553                        }, 
554                        function(obj1) { 
555                            if(String(obj1[0].name) != 'undefined'){ 
556                                var usuarioTieneGrupo=true; 
557                                if ( obj1.length == 0 ) { 
558                                    usuarioTieneGrupo=false; 
559
560                                if (usuarioTieneGrupo && String(obj1[0].name).toLowerCase() == GROUP_PROMOCION) { 
561                                     console.log('entra2'); 
562                                    leerPDF.classList.remove("d-none"); 
563                                    leerPDFlock.classList.add("d-none"); 
564                                    if (visorVideo) { 
565                    					visorVideo.classList.remove("d-none"); 
566                    					verVideoLock.classList.add("d-none"); 
567
568                                     
569
570
571
572                    ); 
573                }                   
574                break; 
575
576
577     
578     
579    $("#like").click(function() { 
580        like = true; 
581        callLiferayService(like, leido, leerDespues); 
582        $("#like").addClass("d-none"); 
583        $("#likeFull").removeClass("d-none"); 
584    }); 
585     
586    $("#likeFull").click(function() { 
587        like = false; 
588        callLiferayService(like, leido, leerDespues); 
589        $("#likeFull").addClass("d-none"); 
590        $("#like").removeClass("d-none"); 
591    }); 
592     
593    $("#leerDespues").click(function() { 
594        leerDespues = true; 
595        callLiferayService(like, leido, leerDespues); 
596        $("#leerDespues").addClass("d-none"); 
597        $("#leerDespuesFull").removeClass("d-none"); 
598    }); 
599     
600    $("#leerDespuesFull").click(function() { 
601        leerDespues = false; 
602        callLiferayService(like, leido, leerDespues); 
603        $("#leerDespuesFull").addClass("d-none"); 
604        $("#leerDespues").removeClass("d-none"); 
605    }); 
606     
607    $("#leerPDF").click(function() { 
608        callCreateRegistroService('Lectura'); 
609        if(!leido){ 
610            leido = true; 
611            callLiferayService(like, leido, leerDespues);    
612
613         
614        var deviceSSOO = "" + localStorage.getItem("ssooDevice"); 
615        var versionSSOO = "" + localStorage.getItem("ssooVersion"); 
616 
617        if (deviceSSOO.toLowerCase().indexOf("ios") != -1  
618        || (deviceSSOO.toLowerCase().indexOf("android") != -1 && versionSSOO.toLowerCase().indexOf("6.") == -1) ) { 
619            try {  
620                var downloadParams = '/o/download-file/document/${resourceprimKey}/${themeDisplay.getLocale()}/AERDocument-${resourceprimKey}-guest-${themeDisplay.getLocale()}.pdf|'+showDownload; 
621                if (userLogado) { 
622                    var watermarkPromise = getWatermarkText(); 
623                    watermarkPromise.then((value) => { 
624                        var watermarkParts = value.split("\n"); 
625                        var downloadParams = '/o/download-file/document/${resourceprimKey}/' + encodeURI(watermarkParts[0]) + '/' + encodeURI(watermarkParts[1]) + '/${themeDisplay.getLocale()}/AERDocument-${resourceprimKey}-${themeDisplay.getLocale()}.pdf|'+showDownload; 
626                        //alert('downloadParams: '+downloadParams); 
627                        loadPDFReport.postMessage(downloadParams);  
628                    }); 
629                } else { 
630                    loadPDFReport.postMessage(downloadParams);  
631
632                 
633            } catch (err) {} 
634            //location.href = 'download:/o/download-file/document/${resourceprimKey}'; 
635        } else { 
636            $("#collapsePDF").toggleClass("show"); 
637            WebViewer({ 
638                path: '/o/arcano-theme/js/lib/WebViewer/lib', // path to the PDFTron 'lib' folder on your server 
639                licenseKey: 'ARCANO ASESORES FINANCIEROS, S.L.:OEM:Arcano Economic Research Portal::B+:AMS(20220729):EE8599D304B7880A7360B13AC9A2737860616F7CE750BDB016C5FE599FD79305B1D6B6F5C7', 
640                initialDoc: '${enlaceAPDF.getData()}', 
641                documentType: 'pdf', 
642                 
643              }, document.getElementById('pdfviewer')) 
644              .then( (instance) =>  { 
645                pdfWebViewer = instance; 
646                pdfWebViewer.setTheme('dark'); 
647                pdfWebViewer.enableTextSelection(false); 
648                pdfWebViewer.disableElements([ 'freeHandToolGroupButton',  
649                    'freeHandToolButton', 
650                    'textToolGroupButton', 
651                    'shapeToolGroupButton', 
652                    'signatureToolButton', 
653                    'freeTextToolButton', 
654                    'eraserToolButton', 
655                    'stickyToolButton', 
656                    'miscToolGroupButton', 
657                    'leftPanel', 
658                    'filePickerButton', 
659                    'downloadButton', 
660                    'printButton', 
661                    'pageNavOverlay', 
662                    'menuButton', 
663                    'leftPanelButton', 
664                    'selectToolButton', 
665                    'panToolButton', 
666                    'toolsButton', 
667                    'highlightToolButton', 
668                    'highlightToolButton2', 
669                    'highlightToolButton3', 
670                    'highlightToolButton4', 
671                    'viewControlsButton']); 
672                pdfWebViewer.setHeaderItems(function(header) { 
673                      if (showDownload) { 
674                          header.push({ 
675                            title: 'Download', 
676                            type: 'actionButton', 
677                            img: ' data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAQAAADZc7J/AAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAAAmJLR0QAAKqNIzIAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAAHdElNRQfkBhAMIw1XWqOzAAAAxklEQVRIx+2UOwrCQBRF74hiJaS3cAM27iI2bsLObWQjdu5BUASxyDYSsRZbhWMho4ZkxkwsFPGWM+/c9xneSE6xw2rrjjIeA57CnHEtvam/wd/gVw1Y2xUsnFqtXlfQ8yb030oSfTJcOjCo0RVDjpX4iVHNwRBzLuEXJgGzZVoymAXgkkRSwJNAXMIwv+MLjC+04t0liQ5LADZ0vYzLQCIiJSXyJTWP79v4yiwZWOYLlylU7XJfH2hh35jOb6WPyWmijFi6AiuxD6Ljv60BAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDIwLTA2LTE2VDEyOjM1OjEzKzAwOjAwOq0sPQAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyMC0wNi0xNlQxMjozNToxMyswMDowMEvwlIEAAAAZdEVYdFNvZnR3YXJlAHd3dy5pbmtzY2FwZS5vcmeb7jwaAAAAAElFTkSuQmCC', 
678                            onClick: function() { 
679                                pdfWebViewer.downloadPdf({includeAnnotations: true,flatten: true, filename: '${decodeURL?keep_before_last("/")?keep_after_last("/")}',}); 
680                                callCreateRegistroService('Descarga'); 
681
682                          }); 
683
684                     header.push({ 
685                        title: 'Full Screen', 
686                        type: 'actionButton', 
687                        img: 'data:image/png;base64,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\n', 
688                        onClick: function() { 
689                          pdfWebViewer.toggleFullScreen(); 
690
691                    }); 
692                }); 
693                var docViewer = pdfWebViewer.docViewer;  
694                 
695                var watermarkPromise = getWatermarkText(); 
696                watermarkPromise.then((value) => { 
697                    watermarkOptions = { 
698                        diagonal: { 
699                            text: value, 
700                            fontSize: 40, 
701                            color: '#031539', 
702                            opacity: 20 
703
704                    }; 
705                    docViewer.setWatermark(watermarkOptions); 
706                }) 
707 
708            });      
709
710    }); 
711     
712     $(".reportVideoPlayer").on("play", function () { 
713        callCreateRegistroService('Video'); 
714    }); 
715     
716    $(".reportAudioPlayer").on("play", function () { 
717        callCreateRegistroService('Audio'); 
718    }); 
719     
720    function getWatermarkText() { 
721        return new Promise(resolve => { 
722                    var marcaDeAgua; 
723                    if (userLogado == true){ 
724                        Liferay.Service( 
725                            '/user/get-current-user', 
726                            function(user) { 
727                                nombreUsuario = user.firstName + " " + user.lastName; 
728                                var companyId = user.companyId; 
729                                var classPK = user.userId; 
730                                Liferay.Service( 
731                                    '/expandovalue/get-data', 
732
733                                        companyId: companyId, 
734                                        className: 'com.liferay.portal.kernel.model.User', 
735                                        tableName: 'CUSTOM_FIELDS', 
736                                        columnName: 'compania', 
737                                        classPK: classPK 
738                                    }, 
739                                    function(expando) { 
740                                        compania = expando; 
741                                        marcaDeAgua = nombreUsuario + "\n" + compania; 
742                                            
743                                        resolve(marcaDeAgua); 
744
745                                ); 
746
747                        ); 
748                    } else { 
749                        marcaDeAgua = ''; 
750 
751                        resolve(marcaDeAgua); 
752
753                }); 
754
755     
756    function callLiferayService(likee, leidoo, leerDespuess){ 
757        Liferay.Service( 
758          '/pdf.reportuser/update-custom', 
759
760            groupId: ${groupID}, 
761            companyId: ${companyID}, 
762            userId: ${userID}, 
763            assetId: ${resourceprimKey}, 
764            like: likee, 
765            leido: leidoo, 
766            leerDespues: leerDespuess 
767          }, 
768          function(obj) { 
769
770        ); 
771
772 
773    function callCreateRegistroService(tipoRegistro){ 
774        Liferay.Service( 
775          '/registro.registro/create-registro', 
776
777            groupId: ${groupID}, 
778            companyId: ${companyID}, 
779            userId: ${userID}, 
780            assetEntryId: ${resourceprimKey}, 
781            tipoRegistro: tipoRegistro, 
782            createDate: true, 
783            modifiedDate: false, 
784          }, 
785          function(obj) { 
786            if (tipoRegistro=='Visualizacion'){ 
787                if (typeof(Storage) !== 'undefined') { 
788                    sessionStorage.registroSB = obj; 
789
790
791
792        ); 
793
794     
795    function callUpdateRegistroService(registro){ 
796        Liferay.Service( 
797          '/registro.registro/update-registro', 
798
799            idregistro: registro 
800          }, 
801          function(obj) { 
802
803        ); 
804
805     
806    $("#modalVideoReport").on("hide.bs.modal", function (e) { 
807        console.log("modal video cerrada..."); 
808        $("#reportVideoPlayer").get(0).pause();   
809    });  
810     
811    function openLinkedin() { 
812        var dir = window.document.URL; 
813        var tit = window.document.title; 
814        var dir2 = encodeURIComponent(dir.replace(/ /g, '+')); 
815        var tit2 = encodeURIComponent(tit); 
816        urlLinkedin = 'https://www.linkedin.com/shareArticle?mini=true&url=' + dir2; 
817        var deviceSSOO = "" + localStorage.getItem("ssooDevice"); 
818 
819        if (deviceSSOO.toLowerCase().indexOf("ios") != -1  
820            || deviceSSOO.toLowerCase().indexOf("android") != -1) { 
821            launchURL.postMessage(urlLinkedin); 
822        } else {     
823            window.open(urlLinkedin); 
824
825
826     
827    function openTwitter() { 
828        var dir = window.document.URL; 
829        var tit = "${Titulo.getData()}"; 
830        var dir2 = encodeURIComponent(dir.replace(/ /g, '+')); 
831        var tit2 = encodeURIComponent(tit); 
832        var urlTwitter = 'https://twitter.com/intent/tweet?text=' + tit2 + '&url=' + dir2 + '&via=Arcano'; 
833         
834        var deviceSSOO = "" + localStorage.getItem("ssooDevice"); 
835 
836        if (deviceSSOO.toLowerCase().indexOf("ios") != -1  
837            || deviceSSOO.toLowerCase().indexOf("android") != -1) { 
838            launchURL.postMessage(urlTwitter); 
839        } else {             
840            window.open(urlTwitter); 
841
842
843     
844    function openMail() { 
845        var deviceSSOO = "" + localStorage.getItem("ssooDevice"); 
846 
847        if (deviceSSOO.toLowerCase().indexOf("ios") != -1  
848            || deviceSSOO.toLowerCase().indexOf("android") != -1) { 
849            alert('mailto:?subject=' + encodeURI("Arcano Economic Research: ") + encodeURI("${Titulo.getData()}") + '&body=' + encodeURI("${urlTobody}")); 
850            launchURL.postMessage('mailto:?subject=' + encodeURI("Arcano Economic Research: ") + encodeURI("${Titulo.getData()}") + '&body=' + encodeURI("${urlTobody}"));  
851        } else { 
852            location.href = 'mailto:?subject=Arcano Economic Research: ' + encodeURI("${Titulo.getData()}") + '&body=' + encodeURI("${urlTobody}"); 
853
854
855     
856    function goBack() { 
857      window.history.back(); 
858      idRegistro  = sessionStorage.registroSB; 
859      callUpdateRegistroService(idRegistro); 
860
861     
862    window.onbeforeunload = function (e) { 
863      idRegistro  = sessionStorage.registroSB; 
864      callUpdateRegistroService(idRegistro); 
865
866</script> 

TePuedeInteresar

Portlets no está disponible temporalmente.