Eduki publikatzailea Eduki publikatzailea

Errorea gertatu da txantiloia prozesatzerakoan.
Error on line 2, column 1 in 842907#842945#44013
serviceLocator.findService("bipo-integration-test-service-portlet", "net.bizkaia.bipo.portal.service.AssetHelperLocalService") is undefined.
It cannot be assigned to assetHelperLocalService
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 assetEntryLocalService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetEntryLocalService")> 
6<#assign assetLinkLocalService = serviceLocator.findService("com.liferay.portlet.asset.service.AssetLinkLocalService") /> 
7<#assign dDMStructureLocalService = serviceLocator.findService("com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService") /> 
8<#assign fileEntryService = serviceLocator.findService("com.liferay.portlet.documentlibrary.service.DLFileEntryLocalService") > 
9<#assign assetHelperLocalService = serviceLocator.findService("bipo-integration-test-service-portlet", "net.bizkaia.bipo.portal.service.AssetHelperLocalService") > 
10<#assign structureLocalService = serviceLocator.findService("com.liferay.portlet.dynamicdatamapping.service.DDMStructureLocalService")> 
11<#assign classNameLocalService = serviceLocator.findService("com.liferay.portal.service.ClassNameLocalService")> 
12<#assign assetHelperLocalService = serviceLocator.findService("bipo-integration-test-service-portlet", "net.bizkaia.bipo.portal.service.AssetHelperLocalService") > 
13<#assign assetUtil = staticUtil["com.liferay.portlet.asset.util.AssetUtil"]> 
14<#assign serviceContext = staticUtil["com.liferay.portal.service.ServiceContextThreadLocal"].getServiceContext()> 
15     
16<#assign urlEncoder = staticUtil["java.net.URLEncoder"]> 
17<#assign textFormatter = staticUtil["com.liferay.portal.kernel.util.TextFormatter"]> 
18 
19<!-- VARIABLES --> 
20<#assign articleId = .vars['reserved-article-id'].data > 
21<#assign articleTitle = .vars['reserved-article-title'].data > 
22<#assign journalArticle = journalArticleLocalService.getArticle(articleGroupId, articleId) > 
23<#assign articlePK = journalArticle.getResourcePrimKey() > 
24<#assign journalArticleClassName = "com.liferay.portlet.journal.model.JournalArticle"> 
25<#assign classNameId = classNameLocalService.getClassNameId(journalArticleClassName)> 
26<#assign vocabularyScheduleRegionId = propsUtil.get("bipo.vocabulary.scheduleRegion")> 
27 
28<#if request?has_content> 
29    <#assign portletNamespace = request["theme-display"]["portlet-display"]["id"] + "_" > 
30    <#assign completeCurrentUrl = urlEncoder.encode((request["attributes"]["CURRENT_COMPLETE_URL"])?string?split("?")[0]?string, "UTF-8")> 
31    <#assign imagesPath = getterUtil.getString(request['theme-display']['path-theme-images']) /> 
32<#else> 
33    <#assign portletNamespace = articleId + '_'> 
34    <#assign completeCurrentUrl = 'http://web.bizkaia.eus'> 
35    <#assign imagesPath = '/bipo-bizkaia-eus-theme/images'> 
36</#if> 
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,vocabularyScheduleRegionId?string)> 
46		<#assign categoryNames = categoryNames + [ "${category.getTitle(locale)}" ] /> 
47		<#assign categoryIds = categoryIds + [ category.categoryId ] /> 
48	</#if> 
49</#list> 
50 
51<#assign encodedTitle = urlEncoder.encode(articleTitle, "UTF-8")> 
52 
53<!--RELATED EXHIBITIONS--> 
54<#assign journalArticleAssetEntry = assetEntryLocalService.getEntry("com.liferay.portlet.journal.model.JournalArticle", articlePK) /> 
55<#assign journalArticleAssetEntryId = journalArticleAssetEntry.getEntryId() /> 
56<#assign journalArticleRelatedLinks = assetLinkLocalService.getDirectLinks(journalArticleAssetEntryId) /> 
57 
58<#assign exhibitions = []> 
59<#assign exhibitionsStructureId = propsUtil.get("bipo.category.exhibitions")> 
60<#assign espaciosStructureId = propsUtil.get("bipo.structure.schedule")> 
61<#assign espaciosStructure = dDMStructureLocalService.getDDMStructure(espaciosStructureId?number)> 
62<#list journalArticleRelatedLinks as related_entry> 
63    <#assign relatedAssetEntryId = related_entry.getEntryId2() /> 
64    <#assign relatedAssetEntry = assetEntryLocalService.getEntry(relatedAssetEntryId) /> 
65    <#assign relatedAssetEntryPrimKey = relatedAssetEntry.getClassPK() /> 
66    <#assign relatedArticle = journalArticleLocalService.getLatestArticle(relatedAssetEntryPrimKey, 0) /> 
67    <#assign relatedArticleStructureId = relatedArticle.getStructureId() /> 
68     
69    <#assign relatedArticlePK = relatedArticle.getResourcePrimKey() > 
70    <#assign relatedCategoryIds = assetCategoryLocalService.getCategoryIds(journalArticleClassName, relatedArticlePK) /> 
71     
72    <#if validator.equals(relatedArticleStructureId, espaciosStructure.getStructureKey()) && relatedCategoryIds?seq_contains(exhibitionsStructureId?number)> 
73        <#assign exhibitions = exhibitions + [relatedArticle]> 
74    </#if> 
75</#list> 
76 
77 
78<script src="${httpUtil.getProtocol(completeCurrentUrl)}://connect.facebook.net/${locale}/all.js#xfbml=1"></script> 
79 
80<div class="bipo_gurebizkaia_detalle bg_gray bipo_espacios_detalle"> 
81    <div class="container"> 
82        <div class="row"> 
83            <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"> 
84                <h1><span>${articleTitle}</span></h1> 
85            </div> 
86        </div> 
87    </div> 
88    <!-- Redes sociales, entradilla, contenido 1 y audio -->    			 
89    <div class="container"> 
90        <div class="row"> 
91            <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-3 col-md-push-9 col-md-offset-0"> 
92            </div> 
93            <#if !validator.equals("", Imagen.getData())> 
94            <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-8 col-md-offset-1 col-md-pull-3"> 
95                <img src="${Imagen.getData()}" alt="${htmlUtil.escape(Alt_imagen.getData())}"> 
96            </div> 
97            </#if> 
98        </div> 
99    </div> 
100     
101    <div class="container"> 
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-8 col-md-offset-1"> 
104                <div class="bg_white"> 
105                    <div class="row"> 
106                        <div class="hidden-xxs col-md-1 col-md-offset-1 bipo_container_social"> 
107                            <@social /> 
108                        </div> 
109                        <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"> 
110                            <div class="row"> 
111                                <div class="col-md-10 bipo_entradilla"> 
112                                    <#list categoryNames as category> 
113                                        <p>${category}</p> 
114                                    </#list> 
115                                </div> 
116                                <div class="col-md-10 bipo_contenido"> 
117                                    ${body.getData()}       
118                                </div> 
119                            </div> 
120                        </div> 
121                    </div> 
122                    <!-- Fin redes sociales, entradilla, contenido 1 --> 
123                    <!-- Contenido 2 y sumario --> 
124                    <div class="row"> 
125                        <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-8 col-md-offset-2 bipo_contenido"> 
126                            <!-- Tabs InformaciĆ³n / Observaciones y LocalizaciĆ³n / Exposiciones permanentes --> 
127                                <div class="bipo_info_tabs"> 
128                                    <div class="row"> 
129                                        <div class="col-md-12"> 
130                                           <ul class="bipo_tabs" role="tablist"> 
131                                              <#assign tabActive = false> 
132											  <#if !validator.equals("",information.getChild('schedule').getData()) || !validator.equals("", information.getChild('document').getSiblings()?first.getData()) || !validator.equals("", information.getChild('moreInformation').getData())>                            <#assign tabActive = true > 
133                                              <li class="active" id="${portletNamespace}bipo_enlace_informacion"> 
134                                                 <a href="#${portletNamespace}tab_informacion" aria-controls="${portletNamespace}tab_informacion" class="" role="tab" data-toggle="tab" aria-expanded="false"><@liferay.language key="gbi-agenda-detalle.information" /></a> 
135                                              </li> 
136                                              </#if> 
137											  <#if !validator.equals("", observations.getData())> 
138											      <#if tabActive> 
139												  <li class="" id="${portletNamespace}bipo_enlace_observacion"> 
140												  <#else> 
141												  <li class="active" id="${portletNamespace}bipo_enlace_observacion"> 
142												  <#assign tabActive = true> 
143                                                  </#if> 
144													 <a href="#${portletNamespace}tab_observaciones" aria-controls="${portletNamespace}tab_observaciones" role="tab" data-toggle="tab" aria-expanded="true"><@liferay.language key="gbi-agenda-detalle.observations" /></a> 
145												  </li> 
146											  </#if> 
147                                              <#if !validator.equals("", Latitud.getData()) && !validator.equals("", Longitud.getData())> 
148                                                  <#if tabActive> 
149												  <li class="" id="${portletNamespace}bipo_enlace_localizacion"> 
150                                                  <#else> 
151                                                  <li class="active" id="${portletNamespace}bipo_enlace_localizacion"> 
152                                                  </#if> 
153                                                  	 <a href="#${portletNamespace}tab_localizacion" aria-controls="${portletNamespace}tab_localizacion" role="tab" data-toggle="tab" aria-expanded="true"><@liferay.language key="gbi-agenda-detalle.location" /></a> 
154												  </li> 
155                                              </#if> 
156                                              <#if exhibitions?has_content> 
157                                                  <#if tabActive> 
158												  <li class="" id="${portletNamespace}bipo_enlace_exposiciones"> 
159                                                  <#else> 
160                                                  <li class="active" id="${portletNamespace}bipo_enlace_exposiciones"> 
161                                                  </#if> 
162                                                  	 <a href="#${portletNamespace}tab_exposiciones" aria-controls="${portletNamespace}tab_exposiciones" role="tab" data-toggle="tab" aria-expanded="true"><@liferay.language key="gbi-agenda-detalle.exhibitions" /></a> 
163												  </li> 
164                                              </#if> 
165                                           </ul> 
166                                        </div> 
167									 </div> 
168                                     <div class="tab-content"> 
169                                        <#assign tabActive = false> 
170                                        <#if !validator.equals("",information.getChild('schedule').getData()) || !validator.equals("", information.getChild('document').getSiblings()?first.getData()) || !validator.equals("",information.getChild('moreInformation').getData())>                           <#assign tabActive = true> 
171                                        <div class="tab-pane fade in active" role="tabpanel" id="${portletNamespace}tab_informacion"> 
172                                            <#if !validator.equals("",information.getChild('schedule').getData())> 
173                                            <div class="bipo_descargas"> 
174                                                <h2 class="bipo_titulo"><@liferay.language key="gbi-agenda-detalle.schedule" /></h2> 
175                                                ${information.getChild('schedule').getData()} 
176                                            </div> 
177                                            </#if> 
178                                             
179                                            <#if !validator.equals("", information.getChild('document').getSiblings()?first.getData())>	 
180                                            <div class="bipo_descargas"> 
181                                                <h2 class="bipo_titulo"><@liferay.language key="gbi-agenda-detalle.downloads" /></h2> 
182                                                <ul> 
183                                                    <#list information.getChild('document').getSiblings() as curDocument> 
184                                                        <#if !validator.equals("", curDocument.getData())> 
185                                                            <#assign fileEntry = getFileEntry(curDocument.getData()) > 
186                                                            <#assign size = textFormatter.formatStorageSize(fileEntry.size, locale) > 
187                                                            <li> 
188                                                                <span class="bipoicon icon-descargar"></span> 
189                                                                <a href="#"> 
190                                                                    ${fileEntry.title} 
191 
192                                                                    <span>(${fileEntry.extension}, ${size})</span> 
193                                                                </a> 
194                                                            </li> 
195                                                        </#if> 
196 
197                                                    </#list> 
198                                                </ul> 
199                                            </div> 
200                                            </#if> 
201                                            <#if !validator.equals("", information.getChild('moreInformation').getData())> 
202                                            <div class="bipo_sumario"> 
203                                                <h2 class="bipo_titulo"><@liferay.language key="gbi-agenda-detalle.more-information" /></h2> 
204                                                ${information.getChild('moreInformation').getData()} 
205                                            </div> 
206                                            </#if> 
207                                        </div> 
208                                        </#if> 
209                                         
210                                        <#if !validator.equals("", observations.getData())> 
211                                        <#if tabActive > 
212                                        <div class="tab-pane fade" role="tabpanel" id="${portletNamespace}tab_observaciones"> 
213                                        <#else> 
214                                        <div class="tab-pane fadein active" role="tabpanel" id="${portletNamespace}tab_observaciones"> 
215                                        <#assign tabActive = true> 
216                                        </#if> 
217                                           ${observations.getData()} 
218                                        </div> 
219                                        </#if> 
220                                         
221                                        <#if !validator.equals("", Latitud.getData()) && !validator.equals("", Longitud.getData())> 
222                                        <#if tabActive > 
223                                        <div class="tab-pane fade" role="tabpanel" id="${portletNamespace}tab_localizacion"> 
224                                        <#else> 
225                                        <div class="tab-pane fade in active" role="tabpanel" id="${portletNamespace}tab_localizacion"> 
226                                        <#assign tabActive = true> 
227                                 
228                                        </#if> 
229                                            <div id="${portletNamespace}map" style="height:400px;width:100%"></div> 
230                                        </div> 
231                                        </#if> 
232                                         
233                                        <#if exhibitions?has_content> 
234                                          <#if tabActive > 
235                                            <div class="tab-pane fade" role="tabpanel" id="${portletNamespace}tab_exposiciones"> 
236                                          <#else> 
237                                            <div class="tab-pane fade in active" role="tabpanel" id="${portletNamespace}tab_exposiciones"> 
238                                            <#assign tabActive = true> 
239                                          </#if> 
240                                         
241                                            <#list exhibitions as exhibition> 
242                                                 
243                                                <#assign exhibitionPK = exhibition.getResourcePrimKey() > 
244                                                <#assign exhibitionClassName = "com.liferay.portlet.journal.model.JournalArticle"> 
245                                                <#assign exVocabularyTopicsId = propsUtil.get("bipo.vocabulary.eventType")> 
246                                                <#assign exVocabularyScheduleRegionId = propsUtil.get("bipo.vocabulary.scheduleRegion")> 
247                                                 
248                                                <#assign viewURL = assetHelperLocalService.getURLViewInContext(exhibition, request) > 
249                                                 
250                                                <#assign document = saxReaderUtil.read(exhibition.getContentByLocale(locale)) > 
251                                                <#assign allStarDates = document.selectNodes("/root/dynamic-element[@name='dates']/dynamic-element[@name='startDate']/dynamic-content") > 
252                                                <#assign allEndDates = document.selectNodes("/root/dynamic-element[@name='dates']/dynamic-element[@name='endDate']/dynamic-content") > 
253                                                <#assign allAllDays = document.selectNodes("/root/dynamic-element[@name='dates']/dynamic-element[@name='allDay']/dynamic-content") > 
254                                                <#assign eventImage = document.selectSingleNode("/root/dynamic-element[@name='eventImage']/dynamic-content").getData() > 
255                                                <#assign eventImageAlt = document.selectSingleNode("/root/dynamic-element[@name='eventImage']/dynamic-element[@name='alt']/dynamic-content").getData() > 
256                                                <#assign title = exhibition.getTitle(locale) > 
257                                                <#assign exLocationPlace = document.selectSingleNode("/root/dynamic-element[@name='locationPlace']/dynamic-content").getData() > 
258                                                 
259                                                <#assign format = []> 
260                                                <#assign format = format + ["dd"] > 
261                                                <#assign format = format + ["MM"] > 
262                                                <#assign dateFormat = languageUtil.format(locale, "dateFormat.dd-mm", format)> 
263                                                <#assign dateTexts = []> 
264                                                <#list allStarDates as startDate> 
265                                                    <#assign dateTexts = dateTexts + [getDateText(startDate.getStringValue(), allEndDates[startDate_index].getStringValue(), allAllDays[startDate_index].getStringValue(), "dd/MM/yyyy")]> 
266                                                </#list> 
267                                                 
268                                                <#assign exCategories = assetCategoryLocalService.getCategories(exhibitionClassName, exhibitionPK) /> 
269                                                         
270                                                <#assign exCategoryNames = []> 
271                                                <#assign exRegion = "" > 
272                                                <#list exCategories as category> 
273                                                  <#if validator.equals(category.vocabularyId?string, exVocabularyTopicsId?string)> 
274                                                    <#assign exCategoryNames = exCategoryNames + [ "${category.getTitle(locale)}" ] > 
275                                                  <#elseif validator.equals(category.vocabularyId?string, exVocabularyScheduleRegionId?string)> 
276                                                    <#assign exRegion = category.getTitle(locale) > 
277                                                  </#if> 
278                                                </#list> 
279                                                 
280                                                <!--RELATED ASSETS--> 
281                                                <#assign exhibitionAssetEntry = assetEntryLocalService.getEntry("com.liferay.portlet.journal.model.JournalArticle", articlePK) /> 
282                                                <#assign exhibitionAssetEntryId = exhibitionAssetEntry.getEntryId() /> 
283                                                <#assign exhibitionRelatedLinks = assetLinkLocalService.getDirectLinks(exhibitionAssetEntryId) /> 
284                                                 
285                                                <#assign espaciosStructureId = propsUtil.get("bipo.estructure.espacios")> 
286                                                <#assign espaciosStructure = dDMStructureLocalService.getDDMStructure(espaciosStructureId?number)> 
287                                                <#assign exhibition_related_articles_titles = []> 
288                                                <#list exhibitionRelatedLinks as related_entry> 
289                                                    <#assign relatedAssetEntryId = related_entry.getEntryId2() /> 
290                                                    <#assign relatedAssetEntry = assetEntryLocalService.getEntry(relatedAssetEntryId) /> 
291                                                    <#assign relatedAssetEntryPrimKey = relatedAssetEntry.getClassPK() /> 
292                                                    <#assign relatedArticle = journalArticleLocalService.getLatestArticle(relatedAssetEntryPrimKey) /> 
293                                                    <#assign relatedArticleStructureId = relatedArticle.getStructureId() /> 
294                                                     
295                                                    <#if validator.equals(relatedArticleStructureId, espaciosStructure.getStructureKey())> 
296                                                        <#assign exhibition_related_articles_titles = exhibition_related_articles_titles + [relatedArticle.getTitle(locale)]> 
297                                                    </#if> 
298                                                </#list> 
299                                                 
300                                                <div class="bipo_contentagenda"> 
301                                                  <#if !validator.equals("", eventImage)> 
302                                                    <div class="bipo_img"> 
303                                                      <a href="${viewURL}"> 
304                                                        <img src="${eventImage}" alt="${htmlUtil.escape(eventImageAlt)}" /> 
305                                                      </a> 
306                                                    </div> 
307                                                  </#if> 
308                                                  <#if !validator.equals("0",exCategoryNames?size?string)> 
309                                                    <p class="bipo_categoria"> 
310                                                      <#list exCategoryNames as curCategory > 
311                                                        <a href="${viewURL}">${curCategory}</a> 
312                                                      </#list> 
313                                                    </p> 
314                                                  </#if> 
315                                                  <#if !validator.equals("", title)> 
316                                                    <h2 class="bipo_titagenda"> 
317                                                      <a href="${viewURL}">${title}</a> 
318                                                    </h2> 
319                                                  </#if> 
320                                                  <#if !validator.equals("", exhibition.region) || !validator.equals("", exhibition.dateText) || !validator.equals("", exhibition.eventTime.getData())> 
321                                                    <div  class="bipo_hora_lugar"> 
322                                                      <ul> 
323                                                        <#if exhibition_related_articles_titles?has_content> 
324                                                          <#list exhibition_related_articles_titles as article_title> 
325                                                            <li> 
326                                                              ${article_title} 
327                                                            </li> 
328                                                          </#list> 
329                                                        </#if> 
330                                                        <#if !validator.equals("", exLocationPlace)> 
331                                                          <li> 
332                                                              <span class="bipoicon icon-localizador"> 
333                                                                  <span class="sr-only"><@liferay.language key="place" /></span> 
334                                                                        </span> 
335                                                                        <span>${exLocationPlace}</span> 
336                                                                    </li> 
337                                                        </#if> 
338                                                        <#if dateTexts?has_content> 
339                                                          <#list dateTexts as dateText> 
340                                                            <li> 
341                                                              <span class="bipoicon icon-calendario_02"> 
342                                                                  <span class="sr-only"><@liferay.language key="date" /></span> 
343                                                              </span> 
344                                                              <span>${dateText}</span> 
345                                                            </li> 
346                                                          </#list> 
347                                                        </#if> 
348                                                      </ul> 
349                                                    </div> 
350                                                  </#if> 
351                                                </div> 
352                                            </#list> 
353                                        </div> 
354                                        </#if> 
355                                     </div> 
356                                  </div> 
357                               </div> 
358                               <div class="visible-xxs col-xxs-10 col-xxs-offset-1 hidden-xs hidden-sm hidden-md hidden-lg"> 
359                                  <@social /> 
360                               </div> 
361                            </div> 
362                            <!-- Fin Contenido 2 y sumario --> 
363                        </div> 
364                    </div> 
365                </div> 
366            </div> 
367            <#if !validator.equals("0", categoryIds?size?string) > 
368                <div class="bg_white"> 
369                    <@showRelated /> 
370                </div> 
371            </#if> 
372        </div> 
373    <!--</div> 
374</div>--> 
375 
376<#macro social> 
377	<div class="m-redes_sociales"> 
378		<ul> 
379		    <li> 
380		        <div class="taglib-social-bookmark-facebook" > 
381                    <div class="fb-like" data-href="${completeCurrentUrl}" data-layout="box_count" data-action="like" data-show-faces="false" data-share="false"></div> 
382                </div> 
383		    </li> 
384			<li> 
385				<a class="facebook" href="http://www.facebook.com/sharer/sharer.php?u=${completeCurrentUrl}" target="_blank" title="<@liferay.language key='opens-new-window' />"> 
386					<span class="sr-only"><@liferay.language key="share-facebook" /></span><span class="bipoicon icon-facebook"></span> 
387				</a> 
388			</li> 
389			<li> 
390				<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"> 
391					<span class="sr-only"><@liferay.language key="share-twitter" /></span><span class="bipoicon icon-twitter"></span> 
392				</a> 
393			</li> 
394			<li> 
395				<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;"> 
396					  <span class="sr-only"><@liferay.language key="share-google-plus" /></span><span class="bipoicon icon-google-plus"></span> 
397				</a> 
398			</li> 
399			<li> 
400				<a class="whatsapp" href="whatsapp://send?text=${completeCurrentUrl}" target="_blank" title="<@liferay.language key='opens-new-window' />"> 
401					<span class="sr-only"><@liferay.language key="share-whatsapp" /></span><span class="bipoicon icon-whatsapp"></span> 
402				</a> 
403			</li> 
404		</ul> 
405	</div> 
406</#macro> 
407 
408<#macro showRelated> 
409    <#if !validator.equals("0", categoryIds?size?string) > 
410        <#assign assetEntryQuery = objectUtil("com.liferay.portlet.asset.service.persistence.AssetEntryQuery") /> 
411        ${assetEntryQuery.setClassTypeIds([getterUtil.getLong(structure.structureId)])} 
412        ${assetEntryQuery.setAllCategoryIds(categoryIds)} 
413         
414        ${assetEntryQuery.setOrderByCol1("ddm/" + structure.structureId + "/important")} 
415        ${assetEntryQuery.setOrderByType1("DESC")} 
416        ${assetEntryQuery.setOrderByCol2("ddm/" + structure.structureId + "/startDate")} 
417        ${assetEntryQuery.setOrderByType2("DESC")} 
418         
419        <#assign httpServletRequest = serviceContext.getRequest()> 
420         
421         
422        <#assign hits = assetUtil.search(httpServletRequest, assetEntryQuery, 0, 4)> 
423        <#assign results = assetUtil.getAssetEntries(hits) > 
424         
425        <#assign maxRelated = results?size > 
426        <#if maxRelated gt 3> 
427            <#assign maxRelated = 3 /> 
428        </#if> 
429         
430        <#assign numRelated = 0> 
431         
432        <#if !validator.equals("1", maxRelated?string) > 
433        	<div class="container bipo_gurebizkaia"> 
434     
435    	        <div class="row"> 
436    	            <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"> 
437    	                <div class="bipo_borde_inferior_b"> 
438    	                    <h2> <span><@liferay.language key="gbi-agenda-detalle.plus" /></span></h2> 
439    	                </div> 
440    	            </div> 
441     
442    	        </div> 
443    	        <div class="row"> 
444    	             <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"> 
445    	                <div class="bipo_listagenda"> 
446    	                    <ul> 
447    	                        <#list results as entry> 
448    	                            <#assign title = entry.getTitle(locale)  /> 
449    	                            <#assign renderer = entry.getAssetRenderer()> 
450    	                            <#assign className = renderer.getClassName() > 
451     
452    	                            <#if validator.equals(className?string, journalArticleClassName) > 
453    	                                <#assign journalArticle = renderer.getArticle() > 
454    	                                <#assign document = saxReaderUtil.read(journalArticle.getContentByLocale(locale)) > 
455    	                                <#assign rootElement = document.getRootElement() > 
456                                        <#assign image = "", alt="", place = "", startDate = "", endDate = "", allDay = "", eventTime = "" > 
457                                         
458    	                                 
459    	                                <#assign place = saxReaderUtil.createXPath("dynamic-element[@name='locationPlace']/dynamic-content").selectSingleNode(rootElement).getStringValue()  > 
460    	                                <#assign image = saxReaderUtil.createXPath("dynamic-element[@name='eventImage']/dynamic-content").selectSingleNode(rootElement).getStringValue()  > 
461                    					<#assign alt = saxReaderUtil.createXPath("dynamic-element[@name='eventImage']/dynamic-element[@name='alt']/dynamic-content").selectSingleNode(rootElement).getStringValue()  >  
462                    					<#assign startDate = getterUtil.getLong(saxReaderUtil.createXPath("dynamic-element[@name='startDate']/dynamic-content").selectSingleNode(rootElement).getStringValue())  > 
463                    					<#assign endDate = getterUtil.getLong(saxReaderUtil.createXPath("dynamic-element[@name='endDate']/dynamic-content").selectSingleNode(rootElement).getStringValue())  > 
464                    					<#assign allDay = saxReaderUtil.createXPath("dynamic-element[@name='allDay']/dynamic-content").selectSingleNode(rootElement).getStringValue()  > 
465                    					<#assign eventTime = saxReaderUtil.createXPath("dynamic-element[@name='eventTime']/dynamic-content").selectSingleNode(rootElement).getStringValue()  > 
466 
467                                         
468                                        <#assign dateText = getDateText(startDate, endDate, allDay, "dd/MM/yyyy")> 
469                                         
470                                        <#if request?has_content> 
471        	                                <#assign viewURL = assetHelperLocalService.getURLViewInContext(journalArticle, request) > 
472                                        <#else> 
473                                            <#assign viewURL = 'http://web.bizkaia.eus'> 
474                                        </#if> 
475                                         
476    	                                <#assign categories = assetCategoryLocalService.getCategories(className, journalArticle.resourcePrimKey) > 
477    	                                <#assign categoryNames = []> 
478    	            			        <#list categories as category> 
479    	            			        	<#if validator.equals(category.vocabularyId?string,vocabularyScheduleRegionId?string)> 
480    	            			        		<#assign categoryNames = categoryNames + [ "${category.getTitle(locale)}" ] /> 
481    	            			        	</#if> 
482    	            			        </#list> 
483    	                            </#if> 
484     
485    	                            <#if !validator.equals(journalArticle.getArticleId()?string, articleId?string)> 
486    	                                <#if validator.equals(numRelated?string, maxRelated?string)> 
487    	                                    <#break> 
488    	                                </#if> 
489    	                                 
490    	                                <li class="col-xxs-12 col-xs-6 col-sm-6 col-md-4"> 
491    	                                    <div class="bipo_contentagenda"> 
492    	                                        <div class="bipo_img"> 
493     
494    	                                            <a href="${viewURL}"><img src="${image}" alt="${alt}"></a> 
495    	                                        </div> 
496     
497                                                <#if !validator.equals("0", categoryNames?size?string)> 
498    	                                        <p class="bipo_categoria"> 
499    	                                            <#list categoryNames as category> 
500    	                                                ${category}  
501    	                                            </#list> 
502    	                                        </p> 
503    	                                        </#if> 
504     
505    	                                        <h2 class="bipo_titagenda"> 
506    	                                            <a href="${viewURL}">${title}</a>  
507    	                                        </h2> 
508     
509    	                                        <div class="bipo_hora_lugar"> 
510    	                                            <ul> 
511    	                                                <#if !validator.equals("", place)> 
512        		                                            <li> 
513        		                                                <span class="bipoicon icon-localizador"> 
514        		                                                    <span class="sr-only"><@liferay.language key="gbi-agenda-detalle.place" /></span> 
515        		                                                </span>${place} 
516        		                                            </li> 
517                                                        </#if> 
518                                                        <#if !validator.equals("", dateText) || !validator.equals("",eventTime)> 
519    		                                            <li> 
520    		                                                <span class="bipoicon icon-calendario_02"> 
521    		                                                    <span class="sr-only"><@liferay.language key="gbi-agenda-detalle.calendar" /></span> 
522    		                                                </span>  
523    	                                                    <#if !validator.equals("",dateText)> 
524                            		    					    ${dateText} 
525                            							    </#if> 
526                            							    <#if !validator.equals("",eventTime)> 
527                            							         - ${eventTime} 
528                            							    </#if> 
529    		                                            </li> 
530    		                                            </#if> 
531    		                                         </ul> 
532    											</div> 
533    	                                    </div> 
534    	                                </li> 
535    	                                <#assign numRelated = numRelated + 1 /> 
536    	                            </#if> 
537    	                        </#list> 
538    	                    </ul> 
539    	                </div> 
540    	            </div> 
541    	        </div> 
542    		</div> 
543        </#if> 
544    </#if> 
545</#macro> 
546 
547<#function getFileEntry url > 
548	<#assign parts = url?split("/")> 
549	 
550	<#assign group_id = getterUtil.getLong(parts[2]) /> 
551	 
552	<#assign parts = parts[5]?split("?") /> 
553	<#assign uuid = parts[0] /> 
554	 
555	<#return fileEntryService.getDLFileEntryByUuidAndGroupId(uuid?string, group_id) /> 
556</#function> 
557 
558<#function getDateText startDate endDate allDay format> 
559    <#assign startDate_Data = getterUtil.getLong(startDate)> 
560    <#assign endDate_Data = getterUtil.getLong(endDate)> 
561    <#assign dates = []> 
562    <#assign dateText = ""> 
563 
564    <#if getterUtil.getBoolean(allDay)> 
565        <#assign startDate_DateObj = dateUtil.newDate(startDate_Data)> 
566        <#assign dateText = dateUtil.getDate(startDate_DateObj, format, locale) > 
567    <#elseif (!validator.equals("0", startDate_Data?string)) && (validator.equals("0", endDate_Data?string)) > 
568        <#assign startDate_DateObj = dateUtil.newDate(startDate_Data)> 
569         
570        <#assign dates = dates + [ '${dateUtil.getDate(startDate_DateObj, format, locale)}' ] > 
571    					     
572    	<#assign dateText = languageUtil.format(locale, "from-date", dates) > 
573    <#elseif (validator.equals("0", startDate_Data?string)) && (!validator.equals("0", endDate_Data?string)) > 
574        <#assign endDate_DateObj = dateUtil.newDate(endDate_Data)> 
575         
576        <#assign dates = dates + [ '${dateUtil.getDate(endDate_DateObj, format, locale)}' ] > 
577    					     
578    	<#assign dateText = languageUtil.format(locale, "to-date", dates) > 
579    <#elseif (!validator.equals("0", startDate_Data?string)) && (!validator.equals("0", endDate_Data?string)) > 
580        <#assign startDate_DateObj = dateUtil.newDate(startDate_Data)> 
581        <#assign endDate_DateObj = dateUtil.newDate(endDate_Data)> 
582         
583        <#assign dates = dates + [ '${dateUtil.getDate(startDate_DateObj, format, locale)}' ] > 
584        <#assign dates = dates + [ '${dateUtil.getDate(endDate_DateObj, format, locale)}' ] > 
585         
586        <#assign dateText = languageUtil.format(locale, "from-to-date", dates) > 
587    </#if> 
588    <#return dateText /> 
589</#function> 
590 
591 
592<#if !validator.equals("", Direccion.getData())> 
593    <@scriptMap /> 
594</#if> 
595 
596<#macro scriptMap > 
597	<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBMctVq13ErDz69AxaIHMb93TR4DA4qioU"></script> 
598	 
599	<script> 
600		var map; 
601		var place = "${locationPlace.getData()?string}"; 
602		var address = "${Direccion.getData()}"; 
603		var latitude = ${Latitud.getData()}; 
604		var longitude = ${Longitud.getData()}; 
605		var punto; 
606		var imagesFolder = "${imagesPath}"; 
607	 
608	    var geocoder = new google.maps.Geocoder(); 
609	    geocoder.geocode({ 'address': address}, function(results, status) { 
610	        if (status == google.maps.GeocoderStatus.OK) { 
611	            //latitude = results[0].geometry.location.lat(); 
612	            //longitude = results[0].geometry.location.lng(); 
613	            punto = new google.maps.LatLng(latitude, longitude); 
614	            initialize(); 
615
616	    }); 
617	 
618	    function initialize() { 
619	        var styleArray = [ 
620	    	    {featureType: "all",            elementType: "geometry",     stylers: [{color: "#F7F7F7"}]}, 
621	    	    {featureType: "road",           elementType: "geometry",     stylers: [{color: "#FFFFFF"}]}, 
622	    	    {featureType: "poi.park",       elementType: "geometry",     stylers: [{color: "#E5E5E5"}]}, 
623	    	    {featureType: "water",          elementType: "geometry",     stylers: [{color: "#EDEDED"}]}, 
624	    	    {featureType: 'administrative', elementType: 'labels',       stylers: [{visibility: 'off'}]}, 
625	    	    {featureType: 'poi',            elementType: 'labels',       stylers: [{ visibility: 'off' }]}, 
626                {featureType: 'transit',        elementType: 'labels',       stylers: [{ visibility: 'off' }]}, 
627                {featureType: 'road.arterial',  elementType: 'labels',       stylers: [{ visibility: 'off' }]}, 
628	    	]; 
629	         
630	        var punto = new google.maps.LatLng(latitude, longitude); 
631	    	var mapOptions = { 
632	    		zoom: 17, 
633	    		center: punto, 
634	    		disableDoubleClickZoom: true, 
635	    		draggable: false, 
636	    		zoomControl:false, 
637	    		mapTypeControl: false, 
638	    		rotateControl: false, 
639	    		scaleControl: false, 
640	    		scrollwheel: false, 
641	    		streetViewControl: false, 
642	    		mapTypeId: google.maps.MapTypeId.ROADMAP, 
643	    		styles: styleArray 
644	    	}; 
645	    	 
646	        map = new google.maps.Map(document.getElementById("${portletNamespace}map"), mapOptions); 
647	 
648	        var latitudeLongitude = {lat: latitude, lng: longitude}; 
649	        var marker = new google.maps.Marker({ 
650	            position: latitudeLongitude, 
651	            map: map, 
652	            icon : imagesFolder + '/bizkaia/icon_location_mapa.png', 
653	            title : place 
654	        }); 
655	        marker.setMap(map); 
656
657	    
658        $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) { 
659            initialize(); 
660        }) 
661	</script> 
662</#macro> 
663 
664<#function getTarget(element)> 
665    <#if getterUtil.getBoolean(element)> 
666        <#assign target = "_blank" /> 
667    <#else> 
668        <#assign target = "_self" /> 
669    </#if> 
670    <#return target /> 
671</#function> 
672 
673<#function getDateText startDate endDate allDay format> 
674    <#assign startDate_Data = getterUtil.getLong(startDate)> 
675    <#assign endDate_Data = getterUtil.getLong(endDate)> 
676    <#assign dates = []> 
677    <#assign dateText = ""> 
678 
679    <#if getterUtil.getBoolean(allDay)> 
680        <#assign startDate_DateObj = dateUtil.newDate(startDate_Data)> 
681        <#assign dateText = dateUtil.getDate(startDate_DateObj, format, locale) > 
682    <#elseif (!validator.equals("0", startDate_Data?string)) && (validator.equals("0", endDate_Data?string)) > 
683        <#assign startDate_DateObj = dateUtil.newDate(startDate_Data)> 
684         
685        <#assign dates = dates + [ '${dateUtil.getDate(startDate_DateObj, format, locale)}' ] > 
686                   
687      <#assign dateText = languageUtil.format(locale, "from-date", dates) > 
688    <#elseif (validator.equals("0", startDate_Data?string)) && (!validator.equals("0", endDate_Data?string)) > 
689        <#assign endDate_DateObj = dateUtil.newDate(endDate_Data)> 
690         
691        <#assign dates = dates + [ '${dateUtil.getDate(endDate_DateObj, format, locale)}' ] > 
692                   
693      <#assign dateText = languageUtil.format(locale, "to-date", dates) > 
694    <#elseif (!validator.equals("0", startDate_Data?string)) && (!validator.equals("0", endDate_Data?string)) > 
695        <#assign startDate_DateObj = dateUtil.newDate(startDate_Data)> 
696        <#assign endDate_DateObj = dateUtil.newDate(endDate_Data)> 
697         
698        <#assign dates = dates + [ '${dateUtil.getDate(startDate_DateObj, format, locale)}' ] > 
699        <#assign dates = dates + [ '${dateUtil.getDate(endDate_DateObj, format, locale)}' ] > 
700         
701        <#assign dateText = languageUtil.format(locale, "from-to-date", dates) > 
702    </#if> 
703    <#return dateText /> 
704</#function>