1<#-- Get ThemeDisplay object, instead of the available $themeDisplay map -->
2<#assign serviceContext = staticUtil["com.liferay.portal.service.ServiceContextThreadLocal"].getServiceContext() />
3<#assign httpServletRequest = serviceContext.getRequest() />
4<#assign objThemeDisplay = httpServletRequest.getAttribute("THEME_DISPLAY") />
5
6<#-- Llamadas al ServiceLocator -->
7<#assign journalArticleLocalService = staticUtil["com.liferay.portlet.journal.service.JournalArticleLocalServiceUtil"] />
8
9<#-- Host -->
10<#assign protocol = "https://" />
11<#assign host = protocol + objThemeDisplay.serverName />
12
13<#-- Nos guardamos la url actual -->
14<#assign current_url = objThemeDisplay.getURLCurrent() />
15<#assign friendly_url = objThemeDisplay.getLayout().getFriendlyURL() />
16
17<#-- Article -->
18<#assign articleId = "${.vars['reserved-article-id'].data}" />
19<#assign article = journalArticleLocalService.getArticle(getterUtil.getLong(objThemeDisplay.getScopeGroupId()),articleId) />
20
21<#-- Plantilla que se utilizará para el envío del correo -->
22<#assign preferencesTemplateId = "170063662" />
23
24
25<#-- STYLE -->
26
27
28<style type="text/css">
29 #content .portlet-asset-publisher.newsletter h2{color:#000000 !important;font-size: 1.8em !important;}
30 #content .portlet-asset-publisher.newsletter h3{font-size: 1.5em !important; margin: 20px 0 5px 0!important;}
31 #content .portlet-asset-publisher.newsletter h4 {font-size: 1.3em;}
32 #content .portlet-asset-publisher.newsletter .journal-content-article .webContent .noticias h4:before {display: inline-block;content: '';width: 5px;height: 5px;background: #146362;margin-right: 5px;}
33 #content .portlet-asset-publisher.newsletter a{color: #146362!important;text-decoration: underline !important; font-weight: bold;}
34 #content .portlet-asset-publisher.newsletter .asset-full-content{background: none; padding: 0;}
35 #content .portlet-asset-publisher.newsletter .journal-content-article .webContent{width: 100%;font-size: 1.1em; color: #000 !important;}
36 #content .portlet-asset-publisher.newsletter .journal-content-article .webContent p {margin: 0;}
37 #content .portlet-asset-publisher.newsletter .journal-content-article .webContent ul li {padding: 0px 10px 0px 40px; background-position-y: 5px; }
38 #content .portlet-asset-publisher.newsletter .journal-content-article .webContent ul li:before {width: 5px; height: 5px;}
39 #content .portlet-asset-publisher.newsletter .journal-content-article .webContent .noticias {margin-left:25px;}
40 #content .portlet-asset-publisher.newsletter .journal-content-article .webContent .noticias .texto {margin:5px 0;}
41 #content .portlet-asset-publisher.newsletter .journal-content-article .webContent .noticias .noticia {border-bottom: 1px solid lightgrey; padding-bottom: 5px;}
42 #content .journal-content-article .webContent .noticias li h4 { font-size: 1.2em; }
43
44</style>
45
46
47<#-- Pintamos el contenido -->
48
49
50<#-- TÍTULO DEL CONTENIDO -->
51<#assign article_title = "${.vars['reserved-article-title'].data}" />
52
53<div class="webContent">
54 <#if article_title?? && article_title!="" >
55 <p class="header10">${article_title}</p>
56 </#if>
57
58 <#if GvaOberta.getData()?? >
59 <h2>
60 <#if locale == "ca_ES" >
61 Novetats del Portal de Transparència de la Generalitat - GVA Oberta
62 <#else>
63 Novedades del Portal de Transparencia de la Generalitat - GVA Oberta
64 </#if>
65 </h2>
66
67 <div class="noticias">
68 ${GvaOberta.getData()}
69 </div>
70 </#if>
71 <#assign noticias = NoticiaDadesObertes.getSiblings() />
72
73 <#assign numNoticias = 0 />
74 <#list noticias as noticia>
75 <#if noticia.getData()?has_content >
76 <#assign numNoticias = numNoticias + 1 />
77 </#if>
78 </#list>
79
80 <#if numNoticias gt 0 >
81 <hr>
82
83 <h2>
84 <#if locale == "ca_ES" >
85 Novetats del Portal de Dades Obertes de la Generalitat
86 <#else>
87 Novedades del Portal de Dades Obertes de la Generalitat
88 </#if>
89 </h2>
90
91 <div class="noticias">
92 <#list noticias as noticia>
93 <#if noticia.getData()?has_content >
94 <div class="noticia">
95 <a href="${noticia.Enlace.getData()}" target="_blank" title="Enlace a ${noticia.getData()}">
96 <div class="texto">${noticia.getData()}</div>
97 <div style="clear:both;"></div>
98 </a>
99 </div>
100 </#if>
101 </#list>
102
103
104 <#-- IMAGENES -->
105
106 <#assign imagenes = Imagenes.getSiblings() />
107 <#assign numImagenes = 0 />
108
109 <#list imagenes as imagen>
110 <#if imagen.getData()?has_content >
111 <#assign numImagenes = numImagenes + 1 />
112 </#if>
113 </#list>
114
115 <#if numImagenes gt 0 >
116 <br><br>
117 <div class="noticia">
118 <#assign widthCalculado = 100 / numImagenes />
119 <#list imagenes as imagen>
120 <a href="${imagen.EnlaceImagen.getData()}" target="_blank" title="">
121 <img src="${imagen.getData()}" alt="" width="${widthCalculado}%"/>
122 </a>
123 </#list>
124 </div>
125 </#if>
126 </div>
127 </#if>
128</div>
129
130
131<#--Enviar newsletter-->
132<#assign GroupLocalService = staticUtil["com.liferay.portal.service.GroupLocalServiceUtil"]/>
133<#assign group = GroupLocalService.fetchGroup(groupId) />
134<#assign siteFriendlyUrl = group.getFriendlyURL()/>
135<#assign urlEnvio = "/web"+siteFriendlyUrl + objThemeDisplay.getLayout().getFriendlyURL()+"/send"+"?articleId="+articleId/>
136<div class="boton-enviar"><p>
137<a class="gva-btn" href="${urlEnvio}">Enviar newsletter</a></p>
138</div>
139
140<style>
141#content .portlet-asset-publisher.newsletter .boton-enviar {
142 margin: 0 3% 0 3% !important;
143 a.gva-btn {
144 color: white !important;
145 }
146}
147</style>