Errorea gertatu da txantiloia prozesatzerakoan.
Expression parts[5] is undefined on line 405, column 20 in 842907#842945#21916.
1<!-- SERVICES --> 
2<#assign assetHelperLocalService = serviceLocator.findService("bipo-integration-test-service-portlet", "net.bizkaia.bipo.portal.service.AssetHelperLocalService")> 
3<#assign journalArticleLocalService = serviceLocator.findService("com.liferay.portlet.journal.service.JournalArticleLocalService")> 
4<#assign assetCategoryLocalService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetCategoryLocalService") > 
5<#assign fileEntryService = serviceLocator.findService("com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService") > 
6<#assign structureLocalService = serviceLocator.findService("com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService")> 
7<#assign classNameLocalService = serviceLocator.findService("com.liferay.portal.service.ClassNameLocalService")> 
8 
9<#assign urlEncoder = staticUtil["java.net.URLEncoder"]> 
10<#assign textFormatter = staticUtil["com.liferay.portal.kernel.util.TextFormatter"]> 
11 
12<#assign assetUtil = staticUtil["com.liferay.portlet.asset.util.AssetUtil"]> 
13<#assign serviceContext = staticUtil["com.liferay.portal.service.ServiceContextThreadLocal"].getServiceContext()> 
14 
15<!-- VARIABLES --> 
16<#assign httpServletRequest = serviceContext.getRequest()> 
17<#assign articleId = .vars['reserved-article-id'].data >  
18<#assign articleTitle = .vars['reserved-article-title'].data > 
19<#assign journalArticle = journalArticleLocalService.getArticle(articleGroupId, articleId) > 
20<#assign articlePK = journalArticle.getResourcePrimKey() > 
21<#assign journalArticleClassName = "com.liferay.portlet.journal.model.JournalArticle"> 
22<#assign classNameId = classNameLocalService.getClassNameId(journalArticleClassName)> 
23<#assign vocabularyTopicsId = propsUtil.get("bipo.vocabulary.topics")> 
24 
25<#if request?has_content> 
26    <#assign portletNamespace = request["theme-display"]["portlet-display"]["id"] + "_" > 
27    <#assign completeCurrentUrl = urlEncoder.encode((request["attributes"]["CURRENT_COMPLETE_URL"])?string?split("?")[0]?string, "UTF-8")> 
28    <#assign pathThemeImages = request['theme-display']['path-theme-images']> 
29<#else> 
30    <#assign portletNamespace = articleId + '_'> 
31    <#assign completeCurrentUrl = 'http://web.bizkaia.eus'> 
32    <#assign pathThemeImages = '/bipo-bizkaia-eus-theme/images'> 
33</#if> 
34 
35 
36<#assign encodedTitle = urlEncoder.encode(articleTitle, "UTF-8")> 
37 
38<#assign structure = structureLocalService.getStructure(company.groupId, classNameId, journalArticle.structureId) > 
39 
40<#assign categories = assetCategoryLocalService.getCategories(journalArticleClassName, articlePK) /> 
41         
42<#assign categoryNames = []> 
43<#assign categoryIds = []> 
44<#list categories as category> 
45    <#if validator.equals(category.vocabularyId?string,vocabularyTopicsId?string)> 
46    <#assign categoryNames = categoryNames + [ "${category.getTitle(locale)}" ] /> 
47    <#assign categoryIds = categoryIds + [ category.categoryId ] /> 
48  </#if> 
49</#list> 
50 
51<script src="${httpUtil.getProtocol(completeCurrentUrl)}://connect.facebook.net/${locale}/all.js#xfbml=1"></script> 
52 
53<div class="bipo_gurebizkaia_detalle bg_gray"> 
54    <div class="container"> 
55        <div class="row"> 
56            <div class="col-xxs-12 col-xxs-offset-0 col-xs-10 col-xs-offset-1 col-sm-10 col-sm-offset-1 col-md-offset-1 col-md-10"> 
57               <h1><span>${articleTitle}</span></h1> 
58            </div> 
59        </div> 
60    </div> 
61    <!-- Redes sociales, entradilla, contenido 1 y audio -->           
62    <div class="container"> 
63        <div class="row"> 
64            <div class="col-xxs-12 col-xxs-offset-0 col-xs-10 col-xs-offset-1 col-sm-10 col-sm-offset-1 col-md-offset-1 col-md-10"> 
65                <div class="bipo_thumb"> 
66                    <#if validator.equals("", mainImage.getChild('video').getData())> 
67                      <div><img src="${mainImage.getData()}" alt="${htmlUtil.escape(mainImage.getChild('mainImageAlt').getData())}" /></div> 
68                    <#else> 
69                      <video class="lg-video-object lg-html5" controls> 
70                            <source src="${mainImage.getChild('video').getData()}" type="video/mp4"> 
71                             <@liferay.language key="html5-not-supported" /> 
72                        </video>                         
73                    </#if> 
74                </div> 
75            </div> 
76            <#if !validator.equals("", mainImage.getChild('video').getData()) && !validator.equals("", mainImage.getChild('video').getChild('description').getData())> 
77                <div class="col-xxs-12 col-xxs-offset-0 col-xs-10 col-xs-offset-1 col-sm-10 col-sm-offset-1 col-md-offset-1 col-md-10"> 
78                    <div class="bipo_transcripcion panel-group" id="${portletNamespace}bipo_acordeon">                      
79                        <div class="panel panel-default"> 
80                            <p class="panel-title">                                     
81                                <a id="yui_patched_v3_11_0_1_1479907610398_698" class="collapsed" data-toggle="collapse" data-parent="${portletNamespace}bipo_acordeon" href="#${portletNamespace}collapseSection" aria-controls="${portletNamespace}collapseSection" aria-expanded="false"> 
82                                    <@liferay.language key="gbi-reportaje-detalle.transcription" />                                   
83                                    <span class="pull-right bipoicon"></span> 
84                                </a> 
85                            </p> 
86                            <div class="panel-collapse collapse" id="${portletNamespace}collapseSection" aria-expanded="false"> 
87                                <div class="panel-body"> 
88                                    ${mainImage.getChild('video').getChild('description').getData()} 
89                                </div> 
90                            </div> 
91                        </div> 
92                    </div> 
93                </div> 
94            </#if> 
95        </div> 
96    </div> 
97             
98    <div class="container"> 
99        <div class="row"> 
100            <div class="col-xxs-12 col-xxs-offset-0 col-xs-10 col-xs-offset-1 col-sm-10 col-sm-offset-1"> 
101                <div class="bg_white"> 
102                    <div class="row"> 
103                        <div class="col-xxs-12 col-xxs-offset-0 col-xs-10 col-xs-offset-1 col-sm-10 col-sm-offset-1 col-md-10 col-md-offset-2"> 
104                            <#if !validator.equals("0", categoryNames?size?string)> 
105                    <p class="bipo_detalle_categoria"> 
106                  <#list categoryNames as curCategory > 
107                    <#if !validator.equals("", curCategory)> 
108                      ${curCategory} 
109                    </#if> 
110                  </#list> 
111                </p> 
112              </#if> 
113                        </div> 
114                    </div> 
115                    <div class="row"> 
116                        <div class="col-md-1 col-md-offset-1 bipo_container_social"> 
117                            <@social />     
118                        </div> 
119                        <div class="col-xxs-10 col-xxs-offset-1 col-xs-10 col-xs-offset-1 col-sm-10 col-sm-offset-1 col-md-10 col-md-offset-0"> 
120                <div class="row"> 
121                  <div class="col-md-10 bipo_entradilla"> 
122                      <#if !validator.equals("", introduction.getData())> 
123                    ${introduction.getData()} 
124                      </#if> 
125                  </div> 
126                    <#if !validator.equals("", audio.getData())> 
127                  <div class="col-xxs-12 col-xs-12 col-sm-12 col-md-4 pull-right"> 
128                                    <a href="${audio.getData()}" class="bipo_media"> 
129                                        <img src="${audioImage.getData()}" alt="${htmlUtil.escape(audioImage.getChild('audioImageAlt').getData())}"> 
130                                        <div>   
131                                            <#assign fileEntry = getFileEntry(audio.getData()) > 
132                                            <span class="bipoicon icon-microfono_contorno"></span> 
133                                            <span>${fileEntry.title}</span> 
134                                            <span>${audioDuration.getData()} min.</span> 
135                                        </div> 
136                                    </a> 
137                                </div> 
138                                </#if> 
139                                <#if !validator.equals("", body.getData())> 
140                                <div class="col-xxs-12 col-xs-12 col-sm-12 col-md-8 col-md-offset-0 bipo_contenido">     
141                      ${body.getData()} 
142                  </div> 
143                  </#if> 
144                </div> 
145              </div>                                              
146                    </div> 
147            <!-- Fin redes sociales, entradilla, contenido 1 y audio --> 
148             
149            <!-- Galería imágenes --> 
150            <#if secondaryImage.getSiblings()?has_content>   
151            <div class="row"> 
152              <div class="col-xxs-12 col-xxs-offset-0 col-xs-12 col-xs-offset-0 col-sm-12 col-sm-offset-0 col-md-10 col-md-offset-1"> 
153                <div class="bipo_galeria"> 
154                  <div id="contenedor_bipo_cohesion_detalle" data-interval="false" data-wrap="true"> 
155                    <ul id="${portletNamespace}bipo_modelo_participacion"> 
156                                    <#list secondaryImage.getSiblings() as curSecondaryImage> 
157                                        <#assign fileEntry = getFileEntry(curSecondaryImage.getData()) > 
158                                    <#assign size = textFormatter.formatStorageSize(fileEntry.size, locale) > 
159                                     
160                                    <li> 
161                                      <a href="${curSecondaryImage.getData()}"   
162                                          class="bipo_item_galeria"  
163                                          data-sub-html="<p class='text-center'>${curSecondaryImage.getChild('secondaryImageAlt').getData()} - ${fileEntry.extension} ${size}</p>"> 
164                              <img src="${curSecondaryImage.getData()}" alt="${htmlUtil.escape(curSecondaryImage.getChild('secondaryImageAlt').getData())}"> 
165                            </a> 
166                        </li> 
167                        </#list> 
168                    </ul> 
169                     
170                                  <div class="bipo_info hidden-xxs hidden-xs hidden-sm"> 
171                       <span class="bipoicon icon-camara_contorno"></span><span class="sr-only"><@liferay.language key="image" /></span> 
172                       <span class="typeOswald"><@liferay.language key="gbi-reportaje-detalle.from-to-images" /> 
173</span> 
174                       <span id="${portletNamespace}title"></span> 
175                    </div> 
176                  </div> 
177                </div> 
178                <!-- fin .galeria --> 
179              </div> 
180            </div> 
181            </#if> 
182            <!-- Fin Galería imágenes --> 
183            <!-- Contenido 2 y sumario --> 
184                    <div class="row"> 
185                         
186                        <div class="col-xxs-10 col-xxs-offset-1 col-xs-10 col-xs-offset-1 col-sm-10 col-sm-offset-1 col-md-7 col-md-offset-2 bipo_contenido"> 
187                            <#if !validator.equals("", body2.getData())> 
188                                ${body2.getData()} 
189                            </#if> 
190                            <#if !validator.equals("", quote.getData())> 
191                                <div class="bipo_texto_destacado"> 
192                                    <span><img src="${pathThemeImages}/bizkaia/detalle-cita.png" alt=""></span> 
193                                    <blockquote>${quote.getData()}</blockquote> 
194                                </div> 
195                            </#if> 
196                        </div> 
197 
198                        <div class="col-xxs-10 col-xxs-offset-1 col-xs-10 col-xs-offset-1 col-sm-10 col-sm-offset-1 col-md-2 col-md-offset-0 bipo_sumario"> 
199                            <#if !validator.equals("", summary.getData())> 
200                            <h3 class="bipo_titulo"><@liferay.language key="gbi-reportaje-detalle.more-information" /></h3> 
201                             
202                            <p>${summary.getData()}</p> 
203 
204                            </#if> 
205                        </div> 
206                         
207 
208 
209                        <div class="visible-xxs col-xxs-10 col-xxs-offset-1 hidden-xs hidden-sm hidden-md hidden-lg"> 
210                            <@social />    
211                        </div> 
212                    </div> 
213                    <!-- Fin Contenido 2 y sumario --> 
214                </div> 
215            </div> 
216        </div> 
217    </div> 
218    <#if !validator.equals("0", categoryIds?size?string)> 
219        <@showRelated /> 
220    </#if> 
221</div> 
222 
223<script type="text/javascript"> 
224  $(document).ready(function(){ 
225    var gallerySlider = $("#${portletNamespace}bipo_modelo_participacion").lightSlider({ 
226        item: 1, 
227      slideMargin: 0, 
228      slideMove: 1, 
229      loop: true, 
230      keyPress: true, 
231      pager: true, 
232      enableDrag: false, 
233        prevHtml: '<span class="bipoicon bipo_iconOpenRight" aria-hidden="true">←</span><span class="sr-only"><@liferay.language key="previous" /></span>', 
234        nextHtml: '<span class="bipoicon bipo_iconOpenRight" aria-hidden="true">→</span><span class="sr-only"><@liferay.language key="next" /></span>', 
235        onAfterSlide: function (el) { 
236            //console.log("afterSlide: " + el.getCurrentSlideCount() + "alt: '" + $('#${portletNamespace}bipo_modelo_participacion li.active img').attr('alt') + "'"); 
237              $('.current').text(el.getCurrentSlideCount()); 
238              $('#${portletNamespace}title').text($('#${portletNamespace}bipo_modelo_participacion li.active img').attr('alt')); 
239          }, 
240      onSliderLoad: function(el) { 
241              el.lightGallery({ 
242                  selector: '#${portletNamespace}bipo_modelo_participacion .lslide .bipo_item_galeria', 
243                  download: false 
244              }); 
245          }  
246    }); 
247     
248    $('.current').text("1"); 
249    $('.total').text(${secondaryImage.getSiblings()?size}); 
250    $('#${portletNamespace}title').text($('#${portletNamespace}bipo_modelo_participacion li.active img').attr('alt')); 
251  }); 
252</script> 
253 
254<#macro social> 
255  <div class="m-redes_sociales"> 
256    <ul> 
257        <li> 
258            <div class="taglib-social-bookmark-facebook" > 
259                    <div class="fb-like" data-href="${completeCurrentUrl}" data-layout="box_count" data-action="like" data-show-faces="false" data-share="false"></div> 
260                </div> 
261        </li> 
262      <li> 
263        <a class="facebook" href="http://www.facebook.com/sharer/sharer.php?u=${completeCurrentUrl}" target="_blank" title="<@liferay.language key='opens-new-window' />"> 
264          <span class="sr-only"><@liferay.language key="share-facebook" /></span><span class="bipoicon icon-facebook"></span> 
265        </a> 
266      </li> 
267      <li> 
268        <a class="twitter twitter-share-button" href="https://twitter.com/intent/tweet?url=${completeCurrentUrl}&text=${encodedTitle}" target="_blank" title="<@liferay.language key='opens-new-window' />" data-size="large"> 
269          <span class="sr-only"><@liferay.language key="share-twitter" /></span><span class="bipoicon icon-twitter"></span> 
270        </a> 
271      </li> 
272      <li> 
273        <a class="googleplus" href="https://plus.google.com/share?url=${completeCurrentUrl}" target="_blank" title="<@liferay.language key='opens-new-window' />" onclick="javascript:window.open(this.href, '', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;"> 
274            <span class="sr-only"><@liferay.language key="share-google-plus" /></span><span class="bipoicon icon-google-plus"></span> 
275        </a> 
276      </li> 
277      <li> 
278        <a class="whatsapp" href="whatsapp://send?text=${completeCurrentUrl}" target="_blank" title="<@liferay.language key='opens-new-window' />"> 
279          <span class="sr-only"><@liferay.language key="share-whatsapp" /></span><span class="bipoicon icon-whatsapp"></span> 
280        </a> 
281      </li> 
282    </ul> 
283  </div> 
284</#macro> 
285 
286<#macro showRelated> 
287    <#assign assetEntryQuery = objectUtil("com.liferay.portlet.asset.service.persistence.AssetEntryQuery") /> 
288    ${assetEntryQuery.setClassTypeIds([getterUtil.getLong(structure.structureId)])} 
289    ${assetEntryQuery.setAllCategoryIds(categoryIds)} 
290     
291     ${assetEntryQuery.setOrderByCol1("publishDate")} 
292     
293    <#assign hits = assetUtil.search(httpServletRequest, assetEntryQuery, 0, 4)> 
294    <#assign results = assetUtil.getAssetEntries(hits) > 
295     
296    <#assign maxRelated = results?size > 
297    <#if maxRelated gt 3> 
298        <#assign maxRelated = 3 /> 
299    </#if> 
300 
301    <#assign numRelated = 0 /> 
302     
303  <#if !validator.equals("1", maxRelated?string) > 
304        <div class="container bipo_gurebizkaia"> 
305            <div class="row"> 
306                <div class="col-xxs-12 col-xxs-offset-0 col-xs-10 col-xs-offset-1 col-sm-10 col-sm-offset-1 col-md-12 col-md-offset-0"> 
307                    <div class="bipo_borde_inferior_b"> 
308                    <h2><@liferay.language key="gbi-reportaje-detalle.plus" /></h2> 
309                    </div> 
310                </div> 
311            </div> 
312             
313          <div class="row"> 
314              <div class="col-xxs-12 col-xxs-offset-0 col-xs-10 col-xs-offset-1 col-sm-10 col-sm-offset-1 col-md-12 col-md-offset-0 bipo_masreportajes"> 
315                  <ul class="row"> 
316                      <#list results as entry> 
317 
318                          <#assign title = entry.getTitle(locale)  /> 
319                          <#assign renderer = entry.getAssetRenderer()> 
320                          <#assign className = renderer.getClassName() > 
321                           
322                          <#if validator.equals(className?string, journalArticleClassName) > 
323                              <#assign journalArticle = renderer.getArticle() > 
324                              <#assign document = saxReaderUtil.read(journalArticle.getContent()) > 
325                              <#assign rootElement = document.getRootElement() > 
326                               
327                              <#assign introduction="", image="", alt="", video="" > 
328                              <#assign introduction = saxReaderUtil.createXPath("dynamic-element[@name='introduction']/dynamic-content").selectSingleNode(rootElement).getStringValue()  > 
329                              <#assign image = saxReaderUtil.createXPath("dynamic-element[@name='mainImage']/dynamic-content").selectSingleNode(rootElement).getStringValue()  > 
330                              <#assign alt = saxReaderUtil.createXPath("dynamic-element[@name='mainImage']/dynamic-element[@name='mainImageAlt']/dynamic-content").selectSingleNode(rootElement).getStringValue()  > 
331                                <#assign video = saxReaderUtil.createXPath("dynamic-element[@name='mainImage']/dynamic-element[@name='video']/dynamic-content").selectSingleNode(rootElement).getStringValue()  > 
332                               
333                               
334                              <#if request?has_content> 
335                                  <#assign viewURL = assetHelperLocalService.getURLViewInContext(journalArticle, request) > 
336                                <#else> 
337                                    <#assign viewURL = 'http://web.bizkaia.eus'> 
338                                </#if> 
339                              <#assign categories = assetCategoryLocalService.getCategories(className, journalArticle.resourcePrimKey) > 
340                              <#assign categoryNames = []> 
341                        <#list categories as category> 
342                          <#if validator.equals(category.vocabularyId?string,vocabularyTopicsId?string)> 
343                            <#assign categoryNames = categoryNames + [ "${category.getTitle(locale)}" ] /> 
344                          </#if> 
345                        </#list> 
346                               
347                          </#if>    
348                            
349                          <#if !validator.equals(journalArticle.getArticleId()?string, articleId?string)> 
350                            <#if validator.equals(numRelated?string, maxRelated?string)> 
351                                    <#break> 
352                                </#if> 
353                            <li class="col-md-4"> 
354                                <div class="bipo_reportcontent"> 
355                                    <div class="row"> 
356                                        <div class="col-xxs-12 col-xs-6 col-sm-6 col-md-12"> 
357                                            <#if validator.equals("", video)> 
358                                        <a href="${viewURL}">  
359                                            <img src="${image}" alt="${htmlUtil.escape(alt)}" />  
360                                        </a> 
361                                    <#else> 
362                                        <div class="bipo_videos"> 
363                                            <a href="${viewURL}"> 
364                                               <div class="bipo_video">  
365                                                    <span class="bipoicon icon-player"></span>  
366                                                </div> 
367                                                <div class="bipo_overlay"> </div> 
368                                                <img src="${image}" alt="${htmlUtil.escape(alt)}"/> 
369                                            </a> 
370                                        </div> 
371                                    </#if> 
372                                        </div> 
373                                        <div class="col-xxs-12 col-xs-6 col-sm-6 col-md-12"> 
374                                            <div class="bipo_reportcontentdescr"> 
375                                            <#list categoryNames as curCategory> 
376                                                <p class="bipo_catreportaje"> 
377                                                    ${curCategory} 
378                                                </p> 
379                                            </#list> 
380                                            <h2 class="bipo_tit15"> 
381                                                <a href="${viewURL}">${title}</a> 
382                                            </h2> 
383                                            ${stringUtil.shorten(introduction, 80)} 
384                                            <a href="${viewURL}"><span class="bipoicon bipo_iconOpenRight" aria-hidden="true">→</span><span class="sr-only"><@liferay.language key="read-more" /></span></a> 
385                                          </div> 
386                                       </div> 
387                                    </div> 
388                                 </div>     
389                            </li> 
390                            <#assign numRelated = numRelated + 1 /> 
391                          </#if> 
392                      </#list> 
393                  </ul> 
394              </div> 
395          </div> 
396    </div> 
397    </#if> 
398</#macro> 
399 
400<#function getFileEntry url > 
401  <#assign parts = url?split("/")> 
402   
403  <#assign group_id = getterUtil.getLong(parts[2]) /> 
404   
405  <#assign parts = parts[5]?split("?") /> 
406  <#assign uuid = parts[0] /> 
407   
408  <#return fileEntryService.getDLFileEntryByUuidAndGroupId(uuid?string, group_id) /> 
409</#function>