Restauració de hàbitats prioritaris a la marjal dels Moros - Red Natura 2000
Ves enrere Restauració de hàbitats prioritaris a la marjal dels Moros
S'ha produït un error mentre es processava la plantilla.
The following has evaluated to null or missing: ==> group [in template "10155#10193#" at line 92, column 48] ---- 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: #list group as groups [in template "10155#10193#" at line 92, column 41] ----
1<#ftl output_format="HTML">
2<#assign reserved_article_title = "${.vars['reserved-article-title'].data}"/>
3<#assign reserved_article_id = "${.vars['reserved-article-id'].data}"/>
4<#assign reserved_article_description = "${.vars['reserved-article-description'].data}"/>
5
6<#--
7Dependiendo del valor de la variable posicion el Cuerpo se pinta arriba o abajo
8por lo que primero recogemos los valores en variables
9-->
10
11<#--Posición arriba/abajo.-->
12<#assign posicion = "arriba" >
13<#if Posicion?? && Posicion.getData() !="">
14 <#assign posicion = Posicion.getData()>
15</#if>
16
17<#--Texto en el cuerpo caja de texto enriquecido.-->
18<#assign cuerpo = "">
19<#if Cuerpo?? && Cuerpo.getData() !="">
20 <#assign cuerpo = Cuerpo.getData()?no_esc>
21</#if>
22
23<div class="webContent">
24 <p class="header10">${reserved_article_title}</p>
25
26 <#--Si el valor seleccionado es arriba entonces imprimimos el contenido del cuerpo.-->
27 <#if posicion == "arriba">
28 <div class="texto_cuerpo">
29 ${cuerpo}
30 </div>
31 </#if>
32
33 <div class="video" id="video-${reserved_article_id}">
34
35 <div class="content">
36
37 <#-- Existe la posibilidad de introducir 2 tipos de vídeo: CanalGV y otros-->
38 <#-- Inicializamos las variables a false-->
39 <#assign VideodeCanalGVA = false />
40 <#assign VideodeOtrosCanalGVA = false />
41 <#assign VideodeYoutube = false />
42 <#assign VideodeOtros = false />
43 <#assign att_media_type = "MEDIA_CLIP"/>
44
45
46 <#if CanalGVA?? && CanalGVA.getData() !="">
47 <#-- Sacamos los datos que vienen dentro del contenido CanalGVA -->
48 <#assign counter = 0 />
49 <#list CanalGVA.getData()?split(",") as paramsArray>
50 <#if counter==0>
51 <#assign att_id = paramsArray/>
52 <#elseif counter==1>
53 <#assign att_width = paramsArray/>
54 <#elseif counter==2>
55 <#assign att_height = paramsArray/>
56 <#elseif counter==3>
57 <#assign att_server = paramsArray/>
58 <#elseif counter==4>
59 <#assign att_partner = paramsArray/>
60 <#elseif counter==5>
61 <#assign att_player = paramsArray/>
62 <#elseif counter==6>
63 <#assign att_media_type = paramsArray/>
64 <#elseif counter==7>
65 <#assign att_title = paramsArray/>
66 </#if>
67 <#assign counter = counter + 1 />
68 </#list>
69
70 <#if att_id?? && att_id !="">
71 <#assign VideodeCanalGVA = true />
72 <#else>
73 <#assign VideodeOtros = true />
74 </#if>
75 <#else>
76 <#assign VideodeOtros = true />
77 </#if>
78
79 <#if VideodeCanalGVA >
80 <#-- Obtengo las preferencias del portlet de video de la organización a la que pertenece el contenido-->
81
82 <#assign journalArticleLocalService = serviceLocator.findService("com.liferay.journal.service.JournalArticleLocalService")/>
83 <#assign portletPreferencesService = serviceLocator.findService("com.liferay.portal.kernel.service.PortletPreferencesLocalService")/>
84 <#assign hasJournalArticle = journalArticleLocalService.hasArticle(groupId,reserved_article_id)/>
85
86 <#--Puede que el articulo no sea de la organización actual, buscamos la organizacion a la que pertenece-->
87 <#if !hasJournalArticle>
88 <#assign groupLocalService = serviceLocator.findService("com.liferay.portal.kernel.service.GroupLocalService")/>
89
90 <#assign groups = groupLocalService.getGroups(0, groupLocalService.getGroupsCount())/>
91
92 <#list group as groups>
93 <#assign hasJournalArticle = journalArticleLocalService.hasArticle(group.getGroupId(),reserved_article_id)/>
94
95 <#if hasJournalArticle>
96 <#assign groupId = group.getGroupId()/>
97 <#break>
98 </#if>
99 </#list>
100
101 </#if> <#-- fin IF !hasJournalArticle -->
102
103 <#assign preferences = portletPreferencesService.getPreferences(companyId, groupId, 2, 0, "kalturaadmin_WAR_kalturaportlet")/>
104
105 <#assign player = preferences.getValue("defaultPlayer", "")/>
106 <#assign playerPlayList = preferences.getValue("defaultPlayListPlayer", "")/>
107 <#assign server = preferences.getValue("server", "")/>
108 <#assign playerWidth = preferences.getValue("playerWidth", "")/>
109 <#assign playerHeight = preferences.getValue("playerHeight", "")/>
110 <#assign playerWidthPlayList = preferences.getValue("playerPlayListWidth", "")/>
111 <#assign playerHeightPlayList = preferences.getValue("playerPlayListHeight", "")/>
112
113 <#--Si no se ha podido obtener el player o el servidor de la configuración del portlet, lo obtengo del contenido-->
114 <#if player?? && player !="">
115 <#assign att_player = player/>
116 <#if att_media_type == "PLAYLIST">
117 <#assign att_player = playerPlayList/>
118 </#if>
119 </#if>
120
121 <#if server?? && server !="">
122 <#assign att_server = server/>
123 </#if>
124 <#if att_width =="">
125 <#assign att_width = playerWidth>
126 <#if att_media_type == "PLAYLIST">
127 <#assign att_width = playerWidthPlayList>
128 </#if>
129 </#if>
130
131 <#if att_height == "">
132 <#assign att_height = playerHeight>
133 <#if att_media_type == "PLAYLIST">
134 <#assign att_height = playerHeightPlayList>
135 </#if>
136 </#if>
137
138 <#if att_id?? && att_id !="">
139 <div class="video">
140 <#if att_media_type == "PLAYLIST">
141 <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>
142 <#else>
143 <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>
144 </#if>
145 </div>
146 </#if>
147
148
149 </#if> <#-- FIN IF VideodeCanalGVA -->
150
151 <#if VideodeOtros >
152 <div class="videoWrapper" style="position: relative; padding-bottom: 56.25%; padding-top: 25px; height: 0;">
153 <#if URL?? && URL.getData() !="">
154
155 <#-- Tomamos como URL para montar el IFRAME la URL que nos indican en el campo URL sin hacer ninguna transformacion-->
156 <#assign var_URL_Video = URL.getData()>
157
158 <#-- Si no se especifica Alto y Ancho cogemos 100%-->
159 <#if URL.Ancho.getData() !="">
160 <#assign var_Ancho = URL.Ancho.getData()>
161 <#else>
162 <#assign var_Ancho = "100%">
163 </#if>
164 <#if URL.Alto.getData() !="">
165 <#assign var_Alto = URL.Alto.getData()>
166 <#else>
167 <#assign var_Alto = "100%">
168 </#if>
169
170 <iframe width="${var_Ancho}" height="${var_Alto}" src="${var_URL_Video}" title="${reserved_article_title}" frameborder="0" allowfullscreen></iframe>
171 </#if> <#-- FIN IF URL -->
172 </div>
173 </#if> <#-- FIN IF VideodeOtros -->
174
175 <#if reserved_article_description?? && reserved_article_description!="">
176 <br />
177 <div class="description">
178 <p>
179 ${reserved_article_description}
180 </p>
181 </div>
182 </#if> <#-- FIN IF reserved_article_description -->
183
184
185
186
187 </div>
188 </div>
189 <#--Si el valor seleccionado es abajo imprimimos el contenido del cuerpo.-->
190 <#if posicion == "abajo">
191 <div class="texto_cuerpo">
192 ${cuerpo}
193 </div>
194 </#if>
195</div>
196
197 <script type="text/javascript">
198
199 function resize_${reserved_article_id}( frame ) {
200 <#if att_height?? && att_height !="" && att_width?? && att_width !="">
201 widthParent = $('#video-${reserved_article_id} .content').width();
202 relacionOrigen= parseFloat("${att_height}") / parseFloat("${att_width}");
203 heightCalculate= parseFloat(relacionOrigen) * parseFloat(widthParent);
204
205 frame.width(widthParent);
206 frame.height(heightCalculate);
207 </#if>
208 }
209
210 $(document).ready(function () {
211 resize_${reserved_article_id}($('#video-${reserved_article_id} .iframeVideo'));
212 });
213
214 $( window ).resize(function() {
215 resize_${reserved_article_id}($('#video-${reserved_article_id} .iframeVideo'));
216 });
217 </script>