Eduki publikatzailea Eduki publikatzailea

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