Detalle nota de prensa - Comunica GVA
Presidència
S'ha produït un error mentre es processava la plantilla.
The following has evaluated to null or missing: ==> Documento [in template "10155#10193#174326687" at line 29, column 23] ---- Tip: If the failing expression is known to 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: documentos = Documento.getSiblings() [in template "10155#10193#174326687" at line 29, column 10] ----
1<#ftl output_format="HTML">
2<#include "${templatesPath}/MACROS-NEWSLETTER" />
3<#--- ASIGNAMOS LAS VARIABLES Y SERVICIOS REQUERIDOS -->
4<#assign reserved_article_title = "${.vars['reserved-article-title'].data}"
5 reserved_article_id = "${.vars['reserved-article-id'].data}"
6 reserved_article_version = "${.vars['reserved-article-version'].data}"
7 idGallery = "gallery_${reserved_article_id}"
8 idGalleryCabecera = "gallery_cabecera_${reserved_article_id}"
9
10 />
11
12<#-- Retrieve the published date meta data field of the web content -->
13<#assign displaydate = .vars['reserved-article-display-date'].data>
14
15<#-- Save the original page locale for later -->
16<#assign originalLocale = .locale>
17
18<#-- Set the page locale to the portals default locale -->
19<#setting locale = localeUtil.getDefault()>
20
21<#-- Parse the date to a date object -->
22<#assign displaydate = displaydate?datetime("EEE, d MMM yyyy HH:mm:ss Z")>
23
24<#-- Set the page locale back to the original page locale -->
25<#setting locale = originalLocale>
26
27<#--- LO PRIMERO QUE HACEMOS ES CALCULAR SI EXISTEN CONTENIDOS MULTIMEDIA PARA ESTA NOTICIA -->
28
29<#assign documentos = Documento.getSiblings()
30 fotos = Fotografia.getSiblings()
31 videos = Video.getSiblings()
32 videosGUC = VideoGUC.getSiblings()
33 audios = Audio.getSiblings() />
34
35<#assign hayDocumentos = false />
36<#assign hayFotografias = false />
37<#assign hayAudios = false />
38<#assign hayVideos = false />
39<#assign hayVideosGUC = false />
40<#assign hayMultimedia = false />
41
42<#assign indexImg = 0 />
43
44<#list documentos as documento >
45 <#if documento.URLDocumento.getData()?? && documento.URLDocumento.getData()?has_content >
46 <#assign hayDocumentos = true />
47 <#assign hayMultimedia = true />
48 </#if>
49</#list>
50
51<#list fotos as foto >
52 <#if (foto?? && foto.getData()?? && foto.getData()?trim != "") || (ImagenDestacada?? && ImagenDestacada.getData()?? && ImagenDestacada.getData()?trim != "") >
53 <#assign hayFotografias = true />
54 <#assign hayMultimedia = true />
55 </#if>
56</#list>
57
58<#list audios as audio >
59 <#if audio.URLAudio.getData()?? && audio.URLAudio.getData()?has_content >
60 <#assign hayAudios = true />
61 <#assign hayMultimedia = true />
62 </#if>
63</#list>
64
65<#list videosGUC as videoGUC >
66 <#if videoGUC.idVideo.getData()?trim?? && videoGUC.idVideo.getData()?trim != "" >
67 <#assign hayVideosGUC = true />
68 <#assign hayMultimedia = true />
69 </#if>
70</#list>
71<#list videos as video >
72 <#if video?has_content && video.getData()?trim != "" >
73 <#assign hayVideos = true />
74 <#assign hayMultimedia = true />
75 </#if>
76</#list>
77
78
79<#--- PROCEDEMOS A PINTAR LA NOTICIA -->
80<div class="row info">
81 <div class="col-lg-12">
82 <#if AnteTitulo?? && AnteTitulo.getData()?trim != "">
83 <span class="d-block mt-4 mb-1">
84 ${AnteTitulo.getData()?trim}
85 </span>
86 </#if>
87 <div class="titulo">
88 <h2 class="header10 mb-4">${reserved_article_title}</h2>
89 </div>
90 </div>
91 <div class="col-lg-12">
92 <span class="d-block">
93 <strong>${displaydate?string["dd/MM/yyyy"]}</strong>
94 </span>
95 </div>
96
97</div>
98
99<div class="row noticia">
100 <#if !hayMultimedia >
101 <div class="col_noticia_izq col-lg-12">
102 <#else>
103 <div class="col_noticia_izq col-lg-9">
104 </#if>
105
106 <div class="cabecera-noticia mb-5 row">
107 <#if ImagenDestacada?? && ImagenDestacada.getData()?? && ImagenDestacada.getData()?trim != "" >
108 <div class="imagen float-left col-sm-3">
109 <@getUrlAdaptiveMediaFromSize
110 data=ImagenDestacada
111 size="m"
112 />
113
114
115 <#assign textoAlt = reserved_article_title?replace("\"","'") />
116 <#if reserved_article_title?length gt 150 >
117 <#assign textoAlt = reserved_article_title?replace("\"","'")?truncate(150, '...') />
118 </#if>
119
120 <#if ImagenDestacada.getAttribute("alt")?? && ImagenDestacada.getAttribute("alt") != "" >
121 <#assign textoAlt = ImagenDestacada.getAttribute("alt")?replace("\"","'") />
122 <#if ImagenDestacada.getAttribute("alt")?length gt 150 >
123 <#assign textoAlt = ImagenDestacada.getAttribute("alt")?replace("\"","'")?truncate(150, '...') />
124 </#if>
125
126 </#if>
127 <img class="mw-100" src="${urlAdaptiveMedia}" alt="${textoAlt}" title="${textoAlt}">
128
129 </div>
130 </#if>
131
132 <#if Destacados?? && Destacados.getData()?trim != "" >
133 <div class="entradilla col-sm-9">
134 <strong>${Destacados.getData()?no_esc}</strong>
135 </div>
136 </#if>
137 </div>
138
139 <#if Cuerpo?has_content >
140 <div class="cuerpo-noticia">
141
142 <#if Lugar.getData()?? && Lugar.getData()?trim != "" >
143 <strong>${Lugar.getData()}.</strong>
144 </#if>
145
146 ${Cuerpo.getData()?no_esc}
147
148 </div>
149 </#if>
150 </div>
151 <#if hayMultimedia >
152 <div class="col_noticia_dcha col-lg-3">
153 <#if hayDocumentos >
154 <h3 class="mt-2"><i class="fa fa-file-alt"></i> <@liferay.language key="documents" /></h3>
155 <#list documentos as documento >
156 <ul class="list-unstyled">
157 <#if documento.URLDocumento.getData()?? && documento.URLDocumento.getData()?has_content >
158 <#assign titleDoc = documento.getData()?trim />
159 <#if titleDoc == "" >
160 <#assign titleDoc = reserved_article_title />
161 </#if>
162 <#if titleDoc?length gt 62 >
163 <#assign titleDoc = "${titleDoc?truncate(63, '(...)')}" />
164 <#else>
165 <#assign titleDoc = "${titleDoc}" />
166 </#if>
167 <li><a href="${documento.URLDocumento.getData()?no_esc}" target="_blank">${titleDoc}</a></li>
168 </#if>
169 </#list>
170 </ul>
171 </#if>
172
173 <#if hayFotografias >
174 <#assign title = reserved_article_title?replace("\"","'") />
175
176 <#if reserved_article_title?length gt 150 >
177 <#assign title = reserved_article_title?replace("\"","'")?truncate(150, '...') />
178 </#if>
179
180 <h3 class="mt-2"><i class="fa fa-camera"></i> <@liferay.language key="model.resource.com.liferay.portlet.imagegallery" /></h3>
181
182 <ul class="display-style-icon list-unstyled row" data-qa-id="rows0" id="${idGallery}">
183
184 <#if ImagenDestacada?? && ImagenDestacada.getData()?? && ImagenDestacada.getData()?trim != "" >
185 <#if ImagenDestacada.getAttribute("alt")?? && ImagenDestacada.getAttribute("alt") != "" >
186 <#assign title = ImagenDestacada.getAttribute("alt")?replace("\"","'") />
187 <#if ImagenDestacada.getAttribute("alt")?length gt 150 >
188 <#assign title = ImagenDestacada.getAttribute("alt")?replace("\"","'")?truncate(150, '...') />
189 </#if>
190
191 </#if>
192
193 <#assign nombreCampo = "ImagenDestacada" />
194 <li class=" lfr-asset-item " data-qa-id="row">
195 <div class="image-link preview" href="${ImagenDestacada.getData()}" title="${title}">
196 <div class="card-type-asset entry-display-style ">
197 <div class="card card-interactive card-interactive-secondary mb-1">
198 <div class="aspect-ratio card-item-first null">
199 <img class="aspect-ratio-item-center-middle aspect-ratio-item-fluid" src="${urlAdaptiveMedia}" alt="${title}" title="${title}" >
200 </div>
201
202 </div>
203 <@getAutorImagen data=ImagenDestacada />
204 </div>
205 </div>
206 </li>
207 </#if>
208
209 <#list fotos as foto >
210 <#assign indexImg = foto?index
211 nombreCampo = "Fotografia"
212 />
213
214 <#assign title = reserved_article_title?replace("\"","'") />
215 <#if reserved_article_title?length gt 150 >
216 <#assign title = reserved_article_title?replace("\"","'")?truncate(150, '...') />
217 </#if>
218
219 <#if foto?? && foto.getData()?? && foto.getData()?trim != "" >
220
221 <#if foto.getAttribute("alt")?? && foto.getAttribute("alt") != "" >
222 <#assign title = foto.getAttribute("alt")?replace("\"","'") />
223 <#if foto.getAttribute("alt")?length gt 150 >
224 <#assign title = foto.getAttribute("alt")?replace("\"","'")?truncate(150, '...') />
225 </#if>
226 </#if>
227 <@getUrlAdaptiveMediaFromSize
228 data=foto
229 size="m"
230 />
231
232 <li class=" lfr-asset-item " data-qa-id="row">
233 <div class="image-link preview" href="${foto.getData()?no_esc}" title="${title}">
234 <div class="card-type-asset entry-display-style ">
235 <div class="card card-interactive card-interactive-secondary mb-1">
236 <div class="aspect-ratio card-item-first null">
237 <img class="aspect-ratio-item-center-middle aspect-ratio-item-fluid" src="${urlAdaptiveMedia}" alt="${title}" title="${title}">
238 </div>
239
240
241
242
243 </div>
244 <@getAutorImagen data=foto />
245 </div>
246 </div>
247 </li>
248
249 </#if>
250 </#list>
251
252
253 </ul>
254
255 </#if>
256
257 <#if hayVideos >
258 <h3 class="mt-2"><i class="fa fa-play-circle"></i> <@liferay.language key="nota.prensa.videos" /> </h3>
259 <#list videos as video >
260 <div class="video" id="video-${reserved_article_id}">
261
262 <div class="content">
263 <#assign VideodeCanalGVA = 0 />
264 <#if video?has_content && video.getData()?trim != "" >
265 <#-- Obtengo las preferencias del portlet de video de la organización a la que pertenece el contenido-->
266
267 <#assign portletPreferencesService = serviceLocator.findService("com.liferay.portal.kernel.service.PortletPreferencesLocalService")/>
268 <#assign hasJournalArticle = journalArticleLocalService.hasArticle(groupId,reserved_article_id)/>
269
270 <#--Puede que el articulo no sea de la organización actual, buscamos la organizacion a la que pertenece-->
271 <#if !hasJournalArticle>
272 <#assign groupLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.GroupLocalService")/>
273
274 <#assign groups = groupLocalService.getGroups(0, groupLocalService.getGroupsCount())/>
275
276 <#list group as groups>
277 <#assign hasJournalArticle = journalArticleLocalService.hasArticle(group.getGroupId(),reserved_article_id)/>
278
279 <#if hasJournalArticle>
280 <#assign groupId = group.getGroupId()/>
281 <#break>
282 </#if>
283 </#list>
284
285 </#if> <#-- fin IF !hasJournalArticle -->
286
287 <#assign preferences = portletPreferencesService.getPreferences(companyId, groupId, 2, 0, "kalturaadmin_WAR_kalturaportlet")/>
288
289 <#assign player = preferences.getValue("defaultPlayer", "")/>
290 <#assign playerPlayList = preferences.getValue("defaultPlayListPlayer", "")/>
291 <#assign server = preferences.getValue("server", "")/>
292 <#assign playerWidth = preferences.getValue("playerWidth", "")/>
293 <#assign playerHeight = preferences.getValue("playerHeight", "")/>
294 <#assign playerWidthPlayList = preferences.getValue("playerPlayListWidth", "")/>
295 <#assign playerHeightPlayList = preferences.getValue("playerPlayListHeight", "")/>
296 <#assign att_media_type = "MEDIA_CLIP"/>
297
298 <#assign counter = 0 />
299 <#list video.getData()?trim?split(",") as paramsArray>
300 <#if counter==0>
301 <#assign att_id = paramsArray/>
302 <#elseif counter==1>
303 <#assign att_width = paramsArray/>
304 <#elseif counter==2>
305 <#assign att_height = paramsArray/>
306 <#elseif counter==3>
307 <#assign att_server = paramsArray/>
308 <#elseif counter==4>
309 <#assign att_partner = paramsArray/>
310 <#elseif counter==5>
311 <#assign att_player = paramsArray/>
312 <#elseif counter==6>
313 <#assign att_media_type = paramsArray/>
314 <#elseif counter==7>
315 <#assign att_title = paramsArray/>
316 </#if>
317 <#assign counter = counter + 1 />
318 </#list>
319
320 <#--Si no se ha podido obtener el player o el servidor de la configuración del portlet, lo obtengo del contenido-->
321 <#if player?? && player !="">
322 <#assign att_player = player/>
323 <#if att_media_type == "PLAYLIST">
324 <#assign att_player = playerPlayList/>
325 </#if>
326 </#if>
327
328 <#if server?? && server !="">
329 <#assign att_server = server/>
330 </#if>
331
332 <#if att_id?? && att_id !="">
333 <div class="video" id="video-${reserved_article_id}">
334 <#if att_media_type == "PLAYLIST">
335 <iframe class="iframeVideo" title="${reserved_article_title}" src="${att_server}/p/${att_partner}/sp/${att_partner}00/embedIframeJs/uiconf_id/${att_player}/partner_id/${att_partner}?iframeembed=true&flashvars[playlistAPI.kpl0Id]=${att_id}" allowfullscreen webkitallowfullscreen mozAllowFullScreen frameborder="0"></iframe>
336
337 <#else>
338 <iframe class="iframeVideo" title="${reserved_article_title}" src="${att_server}/p/${att_partner}/sp/${att_partner}00/embedIframeJs/uiconf_id/${att_player}/partner_id/${att_partner}?iframeembed=true&entry_id=${att_id}" allowfullscreen webkitallowfullscreen mozAllowFullScreen frameborder="0"></iframe>
339
340 </#if>
341 </div>
342 <#assign VideodeCanalGVA = 1>
343 </#if>
344 </#if>
345 </div>
346 </div> <#-- fin div video -->
347 </#list>
348
349 <#elseif hayVideosGUC >
350 <h3 class="mt-2"><i class="fa fa-play-circle"></i> <@liferay.language key="nota.prensa.videos" /> </h3>
351 <#assign videosGUC = VideoGUC.getSiblings() />
352 <#if videosGUC?? && videosGUC?has_content || videosGUC.idVideo.getData()?? && videoGUC.idVideo.getData()?has_content >
353 <#list videosGUC as videoGUC >
354 <#if (videoGUC.getData()?trim?? && videoGUC.getData()?trim?has_content) || ( videoGUC.idVideo.getData()?? && videoGUC.idVideo.getData()?has_content ) >
355 <#-- como GVA -->
356 <#assign urlPoster = "" />
357 <#if videoGUC.ImagenVideo.getData()?? && videoGUC.ImagenVideo.getData()?trim?has_content >
358 <#assign urlPoster = "${videoGUC.ImagenVideo.getData()?trim}" />
359 </#if>
360 <#assign video_id = "playerElement-${reserved_article_id}-${videoGUC?index}" />
361 <div id="${video_id}"></div>
362 <p>${videoGUC.getData()}</p>
363 <script type="text/javascript" src="//player.wowza.com/player/latest/wowzaplayer.min.js"></script>
364 <script>
365
366 WowzaPlayer.create('playerElement-${reserved_article_id}-${videoGUC?index}',
367 {
368 "license":"PLAY1-fHbfz-TkpaV-3fdUH-VA9n4-9G7hk",
369 "title":"",
370 "description":"",
371 "sourceURL":"https://streaming.gva.es/vod/_definst_/portal_gva/${videoGUC.idVideo.getData()}/playlist.m3u8",
372 "autoPlay":false,
373 "volume":"75",
374 "mute":false,
375 "loop":false,
376 "audioOnly":false,
377 "uiShowQuickRewind":false,
378 "posterFrameURL":"${urlPoster}",
379 "endPosterFrameURL":"",
380 "uiPosterFrameFillMode":"fill"
381 }
382 );
383 </script>
384 <#if urlPoster != "" >
385 <style>
386 #${video_id}-PosterFrame{
387 background-image: url("https://videos.gva.es/portal_gva/av/${urlPoster}") !important;
388 }
389 </style>
390 </#if>
391 </#if>
392 </#list>
393 </#if>
394 </#if>
395
396
397 <#if hayAudios >
398 <h3 class="mt-2"><i class="fa fa-volume-up"></i> <@liferay.language key="nota.prensa.audios" /> </h3>
399 <#list audios as audio >
400 <#if audio.URLAudio.getData()?? && audio.URLAudio.getData()?has_content >
401 <div class="audio_player">
402 <audio id="audio-${reserved_article_id}" class="w-100" src="${audio.URLAudio.getData()?no_esc}" controls>
403 <p>Tu navegador no implementa el elemento audio.</p>
404 </audio>
405 <p>${audio.getData()}</p>
406 </div>
407 </#if>
408 </#list>
409 </#if>
410 </div>
411 </#if>
412
413<#if CdContenidoGUC?? && CdContenidoGUC.getData()?trim != "">
414 <script>
415 if( $('.cabecera-noticia > .imagen + .entradilla').length > 0 )
416 {
417 $('.cabecera-noticia > .imagen + .entradilla').css("display","none");
418 }else if ( $('.cabecera-noticia > .imagen + .entradilla').length == 0 ){
419 $('.cabecera-noticia').css("display","none");
420 }
421 </script>
422
423</#if>
424
425
426<@liferay_aui.script use="aui-image-viewer,aui-image-viewer-media">
427
428var imageViewer = new A.ImageViewer(
429 {
430 links: '#${idGallery} .image-link',
431 centered: true,
432 captionFromTitle: true,
433 intervalTime: 3,
434 circular: true,
435 infoTemplate:'<@liferay.language key="image"/> {current} de {total}' ,
436 zIndex: 1,
437 imageAnim: {
438 duration: 0.5
439 }
440 }
441 );
442imageViewer.TPL_CLOSE = imageViewer.TPL_CLOSE.replace(
443 /<\s*span[^>]*>(.*?)<\s*\/\s*span>/,
444 Liferay.Util.getLexiconIconTpl('times', 'icon-monospaced')
445 );
446
447 var TPL_PLAYER_PAUSE =
448 '<span>' + Liferay.Util.getLexiconIconTpl('pause', 'glyphicon') + '</span>';
449 var TPL_PLAYER_PLAY =
450 '<span>' + Liferay.Util.getLexiconIconTpl('play', 'glyphicon') + '</span>';
451
452 imageViewer.TPL_PLAYER = TPL_PLAYER_PLAY;
453
454 imageViewer._syncPlaying = function () {
455 if (this.get('playing')) {
456 this._player.setHTML(TPL_PLAYER_PAUSE);
457 }
458 else {
459 this._player.setHTML(TPL_PLAYER_PLAY);
460 }
461 };
462
463 // LPS-141384
464
465 var onKeydownDefaultFn = imageViewer._onKeydown;
466 imageViewer._onKeydown = function (event) {
467 onKeydownDefaultFn.call(this, event);
468
469 var target = document.activeElement;
470
471 if (
472 !this.get('visible') &&
473 event.isKey('ENTER') &&
474 target.classList.contains('image-link')
475 ) {
476 this.show();
477 this.set('currentIndex', this.get('links').indexOf(target));
478 }
479 };
480
481 imageViewer.render()
482</@liferay_aui.script>
483
484<#-- Ocultar formulario e historico en las tareas de Workflow: previsualizacion y diferencias -->
485<style>
486div[class*='MyWorkflowTaskPortlet'] .formulario,
487 .diff-version-comparator .formulario,
488 div[class*='MyWorkflowTaskPortlet'] .formulario + hr + .col-lg-12 { display: none; }
489
490</style>
491
492<#macro getUrlAdaptiveMediaFromSize data size >
493 <#assign urlAdaptiveMedia = "" />
494 <#if data.getAttribute("fileEntryId")?? && data.getAttribute("fileEntryId") != "" >
495
496 <#assign fileEntryId = data.getAttribute("fileEntryId")
497 name = data.getData()?split("/")[4]
498 urlAdaptiveMedia = "${themeDisplay.getPortalURL()}/o/adaptive-media/image/${fileEntryId}/${size}/${name}" />
499 </#if>
500
501 <#return>
502 urlAdaptiveMedia
503</#macro>
504<#-- Incluimos template de envio -->
505<#include "${templatesPath}/MACROS-NEWSLETTER" />
506<@getisAdvancedUserOrAdmin />
507<#-- <#assign emailEnvio = "np_president@listserv.gva.es" />-->
508
509<#-- Cojo la lista de distribucion en funcion del groupId del articulo -->
510<#assign groupLocalServiceUtil = serviceLocator.findService("com.liferay.portal.kernel.service.GroupLocalService")
511 group = groupLocalServiceUtil.getGroup(groupId)
512 siteDisplayUrl = ""
513 listaDistribucion = ""
514/>
515<#if group?? && group?has_content >
516 <#assign siteDisplayUrl = group.getDisplayURL(themeDisplay)
517 listaDistribucion = siteDisplayUrl?split('/web/')[1] + "@listserv.gva.es"
518 />
519 <#if siteDisplayUrl?contains("comunica-cultura") >
520 <#assign listaDistribucion = "comunica-ceice@listserv.gva.es" />
521 </#if>
522</#if>
523
524
525<#assign emailEnvio = "" >
526<#macro getForm emailOrigen, emailEnvio>
527 <#--********************************************************************
528 Boton enviar correo
529 ************************************************************************-->
530
531 <#if isRoleNewsletter || isAdmin >
532 <@isProduccion />
533
534 <#if !isProduccion >
535 <#if listaDistribucion?has_content && listaDistribucion?contains("@listserv.gva.es") >
536 <#assign listaDistribucion= "PRUEBA-"+ listaDistribucion/>
537 </#if>
538 </#if>
539
540 <div class="col-lg-12 mt-4">
541 <h2>
542 <i class="fa fa-info-circle" aria-hidden="true"></i>
543 <a href="#ayuda-${articleId}" data-toggle="collapse" data-target="#ayuda-${articleId}" aria-expanded="false" aria-controls="ayuda-${articleId}">
544 Cómo funciona el formulario de envío
545 </a>
546 </h2>
547 </div>
548
549 <div class="collapse col-lg-12" id="ayuda-${articleId}">
550 <div>
551 <p class="mb-0">El formulario puede usarse para:</p>
552 <ul class="ml-4">
553 <li>pruebas de envío</li>
554 <li>envíos reales a la lista de suscriptores.</li>
555 </ul>
556 </div>
557 <p>Los campos <strong>Email Remitente</strong> y <strong>Email Destino</strong> tendrán uno u otro valor según el caso.</p>
558
559 <div>
560
561 <p class="mb-0"><u>Caso de pruebas de envío</u></p>
562 <ul class="ml-4">
563 <li>Campo <strong>Email Remitente:</strong> poner una dirección de correo cualquiera. El servidor Liferay enviará a esta dirección un correo de confirmación del envío.</li>
564 <li>Campo <strong>Email Destino:</strong> dirección de correo en la que deseo recibir el boletín para comprobar el resultado. Puede ser mi propia dirección de correo.</li>
565 </ul>
566
567 <p class="mb-0 mt-3"><u>Caso de envíos reales a la lista de suscriptores (servidor Mailman)</u></p>
568 <ul class="ml-4">
569 <li>Campo <strong>Email Remitente:</strong> debe ser una de las direcciones de correo autorizadas a realizar envíos a la lista de correo, de acuerdo con la configuración establecida en el servidor Mailman. El servidor Liferay enviará a esta dirección un correo de confirmación del envío.</li>
570 <li>Campo <strong>Email Destino:</strong> dirección de correo de la lista de correo Mailman. Normalmente tendrá el formato @listserv.gva.es</li>
571 </ul>
572
573 </div>
574
575 <p class="mt-3">Como consecuencia de este envío a la lista de correo, el servidor Mailman recibe el correo de petición de envío a la lista, lo procesa y envía el correo a las direcciones de correo que están suscritas a la lista. Tener en cuenta que la dirección de email origen no será mostrado a los suscriptores de la lista de distribución.</p>
576 </div>
577
578 <hr>
579 <div class="formulario col-lg-12">
580 <div>
581 <h2><a href="#formulario-${reserved_article_id}" data-toggle="collapse" data-target="#formulario-${reserved_article_id}" aria-expanded="false" aria-controls="formulario-${reserved_article_id}"> Formulario de envío</a></h2>
582 </div>
583 <div class="collapse" id="formulario-${reserved_article_id}">
584 <form name="fm" method="post" id="notaPrensaForm-${reserved_article_id}">
585 <input type="hidden" name="submit-${reserved_article_id}" value="Submitted"/>
586 <div class="form-group">
587 <label style="float:left">Email Remitente(*) :</label>
588 <div class="container">
589 <a href="#" data-toggle="tooltip" title="El email remitente no será mostrado a los subscriptores de la lista de distribución">
590 <i class="fa fa-info-circle"></i>
591 </a>
592 </div>
593 <input class="form-control" type="text" name="form_email_origen" value="comunica@gva.es"/>
594 </div>
595 <div class="form-group">
596 <label style="float:left">Asunto(*) :</label>
597 <input class="form-control" type="text" name="form_email_asunto" value="${reserved_article_title}"/>
598 </div>
599 <div class="form-group">
600 <label style="float:left">Observaciones :</label>
601 <input class="form-control" type="text" name="form_email_observaciones" value=""/>
602 </div>
603 <div class="form-group">
604 <label style="float:left">Email Destino(*) :</label>
605 <input class="form-control" type="text" name="form_email_destino" value="${listaDistribucion}"/>
606 </div>
607 <p><input class="botonEnviar" id="botonEnviar" type="submit" value="<@liferay.language key='enviar' />"/></p>
608 </form>
609
610 </div>
611 </div>
612 <script>
613 $(document).ready(function(){
614 $('[data-toggle="tooltip"]').tooltip();
615
616 $('#notaPrensaForm-${reserved_article_id}').keydown(function(e){
617 var key = e.which || e.keyCode;
618 if (event.which === 13 && $(document.activeElement).attr('id') !== 'botonEnviar') {
619 e.preventDefault();
620 }
621 });
622 });
623 </script>
624
625 </#if>
626</#macro>
627
628<@getForm
629 emailOrigen = ""
630 emailEnvio = "${emailEnvio}"
631/>
632
633<@getProtocol />
634<@getContenidoCuerpoMensajeFromXML />
635
636<@getContenidoCuerpoMensajeProcesado
637 contenidoMensaje = "${contenidoCuerpoMensaje}"
638 emailEnvio = "${emailEnvio}"
639/>
640
641<@sendEmail
642 emailOrigen=""
643 emailEnvio="${emailEnvio}"
644 asunto_mensaje=""
645 cuerpo_mensaje="${contenidoCuerpoMensajeProcesado}"
646/>
647
648<#if article != "" >
649 <@getExpandoTables />
650</#if>
651
652<#macro getContenidoCuerpoMensajeFromXML >
653 <#assign STATUS_APPROVED = 0
654 contenidoCuerpoMensaje = ""
655 article = ""
656
657 />
658 <#attempt>
659 <#assign article = journalArticleLocalService.getArticle(groupId?number, reserved_article_id, reserved_article_version?number?double) />
660 <#recover>
661
662 </#attempt>
663
664 <#if article != "" >
665 <#assign articleId = article.articleId
666 groupId = article.groupId
667 urlEnvioEs = "${protocol}comunica.gva.es/es/detalle?id=${articleId}&site=${groupId}"
668 urlEnvioVa = "${protocol}comunica.gva.es/va/detalle?id=${articleId}&site=${groupId}"
669 texto_adjunto_article_id = 357358085
670 texto_adjunto_group_id = 174325855
671 tituloEs = ""
672 tituloVa = ""
673 articleTitleEs = article.getTitle("es_ES")
674 articleTitleVa = article.getTitle("ca_ES")
675 contenidoCuerpoMensajeEs = ""
676 contenidoCuerpoMensajeVa = ""
677 contenidoCuerpoMensaje = ""
678 />
679
680 <#assign hasJournalArticle = journalArticleLocalService.hasArticle(texto_adjunto_group_id, texto_adjunto_article_id?string)/>
681 <#if hasJournalArticle>
682 <#assign articleTextoAdjunto = journalArticleLocalService.getArticle(texto_adjunto_group_id, texto_adjunto_article_id?string) />
683
684 <#assign textoAdjuntoEs = journalArticleLocalService.getArticleContent( articleTextoAdjunto, "BASIC-WEB-CONTENT", null , "es_ES" , model, themeDisplay) />
685 <#assign contenidoCuerpoMensajeEs = "<p>Accede a la noticia desde el siguiente enlace: <a href='${urlEnvioEs}'>${articleTitleEs}</a></p>${textoAdjuntoEs}" />
686
687 <#assign textoAdjuntoVa = journalArticleLocalService.getArticleContent( articleTextoAdjunto, "BASIC-WEB-CONTENT", null , "ca_ES" , model, themeDisplay) />
688 <#assign contenidoCuerpoMensajeVa += "<p>Accedeix a la notícia des del següent enllaç: <a href='${urlEnvioVa}'>${articleTitleVa}</a></p>${textoAdjuntoVa}" />
689 </#if>
690
691
692
693 <#assign document = saxReaderUtil.read(article.getContent()) />
694
695 <#if document.selectSingleNode("/root/dynamic-element[@name='titularParaPortada']/dynamic-content[@ language-id='es_ES']")?? >
696 <#assign tituloEs = document.selectSingleNode("/root/dynamic-element[@name='titularParaPortada']/dynamic-content[@ language-id='es_ES']").getText() />
697 </#if>
698
699 <#if document.selectSingleNode("/root/dynamic-element[@name='titularParaPortada']/dynamic-content[@ language-id='ca_ES']")?? >
700 <#assign tituloVa = document.selectSingleNode("/root/dynamic-element[@name='titularParaPortada']/dynamic-content[@ language-id='ca_ES']").getText() />
701 </#if>
702
703
704
705 <#if contenidoCuerpoMensajeEs != "" && contenidoCuerpoMensajeVa != "" >
706 <#assign contenidoCuerpoMensaje = contenidoCuerpoMensajeVa + "<hr>" + contenidoCuerpoMensajeEs />
707 <#elseif contenidoCuerpoMensajeVa != "" >
708 <#assign contenidoCuerpoMensaje = contenidoCuerpoMensajeVa />
709 <#elseif contenidoCuerpoMensajeEs != "" >
710 <#assign contenidoCuerpoMensaje = contenidoCuerpoMensajeEs />
711 </#if>
712
713 <#if request.getParameter("form_email_observaciones")?? && request.getParameter("form_email_observaciones")?has_content >
714 <#assign observacionesMensaje = request.getParameter("form_email_observaciones") />
715 <#assign contenidoCuerpoMensaje = "<div>${observacionesMensaje}</div>" + contenidoCuerpoMensaje />
716 </#if>
717 </#if>
718
719</#macro>
720
721<#--********************************************************************
722 Coger autoria de imagen de tipo de documento
723*********************************************************************-->
724<#macro getAutorImagen data >
725 <#assign JSONFactoryUtil = staticUtil["com.liferay.portal.kernel.json.JSONFactoryUtil"]
726 fileEntry = serviceLocator.findService('com.liferay.document.library.kernel.service.DLFileEntryService')
727 autorImagen = ""
728 />
729
730 <#if data.getAttribute("fileEntryId")?? && data.getAttribute("fileEntryId") != "" >
731
732 <#assign fileEntryId = data.getAttribute("fileEntryId") />
733
734 <#attempt>
735 <#assign file = fileEntry.getFileEntry(fileEntryId?number) />
736 <#recover>
737 <#assign file = "" />
738 </#attempt>
739
740 <#if file != "">
741 <#assign fileVersionId = file.getLatestFileVersion(true).getFileVersionId()
742 mapValues = file.getDDMFormValuesMap(fileVersionId)
743 />
744
745 <#assign autorImagen = "" >
746 <#list mapValues as key, prop>
747 <#list prop.getDDMFormFieldValues() as val >
748 <#if val.getName() == "autor">
749 <#assign autorImagen = val.getValue().getString(locale) >
750 </#if>
751 </#list>
752 </#list>
753
754
755 </#if>
756
757
758 <#if autorImagen?? && autorImagen != "" >
759 <p class="p-1 h5 font-weight-normal img-txt">${autorImagen}</p>
760 </#if>
761
762 </#if>
763</#macro>
764
765<style>
766.img-txt { font-size: 0.7em; color: #6b6b6b; }
767</style>