1<style>
2#product_detail .container-body .container-floatLeft {min-height: 126px;}
3@media (max-width: 768px) {
4#product_detail .container-body .container-floatLeft {min-height: 146px;}
5}
6</style>
7
8<#assign journalArticleLS = serviceLocator.findService("com.liferay.portlet.journal.service.JournalArticleLocalService")/>
9<#assign assetEntryLS = serviceLocator.findService("com.liferay.portlet.asset.service.AssetEntryLocalService") />
10<#assign groupLS = serviceLocator.findService("com.liferay.portal.service.GroupLocalService") />
11<#assign FriendlyURLNormalizerUtil = staticUtil["com.liferay.portal.kernel.util.FriendlyURLNormalizerUtil"] />
12<#assign ServihabitatRetailUtils = staticUtil["com.servihabitat.utils.ServihabitatRetailUtils"] />
13<#assign imagenesLSU = serviceLocator.findService("servihabitat-retail-sdi-portlet","com.servihabitat.sdi.service.ImagenesLocalService")/>
14<#assign zonaInfoLS = serviceLocator.findService("servihabitat-retail-maestros-portlet","com.servihabitat.portlet.service.ZonaInfoLocalService") />
15<#assign ubicacionLS = serviceLocator.findService("servihabitat-retail-maestros-portlet","com.servihabitat.portlet.service.UbicacionLocalService") />
16
17<#-- Seteamos una variable con la informacion de la version para los JS y CSS -->
18<#assign cacheVersion = "?v=" + propsUtil.get('variable.v.cache.version')/>
19<#assign porcentajeReduccionImagenes = 15/>
20
21<#-- Seteamos el locale de la plantilla para que aplique el idioma en componentes como Date MMM -->
22<#setting locale=locale.toString()>
23<#assign serviceContext = staticUtil["com.liferay.portal.service.ServiceContextThreadLocal"].getServiceContext()>
24<#assign httpServletRequest = serviceContext.getRequest() />
25<#assign themeDisplay = serviceContext.getThemeDisplay() />
26<#assign h1_class = "" />
27<#assign campana_class = "" />
28<#assign showPromoRelatedDesc = false />
29<#assign estaLogueado = themeDisplay.isSignedIn()/>
30<#assign urlLogin = languageUtil.get(locale, "favorito-login-url")/>
31<#assign promoRefs = "" />
32<#assign precio_desde = 0 />
33<#assign promoConjIndex = 0 />
34<#assign anchoImgMin = propsUtil.get("servihabitat.sdi.ancho.pequeno") />
35<#assign anchoImgMax = propsUtil.get("servihabitat.sdi.ancho.grande") />
36<#assign proponTuPrecio = proponTuPrecio.getData() />
37<#assign urlImgPrincipal = "" />
38<#assign favCategory = "" />
39<#assign refCampana = "" />
40
41<#-- TAREAPROY-3072 -->
42<#assign visitasCaso="0">
43<#assign visitasWeb="0">
44<#assign visitasCallme="0">
45<#assign visitasFavorito="0">
46<#if (httpServletRequest.getSession().getAttribute(ServihabitatRetailUtils.SHARED_VISITAS_CASO)??) >
47 <#assign visitasCaso =httpServletRequest.getSession().getAttribute(ServihabitatRetailUtils.SHARED_VISITAS_CASO)?string />
48 <#assign visitasCallme = httpServletRequest.getSession().getAttribute(ServihabitatRetailUtils.SHARED_VISITAS_CALLME)?string />
49 <#assign visitasWeb = httpServletRequest.getSession().getAttribute(ServihabitatRetailUtils.SHARED_VISITAS_WEB)?string />
50 <#assign visitasFavorito = httpServletRequest.getSession().getAttribute(ServihabitatRetailUtils.SHARED_VISITAS_FAV)?string />
51</#if>
52
53<#-- GA360 -->
54<#if (httpServletRequest.getAttribute(ServihabitatRetailUtils.SHARED_PRODUCT_DETAIL)??) >
55 <#assign jsonDetailProducto = httpServletRequest.getAttribute(ServihabitatRetailUtils.SHARED_PRODUCT_DETAIL) />
56 <#assign datosSEODetailProducto = jsonDetailProducto?string>
57</#if>
58
59<#-- TAREAPROY-22. Links inmueble siguiente y anterior. -->
60<#if (httpServletRequest.getAttribute("token")??) >
61 <#assign token = httpServletRequest.getAttribute("token") />
62</#if>
63<#if (httpServletRequest.getAttribute("enlaceSiguiente")??) >
64 <#assign enlaceSiguiente = httpServletRequest.getAttribute("enlaceSiguiente") />
65 <#if (httpServletRequest.getAttribute("enlaceListado")??) >
66 <#assign enlaceListado = httpServletRequest.getAttribute("enlaceListado") />
67 </#if>
68</#if>
69<#if (httpServletRequest.getAttribute("enlaceAnterior")??) >
70 <#assign enlaceAnterior = httpServletRequest.getAttribute("enlaceAnterior") />
71 <#if (httpServletRequest.getAttribute("enlaceListado")??) >
72 <#assign enlaceListado = httpServletRequest.getAttribute("enlaceListado") />
73 </#if>
74</#if>
75<#-- /TAREAPROY-22. Links inmueble siguiente y anterior. -->
76
77<#assign enlaceListadoOriginal = "" />
78<#if (httpServletRequest.getAttribute("enlaceListadoOriginal")??) >
79 <#assign enlaceListadoOriginal = httpServletRequest.getAttribute("enlaceListadoOriginal")?string />
80</#if>
81
82<#-- TCK-17609 Error generar fichas PDF PRO -->
83<input type="hidden" id="imagen64" name="imagen64" value="" />
84
85<#-- CACHE DE INMUEBLES -->
86<#assign popoverUX = "" />
87<#if (httpServletRequest.getSession().getAttribute("LIFERAY_SHARED_DIVPROMOS")??) >
88 <#assign popoverUX = httpServletRequest.getSession().getAttribute("LIFERAY_SHARED_DIVPROMOS")?string />
89</#if>
90<#if (httpServletRequest.getSession().getAttribute("LIFERAY_SHARED_MAPCONJUNTA")??) >
91 <#assign mapUXInmuebles = httpServletRequest.getSession().getAttribute("LIFERAY_SHARED_MAPCONJUNTA") />
92</#if>
93<#if (httpServletRequest.getSession().getAttribute("LIFERAY_SHARED_MAP")??) >
94 <#assign map = httpServletRequest.getSession().getAttribute("LIFERAY_SHARED_MAP") />
95</#if>
96
97<#function getTipoOperacion>
98 <#assign serviceContext = staticUtil["com.liferay.portal.service.ServiceContextThreadLocal"].getServiceContext()>
99
100 <#assign param = ""/>
101
102 <#if (serviceContext.getRequest().getParameter('paramMode')??) >
103 <#assign param = serviceContext.getRequest().getParameter("paramMode")/>
104 </#if>
105
106 <#if languageUtil.get(locale, "home-filtro-alquiler")?lower_case == param?lower_case >
107 <#assign param = languageUtil.get(locale, "home-filtro-alquiler")/>
108 <#else>
109 <#assign param = languageUtil.get(locale, "home-filtro-compra")/>
110 </#if>
111 <#return param>
112</#function>
113
114
115<#function getTipoInmuebleURL tipologia subtipologia>
116 <#assign serviceContext = staticUtil["com.liferay.portal.service.ServiceContextThreadLocal"].getServiceContext()>
117
118 <#if serviceContext.getRequest().getParameter("paramType")?has_content >
119 <#return serviceContext.getRequest().getParameter("paramType")>
120 <#else>
121 <#assign tipoInmueble = FriendlyURLNormalizerUtil.normalize(tipologia)?replace("-", "") >
122 <#if (subtipologia?length > 0) >
123 <#assign tipoInmueble = tipoInmueble+"-"+FriendlyURLNormalizerUtil.normalize(subtipologia)?replace("-", "") />
124 </#if>
125
126 <#return tipoInmueble?lower_case>
127 </#if>
128
129</#function>
130
131<#function getTipoInmuebleNombre tipologia subtipologia>
132
133 <#assign tipoInmueble = tipologia >
134 <#if (subtipologia?length > 0) >
135 <#assign tipoInmueble = subtipologia />
136 </#if>
137
138 <#return tipoInmueble>
139
140</#function>
141
142<style>
143 <#-- Escondemos Migas -->
144 .migas-portlet {
145 display: none;
146 }
147 .portlet-asset-publisher .migas-portlet {
148 display: block;
149 }
150
151</style>
152
153<div id="contenidoImpresion" style="display: none"></div>
154
155<#-- Nueva línea gráfica para inmuebles, promociones y landing Proyecta -->
156<#assign esProyecta = "false" />
157<#if proyecta?? >
158 <#assign esProyecta = proyecta.data />
159 <#if proyecta.data=="1" >
160 <#assign esProyecta = "true" />
161 </#if>
162
163</#if>
164<#-- Fin: Nueva línea gráfica para inmuebles, promociones y landing Proyecta -->
165
166<#-- Nueva línea gráfica para inmuebles, promociones y landing Proyecta -->
167<#assign proyectaClass = "" />
168<#if (esProyecta?? && esProyecta == "true") >
169 <#assign proyectaClass = "proyecta" />
170</#if>
171<#-- Fin: Nueva línea gráfica para inmuebles, promociones y landing Proyecta -->
172
173<#-- SVH - PROY986 Lotes WOW -->
174<#assign idCampaWOW = propsUtil.get('id.campana.renta307')/>
175
176<section id="contenidoNoImpresion">
177 <div class="camino-migas">
178 <div class="container">
179
180 <#-- TAREAPROY- 281 - Dibuja tu zona -->
181 <#if (httpServletRequest.getSession().getAttribute("LIFERAY_SHARED_URL_MAPA")?? && httpServletRequest.getSession().getAttribute("LIFERAY_SHARED_TEXTO_MAPA")??
182 && httpServletRequest.getSession().getAttribute("LIFERAY_SHARED_NUM_TOTAL_RESULTS")??)>
183
184 <#assign textoMapaDibujado = httpServletRequest.getSession().getAttribute("LIFERAY_SHARED_TEXTO_MAPA")?string />
185 <#assign cantidadRefs = httpServletRequest.getSession().getAttribute("LIFERAY_SHARED_NUM_TOTAL_RESULTS") />
186 <#assign urlVolverMapa = httpServletRequest.getSession().getAttribute("LIFERAY_SHARED_URL_MAPA")?string />
187
188 <div class="texto-mapa-poligono">
189 <ul >
190 <li class="select-item" >
191 <a
192 title=""
193 href='${urlVolverMapa}'>${textoMapaDibujado}</a>
194 <span >${cantidadRefs}</span>
195 <li />
196 </ul>
197 </div>
198
199 <#else>
200 <div id="plantilla-inmueble-migas-div" ></div>
201 <#-- TAREAPROY-311 - Subheader - Anterior | Siguiente MQ -->
202 </#if>
203 <div id="enlaces-anterior-siguiente-div" >
204 <ul>
205 <#if enlaceAnterior?? && enlaceAnterior !="" && enlaceAnterior!="null">
206 <li class="anterior">
207 <a onclick="enlaceInmueble('${enlaceAnterior}');" title="${languageUtil.get(locale, "detalle-inmueble-anterior")}">
208 <img src="/servihabitat-retail-theme/images/arrow-prev.svg" />
209 <span>${languageUtil.get(locale, "detalle-inmueble-anterior")}</span>
210 </a>
211 </li>
212 </#if>
213 <#if enlaceSiguiente?? && enlaceSiguiente !="" && enlaceSiguiente!="null">
214 <li class="siguiente">
215 <a onclick="enlaceInmueble('${enlaceSiguiente}');" title="${languageUtil.get(locale, "detalle-inmueble-siguiente")}">
216 <span>${languageUtil.get(locale, "detalle-inmueble-siguiente")}</span>
217 <img src="/servihabitat-retail-theme/images/arrow-next.svg" />
218 </a>
219 </li>
220 </#if>
221 </ul>
222 </div>
223 <#-- /TAREAPROY-311 - Subheader - Anterior | Siguiente MQ -->
224 </div>
225 </div>
226
227 <article id="product_detail" class="bk_article">
228 <#attempt>
229 <#assign h1_class = "address-no-map" />
230
231 <#assign ja = journalArticleLS.getArticle(getterUtil.getLong(groupId),getterUtil.getString(.vars['reserved-article-id'].data))/>
232 <#assign entry = assetEntryLS.getEntry("com.liferay.portlet.journal.model.JournalArticle", ja.resourcePrimKey) />
233
234 <#-- Propiedades -->
235 <#assign key_pref=propsUtil.get("servihabitat.tipologia.content.title.preffix") />
236 <#assign tipoOperacion = getTipoOperacion()?lower_case >
237 <#if tipoOperacion?lower_case==languageUtil.get(locale, "home-filtro-compra")?lower_case >
238 <#assign isAlquiler = false >
239 <#else>
240 <#assign isAlquiler = true >
241 </#if>
242 <#assign videoList = [] />
243 <#if video?has_content && video.getData()?has_content >
244 <#list video.getSiblings() as curr_video>
245 <#if (ServihabitatRetailUtils.getLabel(curr_video.getData(), "")?trim!="") >
246 <#assign videoList = videoList + [curr_video.getData()] />
247 </#if>
248 </#list>
249 </#if>
250
251 <#-- puede llegar 1 o true depende de si es impor o control panel -->
252 <#assign esExclusive = "false" />
253 <#if exclusive?? >
254 <#assign esExclusive = exclusive.data />
255 <#if (esExclusive?? && esExclusive == "1") >
256 <#assign esExclusive = "true" />
257 </#if>
258 </#if>
259
260 <#-- Categorias del inmueble -->
261 <#assign assetCategoryInfoArr = ServihabitatRetailUtils.getAssetCategoryInfo(entry.entryId, locale) />
262 <#assign mode = "" />
263 <#assign mode_also = "" />
264 <#assign mode_tmp = assetCategoryInfoArr[ServihabitatRetailUtils.ASSET_CATEGORY_INFO_POS_MODE]?lower_case />
265 <#assign tipologia = assetCategoryInfoArr[ServihabitatRetailUtils.ASSET_CATEGORY_INFO_POS_TIPOLOGIA] />
266 <#assign subtipologia = assetCategoryInfoArr[ServihabitatRetailUtils.ASSET_CATEGORY_INFO_POS_SUBTIPOLOGIA] />
267 <#assign nombreCategoria = assetCategoryInfoArr[ServihabitatRetailUtils.ASSET_CATEGORY_INFO_POS_NOMBRE_CATEGORIA] />
268 <#assign nombreEstado = assetCategoryInfoArr[ServihabitatRetailUtils.ASSET_CATEGORY_INFO_POS_NOMBRE_ESTADO] />
269 <#assign tipoSubtipoNormalizedES = assetCategoryInfoArr[ServihabitatRetailUtils.ASSET_CATEGORY_INFO_POS_TIPO_NORMALIZED_ES]?lower_case />
270
271 <#-- Mode: Ojo que el inmueble puede tener varios tipos de operación, y este debe ajustarse al de la URL -->
272 <#if (mode_tmp?string?contains(","))>
273 <#assign modeArr = mode_tmp?split(",") />
274 <#list modeArr as curr_mode>
275 <#if (curr_mode?lower_case == tipoOperacion)>
276 <#assign mode = curr_mode />
277 </#if>
278 </#list>
279 <#else>
280 <#assign mode = mode_tmp />
281 </#if>
282
283 <#-- Mode_also: También disponible en venta/alquiler -->
284 <#if tipoOperacion==languageUtil.get(locale, "home-filtro-compra")?lower_case >
285 <#if (tipoInmuebleA?has_content && tipoInmuebleA.getSiblings()?has_content && ServihabitatRetailUtils.getLabel(tipoInmuebleA.getSiblings()[0].getData(), "")!="") >
286 <#assign mode_also = languageUtil.get(locale, "home-filtro-alquiler")?lower_case />
287 </#if>
288 <#else>
289 <#if (tipoInmueble?has_content && tipoInmueble.getSiblings()?has_content && ServihabitatRetailUtils.getLabel(tipoInmueble.getSiblings()[0].getData(), "")!="") >
290 <#assign mode_also = languageUtil.get(locale, "home-filtro-compra")?lower_case />
291 </#if>
292 </#if>
293
294 <#-- Back URL -->
295 <#assign backURL = "" />
296 <#if (serviceContext.getRequest().getParameter('urlBack_'+localeUtil.toLanguageId(locale))?? || serviceContext.getRequest().getAttribute(ServihabitatRetailUtils.SHARED_URL_BACK+localeUtil.toLanguageId(locale))??) >
297 <#if (serviceContext.getRequest().getParameter('urlBack_'+localeUtil.toLanguageId(locale))??) >
298 <#assign backURL = serviceContext.getRequest().getParameter('urlBack_'+localeUtil.toLanguageId(locale))/>
299 <#else>
300 <#assign backURL = serviceContext.getRequest().getAttribute(ServihabitatRetailUtils.SHARED_URL_BACK+localeUtil.toLanguageId(locale))/>
301 </#if>
302 </#if>
303
304 <#-- Nombre en i18n de la categoria-subcategoria que se busca -->
305 <#if serviceContext.getRequest().getParameter('paramType')?has_content >
306 <#assign search_tipo = serviceContext.getRequest().getParameter('paramType')?html!'' />
307 <#else>
308 <#assign search_tipo = '' />
309 </#if>
310
311 <#-- Nombre en i18n de la categoria que se busca -->
312 <#assign search_tipo_indexOf_hyphen = search_tipo?index_of("-") />
313 <#if search_tipo_indexOf_hyphen == -1 >
314 <#assign searched_category_name = search_tipo />
315 <#else>
316 <#assign searched_category_name = search_tipo?substring(0, search_tipo_indexOf_hyphen)?lower_case />
317 </#if>
318
319 <#-- Actualización de la categoria para comparar -->
320 <#assign keys = map.keySet()>
321 <#list keys as key>
322 <#if (key != searched_category_name) >
323 <#if searched_category_name == languageUtil.get(locale, 'categoria-tipo-'+key) >
324 <#assign searched_category_name = key />
325 </#if>
326 </#if>
327 </#list>
328
329 <#if tipoOperacion==languageUtil.get(locale, "home-filtro-compra")?lower_case >
330 <#if (tipoInmueble?has_content && tipoInmueble.getSiblings()?has_content && ServihabitatRetailUtils.getLabel(tipoInmueble.getSiblings()[0].getData(), "")!="") >
331 <#list tipoInmueble.getSiblings() as cur_tipoInmueble>
332
333 <#assign tipoInmuebleDesde = cur_tipoInmueble.getData() />
334 <#if tipoInmuebleDesde?replace(" ","")?lower_case == searched_category_name?lower_case ||
335 (searched_category_name == ServihabitatRetailUtils.CATEGORY_NAME_SUELO?lower_case && tipoInmuebleDesde == ServihabitatRetailUtils.CATEGORY_NAME_TERRENO)>
336 <#if cur_tipoInmueble.precioDesde?? >
337 <#assign precio_desde = ServihabitatRetailUtils.getLabelNumber(cur_tipoInmueble.precioDesde.getData(), "0")?replace(".","")?number />
338 </#if>
339 <#if cur_tipoInmueble.campanaTipo?? && cur_tipoInmueble.campanaTipo.getData()?? && cur_tipoInmueble.campanaTipo.getData()!="null">
340 <#assign refCampana = cur_tipoInmueble.campanaTipo.getData() />
341 <#if cur_tipoInmueble.campanaTipo.nombreTipo?? >
342 <#assign nombreCampana = cur_tipoInmueble.campanaTipo.nombreTipo.getData() />
343 </#if>
344 <#if cur_tipoInmueble.campanaTipo.friendlyURLTipo?? >
345 <#assign urlCampana = cur_tipoInmueble.campanaTipo.friendlyURLTipo.getData() />
346 </#if>
347 <#if cur_tipoInmueble.campanaTipo.logoURLTipo?? >
348 <#assign logoCampanaURL = cur_tipoInmueble.campanaTipo.logoURLTipo.getData() />
349 </#if>
350 </#if>
351 </#if>
352 </#list>
353 </#if>
354 <#else>
355 <#if (tipoInmuebleA?has_content && tipoInmuebleA.getSiblings()?has_content && ServihabitatRetailUtils.getLabel(tipoInmuebleA.getSiblings()[0].getData(), "")!="") >
356 <#list tipoInmuebleA.getSiblings() as cur_tipoInmuebleA>
357 <#assign tipoInmuebleDesde = cur_tipoInmuebleA.getData() />
358 <#if tipoInmuebleDesde?lower_case == searched_category_name?lower_case ||
359 (searched_category_name == ServihabitatRetailUtils.CATEGORY_NAME_SUELO?lower_case && tipoInmuebleDesde == ServihabitatRetailUtils.CATEGORY_NAME_TERRENO)>
360 <#if cur_tipoInmuebleA.precioDesdeA?? >
361 <#assign precio_desde = ServihabitatRetailUtils.getLabelNumber(cur_tipoInmuebleA.precioDesdeA.getData(), "0")?replace(".","")?number />
362 </#if>
363 <#if cur_tipoInmuebleA.campanaTipoA?? && cur_tipoInmuebleA.campanaTipoA.getData()?? && cur_tipoInmuebleA.campanaTipoA.getData()!="null">
364 <#assign refCampana = cur_tipoInmuebleA.campanaTipoA.getData() />
365 <#if cur_tipoInmuebleA.campanaTipoA.nombreTipoA?? >
366 <#assign nombreCampana = cur_tipoInmuebleA.campanaTipoA.nombreTipoA.getData() />
367 </#if>
368 <#if cur_tipoInmuebleA.campanaTipoA.friendlyURLTipoA?? >
369 <#assign urlCampana = cur_tipoInmuebleA.campanaTipoA.friendlyURLTipoA.getData() />
370 </#if>
371 <#if cur_tipoInmuebleA.campanaTipoA.logoURLTipoA?? >
372 <#assign logoCampanaURL = cur_tipoInmuebleA.campanaTipoA.logoURLTipoA.getData() />
373 </#if>
374 </#if>
375 </#if>
376 </#list>
377 </#if>
378 </#if>
379 <#-- Paginación general -->
380 <#assign paginable = false />
381 <#if (httpServletRequest.getParameter('index')?? || (httpServletRequest.getAttribute(ServihabitatRetailUtils.SHARED_INDEX)?? && httpServletRequest.getAttribute(ServihabitatRetailUtils.SHARED_INDEX)!="")) >
382 <#if (httpServletRequest.getAttribute(ServihabitatRetailUtils.SHARED_INDEX)?? ) >
383 <#assign index = httpServletRequest.getAttribute(ServihabitatRetailUtils.SHARED_INDEX)?number />
384 <#else>
385 <#assign index = httpServletRequest.getParameter('index')?number />
386 </#if>
387 <#if (httpServletRequest.getSession()?? && httpServletRequest.getSession().getAttribute(ServihabitatRetailUtils.SHARED_TOTAL_SEARCHED)??) >
388 <#assign total = httpServletRequest.getSession().getAttribute(ServihabitatRetailUtils.SHARED_TOTAL_SEARCHED)?number />
389 <#assign paginable = (index?? && total?? && index>0 && total>=index) />
390 </#if>
391 </#if>
392
393 <#-- Fotos-->
394 <#assign urlImgPrincipal = imagenesLSU.getImagenPpalBD('${referencia.getData()}')/>
395 <#assign urlImg360 = imagenesLSU.getImagen360('${referencia.getData()}')/>
396 <#assign urlImgsGif = imagenesLSU.getImagenesGIF('${referencia.getData()}')/>
397 <#assign urlImg3D = imagenesLSU.getImagen3D('${referencia.getData()}')/>
398
399 <#-- acadaval 28/11/2017: SVH-99975 Nueva línea gráfica para inmuebles, promociones y landing Exclusive -->
400 <#assign exclusiveClass = "" />
401 <#if (esExclusive?? && esExclusive == "true") >
402 <#assign exclusiveClass = "exclusive" />
403 </#if>
404 <#-- acadaval 28/11/2017 Fin: SVH-99975 Nueva línea gráfica para inmuebles, promociones y landing Exclusive -->
405
406 <#-- Solo se muestra la cabecera si hay url de vuelta-->
407 <#assign hideClass = "" />
408 <#if (backURL=="")>
409 <#assign hideClass = "hide" />
410 </#if>
411 <#assign favCategory = languageUtil.get(locale, searched_category_name?lower_case+"-singular")?lower_case />
412
413 <div id="back_link" style="display:none" class="${hideClass}">
414
415 <#assign paramLocationsFromURL = ""/>
416 <#assign errorInText = "false"/>
417 <#assign header_title_tipologia = ServihabitatRetailUtils.getLabel(searched_category_name, "") />
418 <#if header_title_tipologia!='' >
419 <#if (map.get(searched_category_name)?has_content ) >
420 <#-- <#assign header_title_tipologia = languageUtil.get(locale, searched_category_name?lower_case+"-singular")?lower_case /> -->
421 <#assign header_title_tipologia = languageUtil.get(locale, searched_category_name?lower_case+"-plural")?lower_case />
422 <#else>
423 <#assign header_title_tipologia = languageUtil.get(locale, "servihabitat-inmuebles")?lower_case />
424 </#if>
425 <#else>
426 <#assign header_title_tipologia = languageUtil.get(locale, "servihabitat-inmuebles")?lower_case />
427 </#if>
428
429 <#assign initBackURL = backURL/>
430
431 <#if (initBackURL?has_content && initBackURL?string?contains("?lc=")) >
432 <#attempt>
433 <#--<#assign strTipoInmueble = ServihabitatRetailUtils.getTipoInmueble(backURL, locale)/>-->
434 <#assign paramLCPos = initBackURL?index_of("?lc=")/>
435 <#assign paramAmpersandPos = initBackURL?index_of("&",paramLCPos)/>
436
437 <#if (paramAmpersandPos > paramLCPos) >
438 <#assign initBackURL = initBackURL[initBackURL?index_of("?lc=")+4..initBackURL?index_of("&",paramLCPos)]/>
439 <#else>
440 <#assign initBackURL = initBackURL[initBackURL?index_of("?lc=")+4..]/>
441 </#if>
442
443 <#assign initBackURLList = initBackURL?split(',') />
444
445 <#list initBackURLList as locationFromURL >
446 <#if locationFromURL!='' >
447 <#if (locationFromURL?split('-')?size == 3) >
448 <#assign ubicacionName = ubicacionLS.getPoblacionName(locationFromURL) />
449 <#elseif (locationFromURL?split('-')?size == 2)>
450 <#assign ubicacionName = ubicacionLS.getComarcaName(locationFromURL) />
451 <#else>
452 <#assign ubicacionName = ubicacionLS.getProvinciaName(locationFromURL) />
453 </#if>
454
455 <#assign paramLocationsFromURL = paramLocationsFromURL + ubicacionName?capitalize />
456 <#if locationFromURL_has_next>
457 <#assign paramLocationsFromURL = paramLocationsFromURL + ", "/>
458 </#if>
459
460 </#if>
461 </#list>
462
463 <a href="javascript:navegacionInmuebles ('${backURL}')" class="sh_icon-arrow-l back" title="">
464 <span>
465 ${languageUtil.format(locale, "inmueble-back-x-en-x",
466 [ServihabitatRetailUtils.getLabel(header_title_tipologia?capitalize, languageUtil.get(locale, "detalle-edificio-unknown")),
467 ServihabitatRetailUtils.getLabel(paramLocationsFromURL, languageUtil.get(locale, "detalle-edificio-unknown"))])}
468 </span>
469 </a>
470
471 <#recover>
472 <#assign errorInText = "true"/>
473 </#attempt>
474
475 <#elseif (initBackURL?has_content)>
476 <#attempt>
477 <#--<#assign strTipoInmueble = ServihabitatRetailUtils.getTipoInmueble(backURL, locale)/>-->
478 <#assign initBackURLParts = initBackURL?split('/')/>
479 <#if initBackURLParts?? && initBackURLParts[4]?? >
480 <#assign initBackURL = initBackURLParts[4]/>
481 <#assign paramAmpersandPos = initBackURL?index_of("&")/>
482 <#if (paramAmpersandPos > -1) >
483 <#assign initBackURL = initBackURL[0..initBackURL?index_of("&")]/>
484 </#if>
485
486 <#if (initBackURL?split('-')?size == 3) >
487 <#assign ubicacionName = ubicacionLS.getPoblacionName(initBackURL) />
488 <#elseif (initBackURL?split('-')?size == 2)>
489 <#assign ubicacionName = ubicacionLS.getComarcaName(initBackURL) />
490 <#else>
491 <#assign ubicacionName = ubicacionLS.getProvinciaName(initBackURL) />
492 </#if>
493
494 <#assign paramLocationsFromURL = paramLocationsFromURL + ubicacionName?capitalize />
495 <a href="javascript:navegacionInmuebles ('${backURL}')" class="sh_icon-arrow-l back" title="">
496 <span>
497 ${languageUtil.format(locale, "inmueble-back-x-en-x",
498 [ServihabitatRetailUtils.getLabel(header_title_tipologia?capitalize, languageUtil.get(locale, "detalle-edificio-unknown")),
499 ServihabitatRetailUtils.getLabel(paramLocationsFromURL, languageUtil.get(locale, "detalle-edificio-unknown"))])}
500 </span>
501 </a>
502 <#else>
503 <#assign errorInText = "true"/>
504 </#if>
505
506 <#recover>
507 <#assign errorInText = "true"/>
508 </#attempt>
509 <#else>
510 <a href="javascript:navegacionInmuebles ('${backURL}')" class="sh_icon-arrow-l back" title="">
511 <span>
512 <@liferay.language key="visor-de-contenidos-volver" />
513 </span>
514 </a>
515 </#if>
516
517 <#if (errorInText?has_content && errorInText=="true")>
518 <a href="javascript:navegacionInmuebles ('${backURL}')" class="sh_icon-arrow-l back" title="">
519 <span>
520 <@liferay.language key="visor-de-contenidos-volver" />
521 </span>
522 </a>
523 </#if>
524
525 </div>
526
527 <header id="detail_header" class="hidden-xs affix-top plantilla-promo class-promo ${proyectaClass} ${exclusiveClass}">
528 <div>
529 <div class="container">
530
531 <#if !(esProyecta?? && esProyecta == "true") >
532
533 <#if (esExclusive?? && esExclusive == "true") >
534 <img class="exclusive-logo" src="/servihabitat-retail-theme/images/exclusive-logo-text.svg" />
535 </#if>
536 <p class="promo-comercial"><@liferay.language key="promocion-comercial" /></p>
537
538 <#-- UX - INICIO Caja popover superior -->
539 <div id="popoverInmuebles">
540 ${popoverUX}
541 </div>
542
543 <#-- UX - FIN Caja popover superior -->
544 </#if>
545
546 <header id="product_header_affix">
547
548 <div class="title-price">
549 <p class="ficha-h1">
550 <#assign header_title_tipologia = ServihabitatRetailUtils.getLabel(searched_category_name, "") />
551 <#if header_title_tipologia!='' >
552 <#if map.get(searched_category_name)?? && (map.get(searched_category_name)?string?split(',')?size ==1) >
553 <#assign header_title_tipologia = languageUtil.get(locale, searched_category_name?lower_case+"-singular")?lower_case />
554 <#else>
555 <#assign header_title_tipologia = languageUtil.get(locale, searched_category_name?lower_case+"-plural")?lower_case />
556 </#if>
557 <#else>
558 <#assign header_title_tipologia = languageUtil.get(locale, "servihabitat-inmuebles")?lower_case />
559 </#if>
560
561 <#if (header_title_tipologia == languageUtil.get(locale, "obraparada-plural")?lower_case || header_title_tipologia == languageUtil.get(locale, "obraparada-singular")?lower_case)>
562 ${languageUtil.format(locale, "inmueble-promo-comercial-header-title-wip",
563 [header_title_tipologia,
564 tipoOperacion,
565 ServihabitatRetailUtils.getLabel(direccion.getData()?lower_case, languageUtil.get(locale, "detalle-edificio-unknown")),
566 ServihabitatRetailUtils.getLabel(provincia.getData()?lower_case, languageUtil.get(locale, "detalle-edificio-unknown"))])}
567 <#else>
568 ${languageUtil.format(locale, "inmueble-promo-comercial-header-title",
569 [header_title_tipologia,
570 tipoOperacion,
571 ServihabitatRetailUtils.getLabel(direccion.getData()?lower_case, languageUtil.get(locale, "detalle-edificio-unknown")),
572 ServihabitatRetailUtils.getLabel(provincia.getData()?lower_case, languageUtil.get(locale, "detalle-edificio-unknown"))])}
573 </#if>
574 </p>
575
576 <#if (esProyecta?? && esProyecta == "true") >
577 <p class="mobileShow"><@liferay.language key="detalle-inmueble-texto-promocion-plano" /></p>
578 <#else>
579 <#if (esExclusive?? && esExclusive == "true") >
580 <p class="mobileShow"><@liferay.language key="ficha-inmueble-titulo-promocion-comercial-exclusive" /></p>
581 <#else>
582 <p class="mobileShow"><@liferay.language key="promocion-comercial" /></p>
583 </#if>
584 </#if>
585
586 <#-- SVHSYGU2-24 UX - INICIO Caja popover sticky bar -->
587 <div id="popoverStickyBarInmuebles"> <#-- Deberia duplicarse los estilos de popoverInmuebles a uno nuevo popoverStickyBarInmuebles -->
588 ${popoverUX}
589 </div>
590 <#-- SVHSYGU2-24 UX - FIN Caja popover sticky bar -->
591
592 <p class="amount">
593 <#assign precio = ServihabitatRetailUtils.getLabelNumber(precio_desde?string, "-1")?replace(".","")?number />
594
595 <#if precio == 0 && precioCero?? && precioCero.data == "true">
596 <span class="price mostrarPrecioDesktop"><@liferay.language key="inmueble-precio-a-consultar-desktop" /></span>
597
598 <#else>
599 <span class="desde-price"><@liferay.language key="desde" /></span>
600 <span class="price">${ServihabitatRetailUtils.getLabelNumber(precio_desde?string, languageUtil.get(locale, "detalle-edificio-unknown"))}€</span><br>
601 </#if>
602 </p>
603
604 <#if ( httpServletRequest.getSession().getAttribute(ServihabitatRetailUtils.SHARED_CONTACTADO)?? && httpServletRequest.getSession().getAttribute(ServihabitatRetailUtils.SHARED_CONTACTADO)!="") >
605 <#assign yaHasContactadoMsgMobile = httpServletRequest.getSession().getAttribute(ServihabitatRetailUtils.SHARED_CONTACTADO) />
606 <div class="hascontactado-header-mobile">
607 <span class="fa fa-phone"></span>
608 <span class="hascontactado-text"><@liferay.language key="texto-inmueble-contactado-alas" />${yaHasContactadoMsgMobile}</span>
609 </div>
610 </#if>
611 </div>
612
613 <#-- SVHSYGU2-24 UX - INICIO Caja popover sticky bar -->
614 <div class="guardar-favorito"> <#-- SVHSYGU2-24 UX - Crear estilo guardar-favorito-sticky-bar -->
615 <a href="javascript:void(0);" id="${referencia.getData()}" title='<@liferay.language key="Favorito-icon-title" />' class="sh_icon-heart save-property" onclick="gestionarFavoritoFicha('${referencia.getData()}','${favCategory}','${tipoOperacion?lower_case}', this)"><span class="no-save-heart"><span class="visitasFavorito">${visitasFavorito} </span> <@liferay.language key="ficha-inmueble-favorito-interesados" /></span><span class="save-heart"><span class="visitasFavorito">${visitasFavorito} </span> <@liferay.language key="ficha-inmueble-favorito-interesados" /></span></a>
616 </div>
617
618 <#-- SVHSYGU2-24 UX - FIN Caja popover sticky bar -->
619
620 <#-- TAREAPROY-311 - Subheader - Anterior | Siguiente MQ -->
621 <div id="enlaces-anterior-siguiente-div" >
622 <ul>
623 <#if enlaceAnterior?? && enlaceAnterior !="" && enlaceAnterior!="null">
624 <li class="anterior">
625 <a onclick="enlaceInmueble('${enlaceAnterior}');" title="${languageUtil.get(locale, "detalle-inmueble-anterior")}">
626 <img src="/servihabitat-retail-theme/images/arrow-prev-white.svg" />
627 <span>${languageUtil.get(locale, "detalle-inmueble-anterior")}</span>
628 </a>
629 </li>
630 </#if>
631 <#if enlaceSiguiente?? && enlaceSiguiente !="" && enlaceSiguiente!="null">
632 <li class="siguiente">
633 <a onclick="enlaceInmueble('${enlaceSiguiente}');" title="${languageUtil.get(locale, "detalle-inmueble-siguiente")}">
634 <span>${languageUtil.get(locale, "detalle-inmueble-siguiente")}</span>
635 <img src="/servihabitat-retail-theme/images/arrow-next-white.svg" />
636 </a>
637 </li>
638 </#if>
639 </ul>
640 </div>
641 <#-- /TAREAPROY-311 - Subheader - Anterior | Siguiente MQ -->
642
643 <#if popoverUX?has_content >
644
645 <#assign header_title_tipologia = ServihabitatRetailUtils.getLabel(searched_category_name, "") />
646 <#if header_title_tipologia!='' >
647 <#if map.get(searched_category_name)?? && (map.get(searched_category_name)?string?split(',')?size ==1) >
648 <#assign header_title_tipologia = languageUtil.get(locale, searched_category_name?lower_case+"-singular")?lower_case />
649 <#else>
650 <#assign header_title_tipologia = languageUtil.get(locale, searched_category_name?lower_case+"-plural")?lower_case />
651 </#if>
652 <#else>
653 <#assign header_title_tipologia = languageUtil.get(locale, "servihabitat-inmuebles")?lower_case />
654 </#if>
655 <script>
656 $(document).ready(
657 function() {
658
659 if(isMobile()){
660 if($('.popoverContent a.popoverId').length > 0){
661 <#assign numInmueblesPromo = ServihabitatRetailUtils.obtenerNumeroInmueblesPromo(mapUXInmuebles) />
662
663 <#assign messageCabeceraPopoverNumInmuebles = numInmueblesPromo + " " + languageUtil.get(locale, "popover-1-inmueble-disponible-popover") />
664 <#if (numInmueblesPromo > 1) >
665 <#assign messageCabeceraPopoverNumInmuebles = numInmueblesPromo + " " + languageUtil.get(locale, "popover-n-inmuebles-disponibles-popover") />
666 </#if>
667 <#assign messageCabeceraPopoverNumInmuebles = messageCabeceraPopoverNumInmuebles?js_string />
668
669 <#assign messageCabeceraPopoverUbicacionInmuebles = languageUtil.format(locale, "inmueble-back-promocion-de-x-en-x-en-x",
670 [header_title_tipologia,
671 ServihabitatRetailUtils.getLabel(tipoOperacion?lower_case, languageUtil.get(locale, "detalle-edificio-unknown")),
672 ServihabitatRetailUtils.getLabel(direccion.getData()?lower_case, languageUtil.get(locale, "detalle-edificio-unknown"))])/>
673 <#assign messageCabeceraPopoverUbicacionInmuebles = messageCabeceraPopoverUbicacionInmuebles?js_string />
674
675 $('.popoverContent a.popoverId').attr('data-content',$('.popoverContent a.popoverId').attr('data-content').replace(
676 "<p id='messageCabecera'></p>",
677 "<p id='messageCabecera'><span class='numInmuebles'>${messageCabeceraPopoverNumInmuebles}</span> ${languageUtil.get(locale, 'popover-en')} ${messageCabeceraPopoverUbicacionInmuebles} </p>"
678 ));
679
680 }
681
682 $('.popoverId').on('shown.bs.popover', function(e) {
683 $('#product_detail .detail_action.block-xs').hide();
684 $('.aui body').css('overflow', 'hidden');
685 $('#headerDiv').css('zIndex', 1000);
686 });
687 $('.popoverId').on('hidden.bs.popover', function(e) {
688 $('#product_detail .detail_action.block-xs').show();
689 $('.aui body').css('overflow', 'auto');
690 $('#headerDiv').css('zIndex', 12000);
691 });
692 }
693
694 if(!isSmaller(767)){
695 $('.popoverId').on('shown.bs.popover', function(e) {
696
697 if($("#popoverInmuebles #inmuebles").height()>250){
698
699 $('#popoverInmuebles .popover').css('height', '250');
700
701 $("#popoverInmuebles .popover-content").customScrollbar({
702 skin: "default-skin",
703 hScroll: false,
704 updateOnWindowResize: true
705 });
706 }
707 else {
708 $('#popoverInmuebles .popover').css('height', 'auto');
709 }
710
711 if($("#popoverStickyBarInmuebles #inmuebles").height()>250){
712
713 $('#popoverStickyBarInmuebles .popover').css('height', '250');
714
715 $("#popoverStickyBarInmuebles .popover-content").customScrollbar({
716 skin: "default-skin",
717 hScroll: false,
718 updateOnWindowResize: true
719 });
720 }
721 else {
722 $('#popoverStickyBarInmuebles .popover').css('height', 'auto');
723 }
724
725 });
726
727 }
728
729 //Cerrar popoverInmuebles al hacer scroll y aparecer affix
730 $('#detail_header').on('affix.bs.affix', function(){
731 if($('#popoverInmuebles .popover').length > 0){
732 $('#popoverInmuebles .popoverId').click();
733 }
734 });
735
736 $('#detail_header').on('affixed-top.bs.affix', function(){
737 if($('#popoverStickyBarInmuebles .popover').length > 0){
738 $('#popoverStickyBarInmuebles .popoverId').click();
739 }
740 });
741
742 });
743
744 </script>
745 </#if>
746 <#-- UX - FIN Caja popover superior -->
747
748 </header>
749 </div>
750 </div>
751 </header>
752
753 <#-- Proyecta Header -->
754 <#if (esProyecta?? && esProyecta == "true") >
755 <div class="especial-header ${proyectaClass}">
756 <div class="container">
757 <!--<img src="/servihabitat-retail-theme/images/proyecta-logo-detail.png" />-->
758 <!--<div class="proyectaCab">
759 <p class="titulo1"><@liferay.language key="parrilla.tag.proyecta.obranueva" /></p>
760 <p class="titulo2">Proyecta</p>
761 </div>-->
762
763 <#-- TAREAPROY-311 - Subheader - Anterior | Siguiente MQ -->
764 <p class="promo-comercial"><@liferay.language key="detalle-inmueble-texto-promocion-plano" /></p>
765 <#-- /TAREAPROY-311 - Subheader - Anterior | Siguiente MQ -->
766
767 <#-- UX - INICIO Caja popover superior -->
768 <div id="popoverInmuebles">
769 ${popoverUX}
770 </div>
771 <#if popoverUX?has_content >
772
773 <#assign header_title_tipologia = ServihabitatRetailUtils.getLabel(searched_category_name, "") />
774 <#if header_title_tipologia!='' >
775 <#if map.get(searched_category_name)?? && (map.get(searched_category_name)?string?split(',')?size ==1) >
776 <#assign header_title_tipologia = languageUtil.get(locale, searched_category_name?lower_case+"-singular")?lower_case />
777 <#else>
778 <#assign header_title_tipologia = languageUtil.get(locale, searched_category_name?lower_case+"-plural")?lower_case />
779 </#if>
780 <#else>
781 <#assign header_title_tipologia = languageUtil.get(locale, "servihabitat-inmuebles")?lower_case />
782 </#if>
783 <script>
784 $(document).ready(
785 function() {
786
787 if(isMobile()){
788 if($('#popoverContent a#popoverId').length > 0){
789 <#assign numInmueblesPromo = ServihabitatRetailUtils.obtenerNumeroInmueblesPromo(mapUXInmuebles) />
790
791 <#assign messageCabeceraPopoverNumInmuebles = numInmueblesPromo + " " + languageUtil.get(locale, "popover-1-inmueble-disponible-popover") />
792 <#if (numInmueblesPromo > 1) >
793 <#assign messageCabeceraPopoverNumInmuebles = numInmueblesPromo + " " + languageUtil.get(locale, "popover-n-inmuebles-disponibles-popover") />
794 </#if>
795 <#assign messageCabeceraPopoverNumInmuebles = messageCabeceraPopoverNumInmuebles?js_string />
796
797 <#assign messageCabeceraPopoverUbicacionInmuebles = languageUtil.format(locale, "inmueble-back-promocion-de-x-en-x-en-x",
798 [header_title_tipologia,
799 ServihabitatRetailUtils.getLabel(tipoOperacion?lower_case, languageUtil.get(locale, "detalle-edificio-unknown")),
800 ServihabitatRetailUtils.getLabel(direccion.getData()?lower_case, languageUtil.get(locale, "detalle-edificio-unknown"))])/>
801 <#assign messageCabeceraPopoverUbicacionInmuebles = messageCabeceraPopoverUbicacionInmuebles?js_string />
802
803 $('#popoverContent a#popoverId').attr('data-content',$('#popoverContent a#popoverId').attr('data-content').replace(
804 "<p id='messageCabecera'></p>",
805 "<p id='messageCabecera'><span class='numInmuebles'>${messageCabeceraPopoverNumInmuebles}</span> ${languageUtil.get(locale, 'popover-en')} ${messageCabeceraPopoverUbicacionInmuebles} </p>"
806 ));
807
808 }
809
810 $('#popoverId').on('shown.bs.popover', function(e) {
811 $('#product_detail .detail_action.block-xs').hide();
812 $('.aui body').css('overflow', 'hidden');
813 });
814 $('#popoverId').on('hidden.bs.popover', function(e) {
815 $('#product_detail .detail_action.block-xs').show();
816 $('.aui body').css('overflow', 'auto');
817 });
818 }
819
820 if(!isSmaller(767)){
821 $('#popoverId').on('shown.bs.popover', function(e) {
822
823 if($("#popoverInmuebles #inmuebles").height()>250){
824
825 $('#popoverInmuebles .popover').css('height', '250');
826
827 $("#popoverInmuebles .popover-content").customScrollbar({
828 skin: "default-skin",
829 hScroll: false,
830 updateOnWindowResize: true
831 });
832 }
833 else {
834 $('#popoverInmuebles .popover').css('height', 'auto');
835 }
836 });
837
838 }
839
840 //Cerrar popoverInmuebles al hacer scroll y aparecer affix
841 $('#detail_header').on('affix.bs.affix', function(){
842 if($('#popoverInmuebles .popover').length > 0){
843 $('#popoverId').click();
844 }
845 });
846
847
848 });
849
850 </script>
851 </#if>
852 <#-- UX - FIN Caja popover superior -->
853
854
855 </div>
856 </div>
857 </#if>
858
859 <div>
860 <div>
861 <div>
862 <div class="container search-container-xs ${exclusiveClass}">
863
864 <div id="cabecera_impresion" class="soloImpresion cabecera_impresion">
865 <img id="retailLogo_impresion" src="" class="soloImpresion"/>
866 <#if nombreEstado!='' >
867 <span class="type soloImpresion">${ServihabitatRetailUtils.getLabel(nombreEstado, languageUtil.get(locale, "detalle-edificio-unknown"))}</span>
868 </#if>
869 <span id="fecha-actualizacion_impresion" class="soloImpresion"></span>
870 <p class="pull-left ${h1_class} soloImpresion">
871 ${languageUtil.format(locale, "inmueble-promo-comercial-header-title",
872 [header_title_tipologia,
873 tipoOperacion,
874 ServihabitatRetailUtils.getLabel(direccion.getData()?lower_case, languageUtil.get(locale, "detalle-edificio-unknown")),
875 ServihabitatRetailUtils.getLabel(provincia.getData()?lower_case, languageUtil.get(locale, "detalle-edificio-unknown"))])}
876 </p>
877 </div>
878
879 </div>
880
881 <#-- <#if campana?has_content && campana.getData()?has_content || campanaA?has_content && campanaA.getData()?has_content > -->
882 <#if logoCampanaURL?? && logoCampanaURL!="" && logoCampanaURL!="null">
883 <#assign campana_class = "conCampana" />
884 </#if>
885 <#if ( httpServletRequest.getSession().getAttribute(ServihabitatRetailUtils.SHARED_CONTACTADO)?? && httpServletRequest.getSession().getAttribute(ServihabitatRetailUtils.SHARED_CONTACTADO)!="") >
886 <#assign yaHasContactadoMsgMobile = httpServletRequest.getSession().getAttribute(ServihabitatRetailUtils.SHARED_CONTACTADO) />
887 <div class="hascontactado-header-mobile">
888 <span class="fa fa-phone"></span><@liferay.language key="texto-inmueble-contactado-alas" />${yaHasContactadoMsgMobile}
889 </div>
890 </#if>
891
892 <#if enlaceListado?? && enlaceListado !="" && enlaceListado!="null">
893 <div id="botonVolverListado" class="botonVolverListado">
894 <a href='${enlaceListado}'>
895 <div id="botonVolverListadoDIV" class="sh_icon-arrow-l">
896 <span><@liferay.language key='detalle-inmueble-link-volver-listado' /></span>
897 </div>
898 </a>
899 </div>
900 <#elseif urlVolverMapa?? && urlVolverMapa!="" && urlVolverMapa!="null">
901 <div id="botonVolverListado" class="botonVolverListado">
902 <a href='${urlVolverMapa}'>
903 <div id="botonVolverListadoDIV" class="sh_icon-arrow-l">
904 <span><@liferay.language key='detalle-inmueble-link-volver-listado' /></span>
905 </div>
906 </a>
907 </div>
908
909 <#else>
910 <#if enlaceListadoOriginal?? && enlaceListadoOriginal !="" && enlaceListadoOriginal!="null">
911 <div id="botonVolverListado" class="botonVolverListado">
912 <a href='${enlaceListadoOriginal}'>
913 <div id="botonVolverListadoDIV" class="sh_icon-arrow-l">
914 <span><@liferay.language key='detalle-inmueble-link-volver-listado' /></span>
915 </div>
916 </a>
917 </div>
918 </#if>
919 </#if>
920
921 <div class="compartir-redes mobileShow">
922 <a href="javascript:void(0);" title='<@liferay.language key="compartir" />' class="compartirRedesClass2 share-property"><@liferay.language key="compartir" /></a><div id="compartirRedesDivMobile"></div>
923 </div>
924
925 <section id="detail_description">
926 <div class="container search-container-xs">
927
928 <div class="container-body">
929 <div class="container-floatLeft">
930
931 <div class="box detail">
932 <div id='owl-container-${ServihabitatRetailUtils.getLabel(referencia.getData(), languageUtil.get(locale, "detalle-edificio-unknown"))}' class="owl-container noImpresion">
933 <div id='owl-inmueble-${ServihabitatRetailUtils.getLabel(referencia.getData(), languageUtil.get(locale, "detalle-edificio-unknown"))}-pagination' class='owl-overlay-pagination opacity-on-hover view-property-photos' title='<@liferay.language key="ver-fotos" />'>
934 <div class="contador">
935 <span class="current-slide"></span>/<span class="total-slides"></span>
936 </div>
937 </div>
938 <#-- pdiez 10/11/2020 Nueva botonera media -->
939 <div class="botonera-media">
940 <#if urlImg360?? && urlImg360!="">
941 <#assign link360 = propsUtil.get('imagen360.url')/>
942 <#if urlImg3D?? && urlImg3D!="" ||videoList?has_content >
943 <a href="javascript:void(0);" class="vista360 item-view-360 moreElements" onclick="window.open('${link360}${urlImg360}', '_blank', 'location=yes,toolbar=yes,resizable=yes,scrollbars=yes,status=yes,width=1024,height=768');" >360</a>
944
945 <#else>
946 <a href="javascript:void(0);" class="vista360 item-view-360" onclick="window.open('${link360}${urlImg360}', '_blank', 'location=yes,toolbar=yes,resizable=yes,scrollbars=yes,status=yes,width=1024,height=768');" >360</a>
947 </#if>
948 </#if>
949 <div class="classPlano noVisible" style="display: none;">
950 <a id="idPlano" href="javascript:void(0);" class="vistaplano item-view-360"><@liferay.language key="plano" /></a>
951 </div>
952 <!-- Tour 3D -->
953 <#if urlImg3D?? && urlImg3D!="" >
954 <div class="contaactbox">
955 <a target="_blank" href="#" class="megawidget">
956 3D
957 </a>
958 </div>
959 </#if>
960 <#if (videoList?has_content) >
961 <#if (videoList?size>1) >
962 <div class="popup-video-gallery" title='<@liferay.language key="ver-videos" />'>
963 <#assign first_video = true >
964 <#list videoList as videoURL>
965 <#if (videoURL?has_content && videoURL!='') >
966 <a href="${videoURL}">
967 <#if (first_video == true ) >
968 <div class='owl-overlay-video opacity-on-hover'><@liferay.language key="ver-video-video" /></div>
969 </#if>
970 </a>
971 <#assign first_video = false >
972 </#if>
973 </#list>
974 </div>
975 <#elseif (videoList?size==1)>
976 <#list videoList as videoURL>
977 <#if (videoURL?has_content && videoURL!='') >
978 <a class="popup-youtube view-property-video" href="${videoURL}" title='<@liferay.language key="ver-video" />'>
979 <div class='owl-overlay-video opacity-on-hover'><@liferay.language key="ver-video-video" /></div>
980 </a>
981 </#if>
982 </#list>
983 </#if>
984 </#if>
985 </div>
986
987 <div class="features-list-fav visitas">
988 <span class="guardar-favorito pull-right">
989 <a href="javascript:void(0);" id="${referencia.getData()}" title='<@liferay.language key="Favorito-icon-title" />' class="sh_icon-heart save-property" onclick="gestionarFavoritoFicha('${referencia.getData()}','${favCategory}','${tipoOperacion?lower_case}', this, true)">
990 <span class="icon sh_icon-heart"></span>
991 <span class="icon sh_icon-heart_solid"></span>
992 <span class="no-save-heart"><span class="visitasFavorito">${visitasFavorito} </span></span>
993 <span class="save-heart"><span class="visitasFavorito">${visitasFavorito} </span></span>
994 </a>
995 </span>
996 </div>
997
998 <#-- Inicio cortina -->
999 <#assign showCortina = "false"/>
1000 <#if (httpServletRequest.getSession().getAttribute(ServihabitatRetailUtils.SHARED_SHOW_CORTINA)??) >
1001 <#assign showCortina = httpServletRequest.getSession().getAttribute(ServihabitatRetailUtils.SHARED_SHOW_CORTINA) />
1002 </#if>
1003
1004 <script src="/servihabitat-retail-theme/js/flexislider/jquery.flexslider-min.js${cacheVersion}"></script>
1005 <link rel="stylesheet" href="/servihabitat-retail-theme/css/flexislider/flexslider.min.css${cacheVersion}"/>
1006 <link rel="stylesheet" href="/servihabitat-retail-theme/css/flexislider/custom_flexslider.min.css${cacheVersion}"/>
1007
1008 <div id='flexslider-inmueble-${ServihabitatRetailUtils.getLabel(referencia.getData(), languageUtil.get(locale, "detalle-edificio-unknown"))}' class=''>
1009
1010 <#assign imgURLMAX = urlImgPrincipal?replace(('w'+anchoImgMin), ('w'+anchoImgMax))>
1011 <div id="flexslider" class="flexslider" style="width: 100%; height:100%;">
1012
1013 <ul class="slides" id="imageGallery">
1014 <#if showCortina == "true" >
1015 <#assign refCortina = httpServletRequest.getSession().getAttribute(ServihabitatRetailUtils.SHARED_REF_CORTINA) />
1016
1017 <script src="/servihabitat-retail-theme/js/flexislider/jquery.twentytwenty.min.js${cacheVersion}"></script>
1018 <script src="/servihabitat-retail-theme/js/flexislider/jquery.event.move.js${cacheVersion}"></script>
1019 <link rel="stylesheet" href="/servihabitat-retail-theme/css/flexislider/twentytwenty.min.css${cacheVersion}"/>
1020
1021 <#assign count = 0 />
1022 <#list refCortina as imagenesEstancia>
1023 <#assign containerId = "container_${count}" />
1024 <#if imagenesEstancia?? && imagenesEstancia[0]?? && imagenesEstancia[1]?? >
1025 <li>
1026 <div class="tooltip fade bottom" role="tooltip" id="decoTooltip">
1027 <div class="tooltip-arrow" style="left: 50%;"></div>
1028 <div class="tooltip-inner">
1029 <p><@liferay.language key="decoTooltip-mensaje" /></p>
1030 </div>
1031 </div>
1032
1033 <div id="${containerId}" class='twentytwenty-container' style="height: 439px;">
1034 <div class="deco-circle"></div>
1035 <img src="${imagenesEstancia[0]}" class="img-responsive" />
1036 <img src="${imagenesEstancia[1]}" class="img-responsive" />
1037 </div>
1038 </li>
1039 <#assign count = count + 1 />
1040 </#if>
1041 </#list>
1042 </#if>
1043
1044 <script>
1045 window.setTimeout(function(){$("#decoTooltip").addClass("in");}, 3000);
1046 </script>
1047
1048 <#-- Inicio Gif -->
1049 <#if urlImgsGif??>
1050 <#list urlImgsGif as imgGif>
1051 <li>
1052 <img src="${imgGif}" class="img-responsive image-slider-back" />
1053 <div class="image-slider-overlay"></div>
1054 <img src="${imgGif}" class="img-responsive image-slider gif-image" />
1055
1056 </li>
1057 </#list>
1058 </#if>
1059 <#-- Fin Gif -->
1060 <li>
1061 <img src="${imgURLMAX}" class="img-responsive image-slider-back" />
1062 <div class="image-slider-overlay"></div>
1063 <img src="${imgURLMAX}" class="img-responsive image-slider" />
1064
1065 </li>
1066 </ul>
1067 </div>
1068 </div>
1069 <#-- Fin Cortina -->
1070
1071 <#assign inmueblesJson = imagenesLSU.getImagenesBD('${referencia.getData()}')/>
1072
1073 <script>
1074
1075 function reescalarImagen(imgElement) {
1076 //console.log('---imgElement:' + imgElement.data('src'));
1077 var porcentajeReduccionImagenes = ${porcentajeReduccionImagenes};
1078 var divHeight = $( imgElement).parent().height();
1079 var divWidth = $( imgElement).parent().width();
1080 var imgHeight = imgElement.height();
1081 var imgWidth = imgElement.width();
1082 var heightPercentage = 100;
1083 var widthPercentage = 100;
1084 if (divHeight.length != 0 && imgHeight.length != 0) {
1085 heightPercentage = ((imgHeight/divHeight)*100).toFixed(2);
1086 }
1087 if (divWidth.length != 0 && imgWidth.length != 0) {
1088 widthPercentage = ((imgWidth/divWidth)*100).toFixed(2);
1089 }
1090 //console.log('divHeight:' + divHeight);
1091 //console.log('imgHeight:' + imgHeight);
1092 //console.log('divWidth:' + divWidth);
1093 //console.log('imgWidth:' + imgWidth);
1094 //console.log('heightPercentage:' + heightPercentage);
1095 //console.log('widthPercentage:' + widthPercentage);
1096 var heightPercentageDifference = 100 - heightPercentage;
1097 var widthPercentageDifference = 100 - widthPercentage;
1098 //console.log('heightPercentageDifference:' + heightPercentageDifference);
1099 //console.log('widthPercentageDifference:' + widthPercentageDifference);
1100
1101 //console.log('( heightPercentageDifference >0 && heightPercentageDifference <= porcentajeReduccionImagenes):' + ( heightPercentageDifference >0 && heightPercentageDifference <= porcentajeReduccionImagenes));
1102 //console.log('( widthPercentageDifference >0 && widthPercentageDifference <= porcentajeReduccionImagenes):' + ( widthPercentageDifference >0 && widthPercentageDifference <= porcentajeReduccionImagenes));
1103 if( ( heightPercentageDifference >0 && heightPercentageDifference <= porcentajeReduccionImagenes)
1104 || (widthPercentageDifference >0 && widthPercentageDifference <=porcentajeReduccionImagenes) ){
1105 //console.log('QQQQQQ');
1106 var jj = ( heightPercentageDifference >0 && heightPercentageDifference <= porcentajeReduccionImagenes) && heightPercentageDifference < widthPercentageDifference;
1107 var jj2= ( widthPercentageDifference >0 && widthPercentageDifference <= porcentajeReduccionImagenes) && widthPercentageDifference < heightPercentageDifference;
1108 //console.log('1------------' + jj);
1109 //console.log('2------------' + jj2);
1110
1111 if(( heightPercentageDifference >0 && heightPercentageDifference <= porcentajeReduccionImagenes) ){
1112 //console.log('QQQQQQ---------->ajustarHeight');
1113 $(imgElement).addClass("ajustarHeight");
1114 }else if(( widthPercentageDifference >0 && widthPercentageDifference <= porcentajeReduccionImagenes) ){
1115 //console.log('QQQQQQ---------->ajustarWidth');
1116 $(imgElement).addClass("ajustarWidth");
1117 }
1118
1119 }
1120
1121 }
1122
1123 $('#flexslider').flexslider({
1124 animation: "fade",
1125 slideshow: false,
1126 controlNav: false,
1127 animationLoop: true,
1128 start: function(slider) {
1129
1130 var indexPlano = '';
1131
1132 try{
1133 var inmueblesJSONArr = JSON.parse('${inmueblesJson}').imagenesInmuebles;
1134 for(var i=0; i<inmueblesJSONArr.length; i++){
1135 var inmuebleJSON = inmueblesJSONArr[i];
1136 for(var ref in inmuebleJSON){
1137 var imagenesInmuebleArr = inmuebleJSON[ref];
1138 var imgGalleryDivId = 'imageGallery';
1139 var new_LiContent = '';
1140 for(var j=1; j<imagenesInmuebleArr.length; j++){
1141 try{
1142 var imagenJSON = imagenesInmuebleArr[j];
1143 //console.log("imagenJSON.url" + imagenJSON.url);
1144 if (imagenJSON.tipo == '018' && indexPlano == '') {
1145 indexPlano = j;
1146 }
1147 var imgURLMAX=imagenJSON.url.replace("w${anchoImgMin}-h","w${anchoImgMax}-h");
1148 new_LiContent = '<li style="display:block; opacity: 0;"><img data-src="'+imgURLMAX+'" class="lazySlider image-slider-back" /><div class="image-slider-overlay"></div><img data-src="'+imgURLMAX+'" class="lazySlider img-responsive image-slider" /></li>';
1149
1150 $('#flexslider').data('flexslider').addSlide(new_LiContent);
1151
1152 } catch(error2){
1153 console.log(error2);
1154 }
1155 }
1156 }
1157
1158 }
1159 if (indexPlano != '') {
1160
1161 $("#idPlano").attr("onclick","iraFotoPlano("+indexPlano+")");
1162 $('.classPlano').show(); $('.classPlano').removeClass("noVisible");
1163 $('.vista360').addClass("moreElements");
1164
1165 }
1166 } catch(error){
1167 //console.log(error);
1168 }
1169
1170 $('.total-slides').text(slider.count);
1171 $('.current-slide').text(slider.currentSlide+1);
1172
1173 $(slider)
1174 .find('img.lazySlider:eq(0)')
1175 .each(function() {
1176 var src = $(this).attr('data-src');
1177 $(this).attr('src', src).removeAttr('data-src');
1178 });
1179
1180 $(slider)
1181 .find('li.flex-active-slide img.img-responsive.image-slider')
1182 .each(function() {
1183 reescalarImagen($(this));
1184 });
1185
1186 },
1187 after: function(slider) {
1188 $('.total-slides').text(slider.count);
1189 $('.current-slide').text(slider.currentSlide+1);
1190
1191 },
1192 before: function(slider) { // Fires asynchronously with each slider animation
1193 var slides = slider.slides,
1194 index = slider.animatingTo,
1195 $slide = $(slides[index]),
1196 $img = $slide.find('img[data-src]'),
1197 current = index,
1198 nxt_slide = current + 1,
1199 prev_slide = current - 1;
1200
1201 $slide
1202 .parent()
1203 .find('img.lazySlider.img-responsive.image-slider:eq(' + current + '), img.lazySlider.img-responsive.image-slider:eq(' + prev_slide + '), img.lazySlider.img-responsive.image-slider:eq(' + nxt_slide + '),img.lazySlider.image-slider-back:eq(' + current + '), img.lazySlider.image-slider-back:eq(' + prev_slide + '), img.lazySlider.image-slider-back:eq(' + nxt_slide + ')')
1204 .each(function() {
1205 var src = $(this).attr('data-src');
1206 $(this).attr('src', src).removeAttr('data-src');
1207
1208 });
1209
1210 //console.log('--------:' + current - 1);
1211 $slide
1212 .parent()
1213 .find('img.lazySlider.img-responsive.image-slider:eq(' + (current - 1) + ')')
1214 .each(function() {
1215 var src = $(this).attr('src');
1216 //console.log('*********:' + src);
1217
1218 //console.log('0:' + JSON.stringify($(this)));
1219 //console.log('0.1:' + $(this).html());
1220 //console.log('0.2:' + $(this).parent());
1221 //console.log('1:' + $(this).parent('li').hasClass('flex-active-slide'));
1222 //console.log('2:' + $(this).hasClass('image-slider'));
1223 //console.log('3:' + !($(this).hasClass("ajustarHeight") || $(this).hasClass("ajustarWidth")));
1224
1225 if ( $(this).hasClass('image-slider') && !($(this).hasClass("ajustarHeight") || $(this).hasClass("ajustarWidth"))) {
1226 //console.log('4: reescalarImagen: ' + $(this).attr('src') );
1227 reescalarImagen($(this));
1228 }
1229 });
1230
1231 }
1232
1233 });
1234
1235 if ($('div[id^="container_"]').length) {
1236 $('div[id^="container_"]').imagesLoaded().always( function( instance ) {
1237 $('div[id^="container_"]').twentytwenty({no_overlay: true});
1238 $('.twentytwenty-handle').bind('mousemove',function(e){
1239 if (e.buttons & 1 || (e.buttons === undefined && e.which == 1)) {
1240 $('#decoTooltip').remove();
1241 $('.deco-circle').remove();
1242 scriviCookie("twentytwenty_cookie", "true", 10519200);
1243 }
1244 });
1245 $('.twentytwenty-handle').bind('touchmove',function(e){
1246 $('#decoTooltip').remove();
1247 $('.deco-circle').remove();
1248 scriviCookie("twentytwenty_cookie", "true", 10519200);
1249 });
1250 });
1251 }
1252
1253 </script>
1254
1255 </div>
1256 </div>
1257
1258 <#-- Compartir (redes sociales) -->
1259 <div class="box-campana-compartir">
1260
1261 <#-- SVHIP-6: PDF -->
1262 <script src="/servihabitat-retail-detalle-portlet/js/jspdf.min.js?${cacheVersion}"></script>
1263 <script src="/servihabitat-retail-detalle-portlet/js/pcpdf.js?${.now}"></script>
1264
1265 <div class="container-floatRight mobileShow">
1266 <div class="feature-info">
1267
1268 <#if logoCampanaURL?? && logoCampanaURL!="" && logoCampanaURL!="null" >
1269 <div class="campanas-aplicadas">
1270 <#if urlCampana!="" && urlCampana!="null" >
1271 <a target="_blank" href="${urlCampana}" class="noImpresion urlIconoCampanaLink">
1272 <img src="${logoCampanaURL}" class="detail-promo-campana-icon">
1273 </a>
1274 <#else>
1275 <img src="${logoCampanaURL}" class="detail-promo-campana-icon">
1276 </#if>
1277 <img class="campana-icon-popover" src="/servihabitat-retail-theme/images/info-popover.svg" tabindex="0"
1278 data-toggle="popover" data-trigger="focus" data-placement="bottom"
1279 data-html="true" data-content="
1280 <p class='ficha-h2'>${nombreCampana}</p>
1281 <span class='sh_icon-close'></span>
1282 <p id='descripcionCampana'></p>
1283 <a href='${urlCampana}' target='_blank'><@liferay.language key='oferta-concurrente-mas-informacion' /></a>
1284 ">
1285 </div>
1286 </#if>
1287
1288 <div class="amount-visitas">
1289 <p class="amount">
1290 <#assign precio = ServihabitatRetailUtils.getLabelNumber(precio_desde?string, "-1")?replace(".","")?number />
1291 <#if precio == 0 && precioCero?? && precioCero.data == "true">
1292
1293 <div class="precioConsultarDiv" tabindex="0" data-trigger="focus" data-toggle="popover" data-placement="left" data-html="true" data-content="<span href='javascript:void(0);' onclick='$('#popoverId').popover('hide');' class='sh_icon-close'></span><p>${languageUtil.get(locale, "detalle-inmueble-popover-precioConsultar")}</p>" data-original-title="" title="" class="precio-icon-popover">
1294 <img class="negociable-icon-popover" src="/servihabitat-retail-theme/images/info-popover-green.svg">
1295 <span class="price mostrarPrecioDesktop"><@liferay.language key="inmueble-precio-a-consultar-desktop" /></span>
1296
1297 </div>
1298
1299 <#else>
1300 <span class="desde-price"><@liferay.language key="desde" /></span>
1301 <span class="price">${ServihabitatRetailUtils.getLabelNumber(precio_desde?string, languageUtil.get(locale, "detalle-edificio-unknown"))}€</span><br>
1302 </#if>
1303
1304 </p>
1305
1306 <div class="features-list-fav visitas">
1307 <span class="guardar-favorito pull-right">
1308 <a href="javascript:void(0);" id="${referencia.getData()}" title='<@liferay.language key="Favorito-icon-title" />' class="sh_icon-heart save-property" onclick="gestionarFavoritoFicha('${referencia.getData()}','${tipologia?lower_case}','${tipoOperacion?lower_case}', this, true)">
1309 <span class="icon sh_icon-heart"></span>
1310 <span class="icon sh_icon-heart_solid"></span>
1311 <span class="no-save-heart"><span class="visitasFavorito">${visitasFavorito} </span></span>
1312 <span class="save-heart"><span class="visitasFavorito">${visitasFavorito} </span></span>
1313 </a>
1314 </span>
1315 </div>
1316 </div>
1317
1318 <div class="ref-type">
1319 <span class="ref"><@liferay.language key="ficha-inmueble-referencia" /> ${ServihabitatRetailUtils.getLabel(referencia.getData(), languageUtil.get(locale, "detalle-edificio-unknown"))}</span>
1320 <#if nombreEstado!='' && nombreCategoria != ServihabitatRetailUtils.CATEGORY_NAME_TERRENO && nombreCategoria != ServihabitatRetailUtils.CATEGORY_NAME_SUELO>
1321 <span class="type">${ServihabitatRetailUtils.getLabel(nombreEstado, languageUtil.get(locale, "detalle-edificio-unknown"))}</span>
1322 </#if>
1323 </div>
1324
1325 <#if (proponTuPrecio=="true" && !isAlquiler && (!precioCero?? || precioCero.data == "false" || precioCero.data == "")) >
1326 <div class="precio-negociable">
1327 <p>
1328 <span class="yellow_tagb"></span>
1329 <span class="precio"><@liferay.language key="precio-negociable" /></span>
1330 <#--<img class="negociable-icon-popover" src="/servihabitat-retail-theme/images/info-popover.svg" tabindex="0" data-trigger="focus" data-toggle="popover" data-placement="bottom" data-html="true" data-content="<h2><@liferay.language key='precio-negociable' /></h2><span class='sh_icon-close'></span><p>${languageUtil.get(locale, "precio-negociable-descripcion")}</p>" data-original-title="" title="" class="precio-icon-popover">-->
1331 </p>
1332 </div>
1333 </#if>
1334
1335 </div>
1336
1337 </div>
1338
1339 <div class="container-floatLeft header-container-floatLeft">
1340
1341 <h1 class="pull-left ${h1_class} ${campana_class} noImpresion">
1342
1343 <#if (header_title_tipologia == languageUtil.get(locale, "obraparada-plural")?lower_case || header_title_tipologia == languageUtil.get(locale, "obraparada-singular")?lower_case)>
1344 ${languageUtil.format(locale, "inmueble-promo-comercial-header-title-wip",
1345 [header_title_tipologia,
1346 tipoOperacion,
1347 ServihabitatRetailUtils.getLabel(direccion.getData()?lower_case, languageUtil.get(locale, "detalle-edificio-unknown")),
1348 ServihabitatRetailUtils.getLabel(provincia.getData()?lower_case, languageUtil.get(locale, "detalle-edificio-unknown"))])}
1349 <#else>
1350 ${languageUtil.format(locale, "inmueble-promo-comercial-header-title",
1351 [header_title_tipologia,
1352 tipoOperacion,
1353 ServihabitatRetailUtils.getLabel(direccion.getData()?lower_case, languageUtil.get(locale, "detalle-edificio-unknown")),
1354 ServihabitatRetailUtils.getLabel(provincia.getData()?lower_case, languageUtil.get(locale, "detalle-edificio-unknown"))])}
1355 </#if>
1356
1357 </h1>
1358
1359 <#if logoCampanaURL?? && logoCampanaURL!="" && logoCampanaURL!="null" >
1360 <div class="campanas-aplicadas">
1361 <div class="campanas-aplicadas-inner">
1362 <#if urlCampana!="" && urlCampana!="null" >
1363 <a target="_blank" href="${urlCampana}" class="noImpresion urlIconoCampanaLink">
1364 <img src="${logoCampanaURL}" class="detail-promo-campana-icon">
1365 </a>
1366 <#else>
1367 <img src="${logoCampanaURL}" class="detail-promo-campana-icon">
1368 </#if>
1369
1370 <img class="campana-icon-popover" src="/servihabitat-retail-theme/images/info-popover.svg" tabindex="0"
1371 data-toggle="popover" data-trigger="focus" data-placement="bottom"
1372 data-html="true" data-content="
1373 <p class='ficha-h2'>${nombreCampana}</p>
1374 <span class='sh_icon-close'></span>
1375 <p id='descripcionCampana'></p>
1376 <a href='${urlCampana}' target='_blank'><@liferay.language key='oferta-concurrente-mas-informacion' /></a>
1377 ">
1378 </div>
1379 </div>
1380 </#if>
1381
1382 <div class="localidad-provincia ${campana_class}">
1383 <span class="localidad">${ServihabitatRetailUtils.getLabel(localidad.getData()?lower_case, languageUtil.get(locale, "detalle-edificio-unknown"))}, </span>
1384 <span class="provincia">${ServihabitatRetailUtils.getLabel(provincia.getData()?lower_case, languageUtil.get(locale, "detalle-edificio-unknown"))}</span>
1385 </div>
1386
1387 <#-- Obtención del icono del cuerpo y texto legal de las camp añas -->
1388 <#assign textoLegal_campanas_text = "" />
1389
1390 <div id="campanaBodyIcons">
1391 <#if refCampana?? && refCampana!='' >
1392 <#attempt>
1393 <#assign campana_referencia_title = propsUtil.get("servihabitat.tipologia.content.title.preffix") + refCampana />
1394 <#assign campana_JournalArticle = journalArticleLS.fetchArticleByUrlTitle(getterUtil.getLong(groupId), campana_referencia_title) />
1395 <#if campana_JournalArticle?? && campana_JournalArticle.resourcePrimKey??>
1396 <#assign campana_Entry = assetEntryLS.getEntry("com.liferay.portlet.journal.model.JournalArticle", campana_JournalArticle.resourcePrimKey) />
1397 <#assign campana_docXml = saxReaderUtil.read(campana_Entry.getAssetRenderer().getArticle().getContentByLocale(locale)) />
1398 <#assign campana_textoLegal_text = campana_docXml.valueOf("//dynamic-element[@name='condiciones']/dynamic-content/text()") />
1399 <#assign campana_descripcion_text = campana_docXml.valueOf("//dynamic-element[@name='descripcion']/dynamic-content/text()") />
1400 <#if ServihabitatRetailUtils.getLabel(campana_textoLegal_text, '') != '' >
1401 <#if textoLegal_campanas_text == "" >
1402 <#assign textoLegal_campanas_text = campana_textoLegal_text />
1403 <#else>
1404 <#assign textoLegal_campanas_text = textoLegal_campanas_text + '<hr class="separador-condiciones-promocionales"></hr>' + campana_textoLegal_text />
1405 </#if>
1406 </#if>
1407
1408 <script>
1409 <#assign campana_descripcion_text = campana_descripcion_text?replace("\n+", "",'r')>
1410 <#assign campana_descripcion_text = campana_descripcion_text?replace("<[^>]+>","",'r') />
1411 $( document ).ready(function() {
1412 if($('.container-floatLeft img.campana-icon-popover').length > 0){
1413 $('.container-floatLeft img.campana-icon-popover').attr('data-content',$('.container-floatLeft img.campana-icon-popover').attr('data-content').replace("<p id='descripcionCampana'></p>", "<p id='descripcionCampana'>${campana_descripcion_text?html}</p>"));
1414 }
1415 if($('.container-floatRight img.campana-icon-popover').length > 0){
1416 $('.container-floatRight img.campana-icon-popover').attr('data-content',$('.container-floatRight img.campana-icon-popover').attr('data-content').replace("<p id='descripcionCampana'></p>", "<p id='descripcionCampana'>${campana_descripcion_text?html}</p>"));
1417 }
1418 });
1419 </script>
1420
1421 <#assign campana_urlIconoCampana = '' />
1422 <#if tipoOperacion?lower_case==languageUtil.get(locale, "home-filtro-compra")?lower_case >
1423 <#assign campana_urlIconoCampana = campana_docXml.valueOf("//dynamic-element[@name='icono']/dynamic-element[@name='urIIconosCondiciones']/dynamic-content/text()") />
1424 <#else>
1425 <#assign campana_urlIconoCampana = campana_docXml.valueOf("//dynamic-element[@name='iconoA']/dynamic-element[@name='urIIconosCondicionesA']/dynamic-content/text()") />
1426 </#if>
1427
1428 <#if ServihabitatRetailUtils.getLabel(campana_urlIconoCampana, '') != '' && urlCampana?? && urlCampana!="null" && urlCampana!="">
1429 <script>
1430 $( document ).ready(function() {
1431 $('.urlIconoCampanaLink').attr('href', '${campana_urlIconoCampana}' );
1432
1433 if($('.container-floatLeft img.campana-icon-popover').length > 0){
1434 $('.container-floatLeft img.campana-icon-popover').attr('data-content',$('.container-floatLeft img.campana-icon-popover').attr('data-content').replace("<a href='${urlCampana}' target='_blank'>", "<a href='${campana_urlIconoCampana}' target='_blank'>"));
1435 }
1436 if($('.container-floatRight img.campana-icon-popover').length > 0){
1437 $('.container-floatRight img.campana-icon-popover').attr('data-content',$('.container-floatRight img.campana-icon-popover').attr('data-content').replace("<a href='${urlCampana}' target='_blank'>", "<a href='${campana_urlIconoCampana}' target='_blank'>"));
1438 }
1439 });
1440 </script>
1441 </#if>
1442
1443 </#if>
1444
1445 <#recover>
1446
1447 </#attempt>
1448 </#if>
1449 </div>
1450
1451 <div id="campana_popup" class="modal fade propound regular_form transparent">
1452 <div class="modal-dialog">
1453 <div class="modal-content1">
1454 <#-- JS cargará el contenido -->
1455 <div class="modal-content"></div>
1456
1457 <div class="clearfix"></div>
1458 <a href="" title="cerrar" data-dismiss="modal" class="sh_icon-close"></a>
1459 </div>
1460 </div>
1461 </div>
1462
1463 </div>
1464
1465 <#-- vista escritorio -->
1466 <div class="compartir-redes">
1467 <a href="javascript:void(0);" title='<@liferay.language key="compartir" />' class="compartirRedesClass share-property"><@liferay.language key="compartir" /></a><div id="compartirRedesDiv"></div>
1468 </div>
1469
1470
1471 </div>
1472
1473 <#-- Tambien disponible en venta/alquiler -->
1474 <#if (mode_also?has_content && mode_also!="") >
1475 <section class="notice promo props_features">
1476 <div>
1477 <#-- View URL con el modo no seleccionado -->
1478 <#assign modeAlso_viewURL = "/"+locale.getLanguage()+"/"+mode_also?lower_case+"/"+languageUtil.get(locale, "url-promociones")+"/"+getTipoInmuebleURL(tipologia, subtipologia)+"/"+localidadUrl.getData()+ "/"+referencia.getData() />
1479 <a target="_blank" href="${modeAlso_viewURL}">${languageUtil.format(locale, "disponible-tambien-en-x", [mode_also])}</a>
1480 </div>
1481 </section>
1482 </#if>
1483
1484 <#-- Puertas Abiertas -->
1485 <#assign puertasAbiertasFechaS = puertasAbiertasFecha.getData() />
1486 <#assign puertasAbiertasFechaFinS = puertasAbiertasFecha.puertasAbiertasFechaFin.getData() />
1487 <#if (puertasAbiertasFechaS?has_content && puertasAbiertasFechaS!='') >
1488 <#assign puertasAbiertasCaducado = false >
1489 <#if (puertasAbiertasFechaFinS?has_content && puertasAbiertasFechaFinS!='') >
1490 <#assign puertasAbiertasFechaFinDate = puertasAbiertasFechaFinS?number?number_to_date >
1491 <#if (.now?long > puertasAbiertasFechaFinDate?long) >
1492 <#assign puertasAbiertasCaducado = true >
1493 </#if>
1494 </#if>
1495 <#if (puertasAbiertasCaducado == false) >
1496 <#assign puertasAbiertasFechaDate = puertasAbiertasFechaS?number?number_to_date >
1497 <#assign puertasAbiertasCuando = puertasAbiertasFecha.puertasAbiertasCuando.getData() />
1498 <#assign puertasAbiertasDonde = puertasAbiertasFecha.puertasAbiertasDonde.getData() />
1499 <#assign puertasAbiertasHorario = puertasAbiertasFecha.puertasAbiertasHorario.getData() />
1500
1501 <section class="box bannerbox textbox open-day">
1502 <div>
1503 <h2><@liferay.language key="jornada-de-puertas-abiertas" /></h2>
1504 <ul class="nolist">
1505 <li>
1506 <h3><@liferay.language key="jornada-de-puertas-abiertas-cuando" /></h3>
1507 <p>${ServihabitatRetailUtils.getLabel(puertasAbiertasCuando, languageUtil.get(locale, "detalle-edificio-unknown"))}</p>
1508 </li>
1509 <li>
1510 <h3><@liferay.language key="jornada-de-puertas-abiertas-horario" /></h3>
1511 <p>${ServihabitatRetailUtils.getLabel(puertasAbiertasHorario, languageUtil.get(locale, "detalle-edificio-unknown"))}</p>
1512 </li>
1513 </ul>
1514 <ul class="nolist">
1515 <li>
1516 <h3><@liferay.language key="jornada-de-puertas-abiertas-donde" /></h3>
1517 <p>${ServihabitatRetailUtils.getLabel(puertasAbiertasDonde, languageUtil.get(locale, "detalle-edificio-unknown"))}</p>
1518 </li>
1519 </ul>
1520 </div>
1521 <a href="" class="date">
1522 <strong>${puertasAbiertasFechaDate?string["dd"]}</strong>
1523 ${puertasAbiertasFechaDate?string["MMM"]}
1524 </a>
1525 </section>
1526 </#if>
1527 </#if>
1528
1529 <div id="promo_anchor"></div>
1530
1531 <#-- UX Inmuebles de la promoción (sin tener en cuenta las promociones conjuntas) -->
1532 <#if mapUXInmuebles.size() gt 0 >
1533
1534 <section id="detail-promo-related">
1535 <h2 class="promo-related-msg promo-comercial-related-msg"> <@liferay.language key="inmuebles-disponibles-promocion" /></h2>
1536
1537 <div class="promo-comercial">
1538 <input type="hidden" id="listaIds-UX" name="listaIds" value=""/>
1539 <input type="hidden" id="tipoInmueble-UX" name="tipoInmueble" value=""/>
1540
1541 <div class="detail-promo-conjunta">
1542 <#assign keys = mapUXInmuebles.keySet()>
1543 <#list keys as key>
1544 <#if mapUXInmuebles.get(key)?has_content >
1545 <#assign inmueble = mapUXInmuebles.get(key) />
1546 <#assign inmueble_referencia = key />
1547 <#assign inmueble_tipologia_normalized = inmueble.getTipologiaNormalized() />
1548 <#assign inmueble_tipologia_conjunta_normalized = inmueble.getTipologiaConjuntaNormalized() />
1549
1550 <#assign classInmuebleTipo = "" />
1551 <#assign textoProindiviso = inmueble.getProindiviso() />
1552 <#assign lotesWow = inmueble.getLotesWow() />
1553 <#assign lotesWowSareb = inmueble.getLotesWowSareb() />
1554 <#assign logoLotesWow = inmueble.getLogoLotesWOW() />
1555 <#assign logoLotesWowSareb = inmueble.getLogoLotesWOWSareb() />
1556
1557 <div class="list-related paginable soloImpresion" onclick="javascript:navegacionInmuebles('${inmueble.getEnlaceURL()}');">
1558
1559 <div class="comercial-tipologia-precio">
1560 <p class="ref">Ref. ${inmueble.getReferencia()}</p>
1561 <p>${inmueble.getDescripcion()}</p>
1562
1563 <p class="amount">
1564
1565 <#assign inmueble_precio_normalized = inmueble.getPrecioNormalizado() />
1566 <#if inmueble_precio_normalized == "0€" >
1567 <span class="price mostrarPrecioDesktop" style="font-size:16px;font-family:'opensansbold',Arial,sans-serif;"><@liferay.language key="inmueble-precio-a-consultar-desktop" /></span>
1568
1569 <#else>
1570 <span class="price">${inmueble.getPrecioNormalizado()}</span>
1571 <#-- TAREAPROY-2242. Mejorar la visilidad del indicador Proindivisos en Inversores y Retail -->
1572 <#if inmueble.getProindiviso() != "" >
1573 <span class="proindiviso-tag">${languageUtil.get(locale, "proindiviso-literal-titulo")} <span>${inmueble.getProindiviso()}%</span></span>
1574 </#if>
1575 </#if>
1576
1577 <#if inmueble.getPrecioAnteriorNormalizado()?? && inmueble.getProindiviso() == "">
1578 <span class="red-price">
1579 <span class="old-price">
1580 <span class="arrow-down-price"></span>${inmueble.getPrecioAnteriorNormalizado()}
1581 </span>
1582 </span>
1583 </#if>
1584 </p>
1585
1586 </div>
1587
1588
1589 <#if (inmueble_tipologia_normalized == FriendlyURLNormalizerUtil.normalize(ServihabitatRetailUtils.CATEGORY_NAME_VIVIENDA)?replace("-", "")?lower_case)
1590 || (inmueble_tipologia_conjunta_normalized == FriendlyURLNormalizerUtil.normalize(ServihabitatRetailUtils.CATEGORY_NAME_VIVIENDA)?replace("-", "")?lower_case)>
1591 <div class="conjunta-datos">
1592 <div class="features-list-fav">
1593
1594 <ul class="features-list">
1595 <#if (inmueble.isConjunta() == true)>
1596 <#--//TAREAPROY-47 si es conjunta mostrar sumatorio metros q ya viene por tipologia-->
1597 <li class="features-list-metros">${inmueble.getSumatorioMetros() + languageUtil.get(locale, "servihabitat-venta-conjunta-metros-cuadrados")}</li>
1598 <#else>
1599 <li class="features-list-metros">${inmueble.getSuperficie() + languageUtil.get(locale, "servihabitat-venta-conjunta-metros-cuadrados")}</li>
1600 </#if>
1601
1602
1603 <#if inmueble.getNumeroHabitaciones() != "-">
1604 <li class="features-list-habitaciones">${inmueble.getNumeroHabitaciones()}</li>
1605 </#if>
1606 <#if inmueble.getNumeroBanos()!= "-">
1607 <li class="features-list-banos">${inmueble.getNumeroBanos()}</li>
1608 </#if>
1609 </ul>
1610
1611 <#--anejos-->
1612 <#if (inmueble.isConjunta() == true) || (inmueble.getParking()?? && inmueble.getParking()=='true') || (inmueble.getTrastero()?? && inmueble.getTrastero()=='true')>
1613 <p class="incluye-otros">${languageUtil.get(locale, "servihabitat-venta-conjunta-incluye-otros")}</p>
1614 </#if>
1615
1616 </div>
1617
1618 </div>
1619 <div class="conjunta-campanya">
1620 <#if lotesWowSareb == "1">
1621 <img class="lazy campanaLogoURL" src="${logoLotesWowSareb}" />
1622 <#elseif lotesWow == "1">
1623 <img class="lazy campanaLogoURL" src="${logoLotesWow}" />
1624 <#else>
1625 <#if inmueble.getLogoURL()?? && inmueble.getLogoURL()!=''>
1626 <#-- <div class="detail-promo-campana-icon noEnImpresion" style='background-image: url("${inmueble.getLogoURL()}");'></div> -->
1627 <img data-src="${inmueble.getLogoURL()}" class="lazy campanaLogoURL"/>
1628 </#if>
1629 </#if>
1630 </div>
1631
1632 <div class="conjunta-link">
1633 <a href="${inmueble.getEnlaceURL()}" class='sh_icon-arrow-r noEnImpresion'></a>
1634 </div>
1635
1636 <#elseif (inmueble_tipologia_normalized == FriendlyURLNormalizerUtil.normalize(ServihabitatRetailUtils.CATEGORY_NAME_EDIFICIO)?replace("-", "")?lower_case)
1637 || (inmueble_tipologia_conjunta_normalized == FriendlyURLNormalizerUtil.normalize(ServihabitatRetailUtils.CATEGORY_NAME_EDIFICIO)?replace("-", "")?lower_case) >
1638 <div class="conjunta-datos">
1639
1640 <div class="features-list-fav">
1641
1642 <ul class="features-list">
1643 <#if (inmueble.isConjunta() == true)>
1644 <#--//TAREAPROY-47 si es conjunta mostrar sumatorio metros q ya viene por tipologia-->
1645 <li class="features-list-metros">${inmueble.getSumatorioMetros() + languageUtil.get(locale, "servihabitat-venta-conjunta-metros-cuadrados")}</li>
1646 <#else>
1647 <li class="features-list-metros">${inmueble.getSuperficie() + languageUtil.get(locale, "servihabitat-venta-conjunta-metros-cuadrados")}</li>
1648 </#if>
1649
1650 </ul>
1651
1652 <#--anejos-->
1653 <#if (inmueble.isConjunta() == true) ||(inmueble.getParking()?? && inmueble.getParking()=='true') >
1654 <p class="incluye-otros">${languageUtil.get(locale, "servihabitat-venta-conjunta-incluye-otros")}</p>
1655 </#if>
1656
1657 </div>
1658
1659 </div>
1660 <div class="conjunta-campanya">
1661 <#if lotesWowSareb == "1">
1662 <img class="lazy campanaLogoURL" src="${logoLotesWowSareb}" />
1663 <#elseif lotesWow == "1">
1664 <img class="lazy campanaLogoURL" src="${logoLotesWow}" />
1665 <#else>
1666 <#if inmueble.getLogoURL()?? && inmueble.getLogoURL()!=''>
1667 <img data-src="${inmueble.getLogoURL()}" class="lazy campanaLogoURL"/>
1668 </#if>
1669 </#if>
1670 </div>
1671 <div class="conjunta-link">
1672 <a href="${inmueble.getEnlaceURL()}" class="sh_icon-arrow-r noEnImpresion"></a>
1673 </div>
1674
1675 <#elseif (inmueble_tipologia_normalized == FriendlyURLNormalizerUtil.normalize(ServihabitatRetailUtils.CATEGORY_NAME_LOCAL)?replace("-", "")?lower_case)
1676 || (inmueble_tipologia_conjunta_normalized == FriendlyURLNormalizerUtil.normalize(ServihabitatRetailUtils.CATEGORY_NAME_LOCAL)?replace("-", "")?lower_case) >
1677 <div class="conjunta-datos">
1678
1679 <div class="features-list-fav">
1680
1681 <ul class="features-list">
1682 <#if (inmueble.isConjunta() == true)>
1683 <#--//TAREAPROY-47 si es conjunta mostrar sumatorio metros q ya viene por tipologia-->
1684 <li class="features-list-metros">${inmueble.getSumatorioMetros() + languageUtil.get(locale, "servihabitat-venta-conjunta-metros-cuadrados")}</li>
1685 <#else>
1686 <li class="features-list-metros">${inmueble.getSuperficie() + languageUtil.get(locale, "servihabitat-venta-conjunta-metros-cuadrados")}</li>
1687 </#if>
1688 </ul>
1689
1690 <#--anejos-->
1691 <#if (inmueble.isConjunta() == true) >
1692 <p class="incluye-otros">${languageUtil.get(locale, "servihabitat-venta-conjunta-incluye-otros")}</p>
1693 </#if>
1694
1695 </div>
1696
1697 </div>
1698 <div class="conjunta-campanya">
1699 <#if lotesWowSareb == "1">
1700 <img class="lazy campanaLogoURL" src="${logoLotesWowSareb}" />
1701 <#elseif lotesWow == "1">
1702 <img class="lazy campanaLogoURL" src="${logoLotesWow}" />
1703 <#else>
1704 <#if inmueble.getLogoURL()?? && inmueble.getLogoURL()!=''>
1705 <#-- <div class="detail-promo-campana-icon noEnImpresion" style='background-image: url("${inmueble.getLogoURL()}");'></div> -->
1706 <img data-src="${inmueble.getLogoURL()}" class="lazy campanaLogoURL"/>
1707 </#if>
1708 </#if>
1709 </div>
1710 <div class="conjunta-link">
1711 <a href="${inmueble.getEnlaceURL()}" class='sh_icon-arrow-r noEnImpresion'></a>
1712 </div>
1713
1714 <#elseif (inmueble_tipologia_normalized == FriendlyURLNormalizerUtil.normalize(ServihabitatRetailUtils.CATEGORY_NAME_OFICINA)?replace("-", "")?lower_case)
1715 || (inmueble_tipologia_conjunta_normalized == FriendlyURLNormalizerUtil.normalize(ServihabitatRetailUtils.CATEGORY_NAME_OFICINA)?replace("-", "")?lower_case) >
1716 <div class="conjunta-datos">
1717
1718 <div class="features-list-fav">
1719
1720 <ul class="features-list">
1721 <#if (inmueble.isConjunta() == true)>
1722 <#--//TAREAPROY-47 si es conjunta mostrar sumatorio metros q ya viene por tipologia-->
1723 <li class="features-list-metros">${inmueble.getSumatorioMetros() + languageUtil.get(locale, "servihabitat-venta-conjunta-metros-cuadrados")}</li>
1724 <#else>
1725 <li class="features-list-metros">${inmueble.getSuperficie() + languageUtil.get(locale, "servihabitat-venta-conjunta-metros-cuadrados")}</li>
1726 </#if>
1727 </ul>
1728
1729 <#--anejos-->
1730 <#if (inmueble.isConjunta() == true) ||(inmueble.getParking()?? && inmueble.getParking()=='true') >
1731 <p class="incluye-otros">${languageUtil.get(locale, "servihabitat-venta-conjunta-incluye-otros")}</p>
1732 </#if>
1733
1734 </div>
1735
1736 </div>
1737 <div class="conjunta-campanya">
1738 <#if lotesWowSareb == "1">
1739 <img class="lazy campanaLogoURL" src="${logoLotesWowSareb}" />
1740 <#elseif lotesWow == "1">
1741 <img class="lazy campanaLogoURL" src="${logoLotesWow}" />
1742 <#else>
1743 <#if inmueble.getLogoURL()?? && inmueble.getLogoURL()!=''>
1744 <#-- <div class="detail-promo-campana-icon noEnImpresion" style='background-image: url("${inmueble.getLogoURL()}");'></div> -->
1745 <img data-src="${inmueble.getLogoURL()}" class="lazy campanaLogoURL"/>
1746 </#if>
1747 </#if>
1748 </div>
1749 <div class="conjunta-link">
1750 <a href="${inmueble.getEnlaceURL()}" class='sh_icon-arrow-r noEnImpresion'></a>
1751 </div>
1752
1753 <#elseif (inmueble_tipologia_normalized == FriendlyURLNormalizerUtil.normalize(ServihabitatRetailUtils.CATEGORY_NAME_GARAJE)?replace("-", "")?lower_case)
1754 || (inmueble_tipologia_conjunta_normalized == FriendlyURLNormalizerUtil.normalize(ServihabitatRetailUtils.CATEGORY_NAME_GARAJE)?replace("-", "")?lower_case) >
1755 <div class="conjunta-datos">
1756
1757 <div class="features-list-fav">
1758
1759 <ul class="features-list">
1760 <#if (inmueble.isConjunta() == true)>
1761 <#--//TAREAPROY-47 si es conjunta mostrar sumatorio metros q ya viene por tipologia-->
1762 <li class="features-list-metros">${inmueble.getSumatorioMetros() + languageUtil.get(locale, "servihabitat-venta-conjunta-metros-cuadrados")}</li>
1763 <#else>
1764 <li class="features-list-metros">${inmueble.getSuperficie() + languageUtil.get(locale, "servihabitat-venta-conjunta-metros-cuadrados")}</li>
1765 </#if>
1766 </ul>
1767
1768 <#--anejos-->
1769 <#if (inmueble.isConjunta() == true) >
1770 <p class="incluye-otros">${languageUtil.get(locale, "servihabitat-venta-conjunta-incluye-otros")}</p>
1771 </#if>
1772
1773 </div>
1774
1775 </div>
1776 <div class="conjunta-campanya">
1777 <#if lotesWowSareb == "1">
1778 <img class="lazy campanaLogoURL" src="${logoLotesWowSareb}" />
1779 <#elseif lotesWow == "1">
1780 <img class="lazy campanaLogoURL" src="${logoLotesWow}" />
1781 <#else>
1782 <#if inmueble.getLogoURL()?? && inmueble.getLogoURL()!=''>
1783 <#-- <div class="detail-promo-campana-icon noEnImpresion" style='background-image: url("${inmueble.getLogoURL()}");'></div> -->
1784 <img data-src="${inmueble.getLogoURL()}" class="lazy campanaLogoURL"/>
1785 </#if>
1786 </#if>
1787 </div>
1788 <div class="conjunta-link">
1789 <a href="${inmueble.getEnlaceURL()}" class='sh_icon-arrow-r noEnImpresion'></a>
1790 </div>
1791
1792 <#elseif (inmueble_tipologia_normalized == FriendlyURLNormalizerUtil.normalize(ServihabitatRetailUtils.CATEGORY_NAME_TRASTERO)?replace("-", "")?lower_case)
1793 || (inmueble_tipologia_conjunta_normalized == FriendlyURLNormalizerUtil.normalize(ServihabitatRetailUtils.CATEGORY_NAME_TRASTERO)?replace("-", "")?lower_case) >
1794 <div class="conjunta-datos">
1795
1796 <div class="features-list-fav">
1797
1798 <ul class="features-list">
1799 <#if (inmueble.isConjunta() == true)>
1800 <#--//TAREAPROY-47 si es conjunta mostrar sumatorio metros q ya viene por tipologia-->
1801 <li class="features-list-metros">${inmueble.getSumatorioMetros() + languageUtil.get(locale, "servihabitat-venta-conjunta-metros-cuadrados")}</li>
1802 <#else>
1803 <li class="features-list-metros">${inmueble.getSuperficie() + languageUtil.get(locale, "servihabitat-venta-conjunta-metros-cuadrados")}</li>
1804 </#if>
1805 </ul>
1806
1807 <#--anejos-->
1808 <#if (inmueble.isConjunta() == true) >
1809 <p class="incluye-otros">${languageUtil.get(locale, "servihabitat-venta-conjunta-incluye-otros")}</p>
1810 </#if>
1811 </div>
1812
1813 </div>
1814 <div class="conjunta-campanya">
1815 <#if lotesWowSareb == "1">
1816 <img class="lazy campanaLogoURL" src="${logoLotesWowSareb}" />
1817 <#elseif lotesWow == "1">
1818 <img class="lazy campanaLogoURL" src="${logoLotesWow}" />
1819 <#else>
1820 <#if inmueble.getLogoURL()?? && inmueble.getLogoURL()!=''>
1821 <img data-src="${inmueble.getLogoURL()}" class="lazy campanaLogoURL"/>
1822 </#if>
1823 </#if>
1824 </div>
1825 <div class="conjunta-link">
1826 <a href="${inmueble.getEnlaceURL()}" class='sh_icon-arrow-r noEnImpresion'></a>
1827 </div>
1828
1829 <#elseif (inmueble_tipologia_normalized == FriendlyURLNormalizerUtil.normalize(ServihabitatRetailUtils.CATEGORY_NAME_NAVE)?replace("-", "")?lower_case)
1830 || (inmueble_tipologia_conjunta_normalized == FriendlyURLNormalizerUtil.normalize(ServihabitatRetailUtils.CATEGORY_NAME_NAVE)?replace("-", "")?lower_case) >
1831 <div class="conjunta-datos">
1832
1833 <div class="features-list-fav">
1834
1835 <ul class="features-list">
1836 <#if (inmueble.isConjunta() == true)>
1837 <#--//TAREAPROY-47 si es conjunta mostrar sumatorio metros q ya viene por tipologia-->
1838 <li class="features-list-metros">${inmueble.getSumatorioMetros() + languageUtil.get(locale, "servihabitat-venta-conjunta-metros-cuadrados")}</li>
1839 <#else>
1840 <li class="features-list-metros">${inmueble.getSuperficie() + languageUtil.get(locale, "servihabitat-venta-conjunta-metros-cuadrados")}</li>
1841 </#if>
1842 </ul>
1843
1844 <#--anejos-->
1845 <#if (inmueble.isConjunta() == true) >
1846 <p class="incluye-otros">${languageUtil.get(locale, "servihabitat-venta-conjunta-incluye-otros")}</p>
1847 </#if>
1848
1849 </div>
1850
1851 </div>
1852 <div class="conjunta-campanya">
1853 <#if lotesWowSareb == "1">
1854 <img class="lazy campanaLogoURL" src="${logoLotesWowSareb}" />
1855 <#elseif lotesWow == "1">
1856 <img class="lazy campanaLogoURL" src="${logoLotesWow}" />
1857 <#else>
1858 <#if inmueble.getLogoURL()?? && inmueble.getLogoURL()!=''>
1859 <img data-src="${inmueble.getLogoURL()}" class="lazy campanaLogoURL"/>
1860 </#if>
1861 </#if>
1862 </div>
1863 <div class="conjunta-link">
1864 <a href="${inmueble.getEnlaceURL()}" class='sh_icon-arrow-r noEnImpresion'></a>
1865 </div>
1866
1867 <#elseif (inmueble_tipologia_normalized == FriendlyURLNormalizerUtil.normalize(ServihabitatRetailUtils.CATEGORY_NAME_TERRENO)?replace("-", "")?lower_case)
1868 || (inmueble_tipologia_conjunta_normalized == FriendlyURLNormalizerUtil.normalize(ServihabitatRetailUtils.CATEGORY_NAME_TERRENO)?replace("-", "")?lower_case)
1869 || (inmueble_tipologia_normalized == FriendlyURLNormalizerUtil.normalize(ServihabitatRetailUtils.CATEGORY_NAME_SUELO)?replace("-", "")?lower_case)
1870 || (inmueble_tipologia_conjunta_normalized == FriendlyURLNormalizerUtil.normalize(ServihabitatRetailUtils.CATEGORY_NAME_SUELO)?replace("-", "")?lower_case)>
1871 <div class="conjunta-datos">
1872
1873 <div class="features-list-fav">
1874
1875 <ul class="features-list">
1876 <#if (inmueble.isConjunta() == true)>
1877 <#--//TAREAPROY-47 si es conjunta mostrar sumatorio metros q ya viene por tipologia-->
1878 <li class="features-list-metros">${inmueble.getSumatorioMetros() + languageUtil.get(locale, "servihabitat-venta-conjunta-metros-cuadrados")}</li>
1879 <#else>
1880 <li class="features-list-metros">${inmueble.getSuperficie() + languageUtil.get(locale, "servihabitat-venta-conjunta-metros-cuadrados")}</li>
1881 </#if>
1882 </ul>
1883
1884 <#--anejos-->
1885 <#if (inmueble.isConjunta() == true) >
1886 <p class="incluye-otros">${languageUtil.get(locale, "servihabitat-venta-conjunta-incluye-otros")}</p>
1887 </#if>
1888 </div>
1889
1890 </div>
1891 <div class="conjunta-campanya">
1892 <#if lotesWowSareb == "1">
1893 <img class="lazy campanaLogoURL" src="${logoLotesWowSareb}" />
1894 <#elseif lotesWow == "1">
1895 <img class="lazy campanaLogoURL" src="${logoLotesWow}" />
1896 <#else>
1897 <#if inmueble.getLogoURL()?? && inmueble.getLogoURL()!=''>
1898 <img data-src="${inmueble.getLogoURL()}" class="lazy campanaLogoURL"/>
1899 </#if>
1900 </#if>
1901 </div>
1902 <div class="conjunta-link">
1903 <a href="${inmueble.getEnlaceURL()}" class='sh_icon-arrow-r noEnImpresion'></a>
1904 </div>
1905
1906 <#elseif (inmueble_tipologia_normalized == FriendlyURLNormalizerUtil.normalize(ServihabitatRetailUtils.CATEGORY_NAME_VARIOS)?replace("-", "")?lower_case)
1907 || (inmueble_tipologia_conjunta_normalized == FriendlyURLNormalizerUtil.normalize(ServihabitatRetailUtils.CATEGORY_NAME_VARIOS)?replace("-", "")?lower_case) >
1908 <div class="conjunta-datos">
1909
1910 <div class="features-list-fav">
1911
1912 <ul class="features-list">
1913 <#if (inmueble.isConjunta() == true)>
1914 <#--//TAREAPROY-47 si es conjunta mostrar sumatorio metros q ya viene por tipologia-->
1915 <li class="features-list-metros">${inmueble.getSumatorioMetros() + languageUtil.get(locale, "servihabitat-venta-conjunta-metros-cuadrados")}</li>
1916 <#else>
1917 <li class="features-list-metros">${inmueble.getSuperficie() + languageUtil.get(locale, "servihabitat-venta-conjunta-metros-cuadrados")}</li>
1918 </#if>
1919 </ul>
1920
1921 <#--anejos-->
1922 <#if (inmueble.isConjunta() == true) >
1923 <p class="incluye-otros">${languageUtil.get(locale, "servihabitat-venta-conjunta-incluye-otros")}</p>
1924 </#if>
1925 </div>
1926
1927 </div>
1928 <div class="conjunta-campanya">
1929 <#if lotesWowSareb == "1">
1930 <img class="lazy campanaLogoURL" src="${logoLotesWowSareb}" />
1931 <#elseif lotesWow == "1">
1932 <img class="lazy campanaLogoURL" src="${logoLotesWow}" />
1933 <#else>
1934 <#if inmueble.getLogoURL()?? && inmueble.getLogoURL()!=''>
1935 <img data-src="${inmueble.getLogoURL()}" class="lazy campanaLogoURL"/>
1936 </#if>
1937 </#if>
1938 </div>
1939 <div class="conjunta-link">
1940 <a href="${inmueble.getEnlaceURL()}" class='sh_icon-arrow-r noEnImpresion'></a>
1941 </div>
1942
1943
1944 <#elseif (inmueble_tipologia_normalized == FriendlyURLNormalizerUtil.normalize(ServihabitatRetailUtils.CATEGORY_NAME_OBRA_PARADA)?replace("-", "")?lower_case)
1945 || (inmueble_tipologia_conjunta_normalized == FriendlyURLNormalizerUtil.normalize(ServihabitatRetailUtils.CATEGORY_NAME_OBRA_PARADA)?replace("-", "")?lower_case) >
1946 <div class="conjunta-datos">
1947
1948 <div class="features-list-fav">
1949
1950 <ul class="features-list">
1951 <#if (inmueble.isConjunta() == true)>
1952 <#--//TAREAPROY-47 si es conjunta mostrar sumatorio metros q ya viene por tipologia-->
1953 <li class="features-list-metros">${inmueble.getSumatorioMetros() + languageUtil.get(locale, "servihabitat-venta-conjunta-metros-cuadrados")}</li>
1954 <#else>
1955 <li class="features-list-metros">${inmueble.getSuperficie() + languageUtil.get(locale, "servihabitat-venta-conjunta-metros-cuadrados")}</li>
1956 </#if>
1957 </ul>
1958
1959 <#--anejos-->
1960 <#if (inmueble.isConjunta() == true) >
1961 <p class="incluye-otros">${languageUtil.get(locale, "servihabitat-venta-conjunta-incluye-otros")}</p>
1962 </#if>
1963 </div>
1964
1965 </div>
1966 <div class="conjunta-campanya">
1967 <#if lotesWowSareb == "1">
1968 <img class="lazy campanaLogoURL" src="${logoLotesWowSareb}" />
1969 <#elseif lotesWow == "1">
1970 <img class="lazy campanaLogoURL" src="${logoLotesWow}" />
1971 <#else>
1972 <#if inmueble.getLogoURL()?? && inmueble.getLogoURL()!=''>
1973 <img data-src="${inmueble.getLogoURL()}" class="lazy campanaLogoURL"/>
1974 </#if>
1975 </#if>
1976 </div>
1977 <div class="conjunta-link">
1978 <a href="${inmueble.getEnlaceURL()}" class='sh_icon-arrow-r noEnImpresion'></a>
1979 </div>
1980
1981
1982 </#if>
1983
1984
1985 </div>
1986 </#if>
1987 <#-- CIERRO el div con class 'linea' -->
1988 </#list>
1989 </div>
1990 </div>
1991
1992 <div class="more-trigger">
1993 <a href="#detail-promo-related"><@liferay.language key="promo-ver-los" /> ${mapUXInmuebles.size()} <@liferay.language key="promo-ver-inmuebles" /></a>
1994 </div>
1995 </section>
1996 <#--// inicio TAREAPROY-1674-->
1997 <div id="detallePromo_popup" class="modal fade propound regular_form transparent">
1998 <div class="modal-dialog">
1999 <div class="modal-content1">
2000
2001 <div class="modal-content">
2002
2003
2004 <div class="promo-comercial">
2005 <h2><@liferay.language key="inmuebles-disponibles-promocion" /></h2>
2006 <div id="filtroProvincias">
2007
2008 <label for="selectTipo"><@liferay.language key="inmueble-buscar-por-tipo" /></label>
2009 <select id="selectTipo" name="selectTipo" onchange="filtrarTipo();">
2010 <option value="Todas" selected="selected"> <@liferay.language key="inmueble-select-tipo-todas" /></option>
2011 </select>
2012 </div>
2013 <div id="filtroOrden">
2014
2015 <label for="selectOrden"><@liferay.language key="inmueble-ordenados-por" /></label>
2016 <select id="selectOrden" name="selectOrden" onchange="filtrarOrdenar();">
2017 <option value="defaultOrden" selected><@liferay.language key="inmueble-ordenados-por-defecto" /></option>
2018 <option value="precio"><@liferay.language key="inmueble-ordenados-por-precio" /></option>
2019 <option value="metros"><@liferay.language key="inmueble-ordenados-por-metros" /></option>
2020 </select>
2021 </div>
2022
2023 <div class="detail-promo-conjuntaModal">
2024 <#assign keys = mapUXInmuebles.keySet()>
2025 <#assign defaultOrden = 0 />
2026 <#list keys as key>
2027 <#if mapUXInmuebles.get(key)?has_content >
2028 <#assign inmueble = mapUXInmuebles.get(key) />
2029 <#assign inmueble_referencia = key />
2030 <#assign inmueble_tipologia_normalized = inmueble.getTipologiaNormalized() />
2031 <#assign inmueble_tipologia_conjunta_normalized = inmueble.getTipologiaConjuntaNormalized() />
2032 <#assign textoProindiviso = inmueble.getProindiviso() />
2033
2034 <#assign lotesWow = inmueble.getLotesWow() />
2035 <#assign lotesWowSareb = inmueble.getLotesWowSareb() />
2036 <#assign logoLotesWow = inmueble.getLogoLotesWOW() />
2037 <#assign logoLotesWowSareb = inmueble.getLogoLotesWOWSareb() />
2038
2039 <#assign classInmuebleTipo = "" />
2040 <#assign metros = "0" />
2041 <#assign defaultOrden = defaultOrden +1/>
2042 <#if (inmueble.isConjunta() == true)>
2043
2044 <#assign metros =inmueble.getSumatorioMetros() />
2045 <#else>
2046 <#assign metros =inmueble.getSuperficie() />
2047 </#if>
2048 <div class="list-related paginable " data-metros="${metros}" data-ordendef="${defaultOrden}" data-precio="${inmueble.getPrecio()}" onclick="javascript:navegacionInmuebles('${inmueble.getEnlaceURL()}');">
2049
2050 <div class="comercial-tipologia-precio">
2051 <p class="ref">Ref. ${inmueble.getReferencia()}</p>
2052 <p>${inmueble.getDescripcion()}</p>
2053
2054 <p class="amount">
2055
2056 <#assign inmueble_precio_normalized = inmueble.getPrecioNormalizado() />
2057 <#if inmueble_precio_normalized == "0€" >
2058 <span class="price mostrarPrecioDesktop" style="font-size:16px;font-family:'opensansbold',Arial,sans-serif;"><@liferay.language key="inmueble-precio-a-consultar-desktop" /></span>
2059 <#else>
2060 <span class="price">${inmueble.getPrecioNormalizado()}</span>
2061 <#-- TAREAPROY-2242. Mejorar la visilidad del indicador Proindivisos en Inversores y Retail -->
2062 <#if inmueble.getProindiviso() != "" >
2063 <span class="proindiviso-tag">${languageUtil.get(locale, "proindiviso-literal-titulo")} <span>${inmueble.getProindiviso()}%</span></span>
2064 </#if>
2065 </#if>
2066
2067
2068 <#if inmueble.getPrecioAnteriorNormalizado()?? && inmueble.getProindiviso() == "">
2069 <span class="red-price">
2070 <span class="old-price">
2071 <span class="arrow-down-price"></span>${inmueble.getPrecioAnteriorNormalizado()}
2072 </span>
2073 </span>
2074 </#if>
2075 </p>
2076
2077 </div>
2078
2079
2080 <#if inmueble_tipologia_conjunta_normalized?? && inmueble_tipologia_conjunta_normalized !="" >
2081 <input type="hidden" class="tipoEnPromo" value="${inmueble_tipologia_conjunta_normalized}">
2082 <#else>
2083 <input type="hidden" class="tipoEnPromo" value="${inmueble_tipologia_normalized}">
2084 </#if>
2085
2086 <#if (inmueble_tipologia_normalized == FriendlyURLNormalizerUtil.normalize(ServihabitatRetailUtils.CATEGORY_NAME_VIVIENDA)?replace("-", "")?lower_case)
2087 || (inmueble_tipologia_conjunta_normalized == FriendlyURLNormalizerUtil.normalize(ServihabitatRetailUtils.CATEGORY_NAME_VIVIENDA)?replace("-", "")?lower_case)>
2088 <div class="conjunta-datos">
2089 <div class="features-list-fav">
2090
2091 <ul class="features-list">
2092 <#if (inmueble.isConjunta() == true)>
2093 <#--//TAREAPROY-47 si es conjunta mostrar sumatorio metros q ya viene por tipologia-->
2094 <li class="features-list-metros">${inmueble.getSumatorioMetros() + languageUtil.get(locale, "servihabitat-venta-conjunta-metros-cuadrados")}</li>
2095 <#else>
2096 <li class="features-list-metros">${inmueble.getSuperficie() + languageUtil.get(locale, "servihabitat-venta-conjunta-metros-cuadrados")}</li>
2097 </#if>
2098
2099
2100 <#if inmueble.getNumeroHabitaciones() != "-">
2101 <li class="features-list-habitaciones">${inmueble.getNumeroHabitaciones()}</li>
2102 </#if>
2103 <#if inmueble.getNumeroBanos()!= "-">
2104 <li class="features-list-banos">${inmueble.getNumeroBanos()}</li>
2105 </#if>
2106 </ul>
2107
2108 <#--anejos-->
2109 <#if (inmueble.isConjunta() == true) || (inmueble.getParking()?? && inmueble.getParking()=='true') || (inmueble.getTrastero()?? && inmueble.getTrastero()=='true')>
2110 <p class="incluye-otros">${languageUtil.get(locale, "servihabitat-venta-conjunta-incluye-otros")}</p>
2111 </#if>
2112
2113 </div>
2114
2115 </div>
2116 <div class="conjunta-campanya">
2117 <#if lotesWowSareb == "1">
2118 <img class="lazy campanaLogoURL" src="${logoLotesWowSareb}" />
2119 <#elseif lotesWow == "1">
2120 <img class="lazy campanaLogoURL" src="${logoLotesWow}" />
2121 <#else>
2122 <#if inmueble.getLogoURL()?? && inmueble.getLogoURL()!=''>
2123 <img data-src="${inmueble.getLogoURL()}" class="lazy campanaLogoURL"/>
2124 </#if>
2125 </#if>
2126 </div>
2127 <div class="conjunta-link">
2128 <a href="${inmueble.getEnlaceURL()}" class='sh_icon-arrow-r noEnImpresion'></a>
2129 </div>
2130
2131 <#elseif (inmueble_tipologia_normalized == FriendlyURLNormalizerUtil.normalize(ServihabitatRetailUtils.CATEGORY_NAME_EDIFICIO)?replace("-", "")?lower_case)
2132 || (inmueble_tipologia_conjunta_normalized == FriendlyURLNormalizerUtil.normalize(ServihabitatRetailUtils.CATEGORY_NAME_EDIFICIO)?replace("-", "")?lower_case) >
2133 <div class="conjunta-datos">
2134
2135 <div class="features-list-fav">
2136
2137 <ul class="features-list">
2138 <#if (inmueble.isConjunta() == true)>
2139 <#--//TAREAPROY-47 si es conjunta mostrar sumatorio metros q ya viene por tipologia-->
2140 <li class="features-list-metros">${inmueble.getSumatorioMetros() + languageUtil.get(locale, "servihabitat-venta-conjunta-metros-cuadrados")}</li>
2141 <#else>
2142 <li class="features-list-metros">${inmueble.getSuperficie() + languageUtil.get(locale, "servihabitat-venta-conjunta-metros-cuadrados")}</li>
2143 </#if>
2144
2145 </ul>
2146
2147 <#--anejos-->
2148 <#if (inmueble.isConjunta() == true) ||(inmueble.getParking()?? && inmueble.getParking()=='true') >
2149 <p class="incluye-otros">${languageUtil.get(locale, "servihabitat-venta-conjunta-incluye-otros")}</p>
2150 </#if>
2151
2152 </div>
2153
2154 </div>
2155 <div class="conjunta-campanya">
2156 <#if lotesWowSareb == "1">
2157 <img class="lazy campanaLogoURL" src="${logoLotesWowSareb}" />
2158 <#elseif lotesWow == "1">
2159 <img class="lazy campanaLogoURL" src="${logoLotesWow}" />
2160 <#else>
2161 <#if inmueble.getLogoURL()?? && inmueble.getLogoURL()!=''>
2162 <img data-src="${inmueble.getLogoURL()}" class="lazy campanaLogoURL"/>
2163 </#if>
2164 </#if>
2165 </div>
2166 <div class="conjunta-link">
2167 <a href="${inmueble.getEnlaceURL()}" class="sh_icon-arrow-r noEnImpresion"></a>
2168 </div>
2169
2170 <#elseif (inmueble_tipologia_normalized == FriendlyURLNormalizerUtil.normalize(ServihabitatRetailUtils.CATEGORY_NAME_LOCAL)?replace("-", "")?lower_case)
2171 || (inmueble_tipologia_conjunta_normalized == FriendlyURLNormalizerUtil.normalize(ServihabitatRetailUtils.CATEGORY_NAME_LOCAL)?replace("-", "")?lower_case) >
2172 <div class="conjunta-datos">
2173
2174 <div class="features-list-fav">
2175
2176 <ul class="features-list">
2177 <#if (inmueble.isConjunta() == true)>
2178 <#--//TAREAPROY-47 si es conjunta mostrar sumatorio metros q ya viene por tipologia-->
2179 <li class="features-list-metros">${inmueble.getSumatorioMetros() + languageUtil.get(locale, "servihabitat-venta-conjunta-metros-cuadrados")}</li>
2180 <#else>
2181 <li class="features-list-metros">${inmueble.getSuperficie() + languageUtil.get(locale, "servihabitat-venta-conjunta-metros-cuadrados")}</li>
2182 </#if>
2183 </ul>
2184
2185 <#--anejos-->
2186 <#if (inmueble.isConjunta() == true) >
2187 <p class="incluye-otros">${languageUtil.get(locale, "servihabitat-venta-conjunta-incluye-otros")}</p>
2188 </#if>
2189
2190 </div>
2191
2192 </div>
2193 <div class="conjunta-campanya">
2194 <#if lotesWowSareb == "1">
2195 <img class="lazy campanaLogoURL" src="${logoLotesWowSareb}" />
2196 <#elseif lotesWow == "1">
2197 <img class="lazy campanaLogoURL" src="${logoLotesWow}" />
2198 <#else>
2199 <#if inmueble.getLogoURL()?? && inmueble.getLogoURL()!=''>
2200 <img data-src="${inmueble.getLogoURL()}" class="lazy campanaLogoURL"/>
2201 </#if>
2202 </#if>
2203 </div>
2204 <div class="conjunta-link">
2205 <a href="${inmueble.getEnlaceURL()}" class='sh_icon-arrow-r noEnImpresion'></a>
2206 </div>
2207
2208 <#elseif (inmueble_tipologia_normalized == FriendlyURLNormalizerUtil.normalize(ServihabitatRetailUtils.CATEGORY_NAME_OFICINA)?replace("-", "")?lower_case)
2209 || (inmueble_tipologia_conjunta_normalized == FriendlyURLNormalizerUtil.normalize(ServihabitatRetailUtils.CATEGORY_NAME_OFICINA)?replace("-", "")?lower_case) >
2210 <div class="conjunta-datos">
2211
2212 <div class="features-list-fav">
2213
2214 <ul class="features-list">
2215 <#if (inmueble.isConjunta() == true)>
2216 <#--//TAREAPROY-47 si es conjunta mostrar sumatorio metros q ya viene por tipologia-->
2217 <li class="features-list-metros">${inmueble.getSumatorioMetros() + languageUtil.get(locale, "servihabitat-venta-conjunta-metros-cuadrados")}</li>
2218 <#else>
2219 <li class="features-list-metros">${inmueble.getSuperficie() + languageUtil.get(locale, "servihabitat-venta-conjunta-metros-cuadrados")}</li>
2220 </#if>
2221 </ul>
2222
2223 <#--anejos-->
2224 <#if (inmueble.isConjunta() == true) ||(inmueble.getParking()?? && inmueble.getParking()=='true') >
2225 <p class="incluye-otros">${languageUtil.get(locale, "servihabitat-venta-conjunta-incluye-otros")}</p>
2226 </#if>
2227
2228 </div>
2229
2230 </div>
2231 <div class="conjunta-campanya">
2232 <#if lotesWowSareb == "1">
2233 <img class="lazy campanaLogoURL" src="${logoLotesWowSareb}" />
2234 <#elseif lotesWow == "1">
2235 <img class="lazy campanaLogoURL" src="${logoLotesWow}" />
2236 <#else>
2237 <#if inmueble.getLogoURL()?? && inmueble.getLogoURL()!=''>
2238 <img data-src="${inmueble.getLogoURL()}" class="lazy campanaLogoURL"/>
2239 </#if>
2240 </#if>
2241 </div>
2242 <div class="conjunta-link">
2243 <a href="${inmueble.getEnlaceURL()}" class='sh_icon-arrow-r noEnImpresion'></a>
2244 </div>
2245
2246 <#elseif (inmueble_tipologia_normalized == FriendlyURLNormalizerUtil.normalize(ServihabitatRetailUtils.CATEGORY_NAME_GARAJE)?replace("-", "")?lower_case)
2247 || (inmueble_tipologia_conjunta_normalized == FriendlyURLNormalizerUtil.normalize(ServihabitatRetailUtils.CATEGORY_NAME_GARAJE)?replace("-", "")?lower_case) >
2248 <div class="conjunta-datos">
2249
2250 <div class="features-list-fav">
2251
2252 <ul class="features-list">
2253 <#if (inmueble.isConjunta() == true)>
2254 <#--//TAREAPROY-47 si es conjunta mostrar sumatorio metros q ya viene por tipologia-->
2255 <li class="features-list-metros">${inmueble.getSumatorioMetros() + languageUtil.get(locale, "servihabitat-venta-conjunta-metros-cuadrados")}</li>
2256 <#else>
2257 <li class="features-list-metros">${inmueble.getSuperficie() + languageUtil.get(locale, "servihabitat-venta-conjunta-metros-cuadrados")}</li>
2258 </#if>
2259 </ul>
2260
2261 <#--anejos-->
2262 <#if (inmueble.isConjunta() == true) >
2263 <p class="incluye-otros">${languageUtil.get(locale, "servihabitat-venta-conjunta-incluye-otros")}</p>
2264 </#if>
2265
2266 </div>
2267
2268 </div>
2269 <div class="conjunta-campanya">
2270 <#if lotesWowSareb == "1">
2271 <img class="lazy campanaLogoURL" src="${logoLotesWowSareb}" />
2272 <#elseif lotesWow == "1">
2273 <img class="lazy campanaLogoURL" src="${logoLotesWow}" />
2274 <#else>
2275 <#if inmueble.getLogoURL()?? && inmueble.getLogoURL()!=''>
2276 <img data-src="${inmueble.getLogoURL()}" class="lazy campanaLogoURL"/>
2277 </#if>
2278 </#if>
2279 </div>
2280 <div class="conjunta-link">
2281 <a href="${inmueble.getEnlaceURL()}" class='sh_icon-arrow-r noEnImpresion'></a>
2282 </div>
2283
2284 <#elseif (inmueble_tipologia_normalized == FriendlyURLNormalizerUtil.normalize(ServihabitatRetailUtils.CATEGORY_NAME_TRASTERO)?replace("-", "")?lower_case)
2285 || (inmueble_tipologia_conjunta_normalized == FriendlyURLNormalizerUtil.normalize(ServihabitatRetailUtils.CATEGORY_NAME_TRASTERO)?replace("-", "")?lower_case) >
2286 <div class="conjunta-datos">
2287
2288 <div class="features-list-fav">
2289
2290 <ul class="features-list">
2291 <#if (inmueble.isConjunta() == true)>
2292 <#--//TAREAPROY-47 si es conjunta mostrar sumatorio metros q ya viene por tipologia-->
2293 <li class="features-list-metros">${inmueble.getSumatorioMetros() + languageUtil.get(locale, "servihabitat-venta-conjunta-metros-cuadrados")}</li>
2294 <#else>
2295 <li class="features-list-metros">${inmueble.getSuperficie() + languageUtil.get(locale, "servihabitat-venta-conjunta-metros-cuadrados")}</li>
2296 </#if>
2297 </ul>
2298
2299 <#--anejos-->
2300 <#if (inmueble.isConjunta() == true) >
2301 <p class="incluye-otros">${languageUtil.get(locale, "servihabitat-venta-conjunta-incluye-otros")}</p>
2302 </#if>
2303 </div>
2304
2305 </div>
2306 <div class="conjunta-campanya">
2307 <#if lotesWowSareb == "1">
2308 <img class="lazy campanaLogoURL" src="${logoLotesWowSareb}" />
2309 <#elseif lotesWow == "1">
2310 <img class="lazy campanaLogoURL" src="${logoLotesWow}" />
2311 <#else>
2312 <#if inmueble.getLogoURL()?? && inmueble.getLogoURL()!=''>
2313 <img data-src="${inmueble.getLogoURL()}" class="lazy campanaLogoURL"/>
2314 </#if>
2315 </#if>
2316 </div>
2317 <div class="conjunta-link">
2318 <a href="${inmueble.getEnlaceURL()}" class='sh_icon-arrow-r noEnImpresion'></a>
2319 </div>
2320
2321 <#elseif (inmueble_tipologia_normalized == FriendlyURLNormalizerUtil.normalize(ServihabitatRetailUtils.CATEGORY_NAME_NAVE)?replace("-", "")?lower_case)
2322 || (inmueble_tipologia_conjunta_normalized == FriendlyURLNormalizerUtil.normalize(ServihabitatRetailUtils.CATEGORY_NAME_NAVE)?replace("-", "")?lower_case) >
2323 <div class="conjunta-datos">
2324
2325 <div class="features-list-fav">
2326
2327 <ul class="features-list">
2328 <#if (inmueble.isConjunta() == true)>
2329 <#--//TAREAPROY-47 si es conjunta mostrar sumatorio metros q ya viene por tipologia-->
2330 <li class="features-list-metros">${inmueble.getSumatorioMetros() + languageUtil.get(locale, "servihabitat-venta-conjunta-metros-cuadrados")}</li>
2331 <#else>
2332 <li class="features-list-metros">${inmueble.getSuperficie() + languageUtil.get(locale, "servihabitat-venta-conjunta-metros-cuadrados")}</li>
2333 </#if>
2334 </ul>
2335
2336 <#--anejos-->
2337 <#if (inmueble.isConjunta() == true) >
2338 <p class="incluye-otros">${languageUtil.get(locale, "servihabitat-venta-conjunta-incluye-otros")}</p>
2339 </#if>
2340
2341 </div>
2342
2343 </div>
2344 <div class="conjunta-campanya">
2345 <#if lotesWowSareb == "1">
2346 <img class="lazy campanaLogoURL" src="${logoLotesWowSareb}" />
2347 <#elseif lotesWow == "1">
2348 <img class="lazy campanaLogoURL" src="${logoLotesWow}" />
2349 <#else>
2350 <#if inmueble.getLogoURL()?? && inmueble.getLogoURL()!=''>
2351 <img data-src="${inmueble.getLogoURL()}" class="lazy campanaLogoURL"/>
2352 </#if>
2353 </#if>
2354 </div>
2355 <div class="conjunta-link">
2356 <a href="${inmueble.getEnlaceURL()}" class='sh_icon-arrow-r noEnImpresion'></a>
2357 </div>
2358
2359 <#elseif (inmueble_tipologia_normalized == FriendlyURLNormalizerUtil.normalize(ServihabitatRetailUtils.CATEGORY_NAME_TERRENO)?replace("-", "")?lower_case)
2360 || (inmueble_tipologia_conjunta_normalized == FriendlyURLNormalizerUtil.normalize(ServihabitatRetailUtils.CATEGORY_NAME_TERRENO)?replace("-", "")?lower_case)
2361 || (inmueble_tipologia_normalized == FriendlyURLNormalizerUtil.normalize(ServihabitatRetailUtils.CATEGORY_NAME_SUELO)?replace("-", "")?lower_case)
2362 || (inmueble_tipologia_conjunta_normalized == FriendlyURLNormalizerUtil.normalize(ServihabitatRetailUtils.CATEGORY_NAME_SUELO)?replace("-", "")?lower_case)>
2363 <div class="conjunta-datos">
2364
2365 <div class="features-list-fav">
2366
2367 <ul class="features-list">
2368 <#if (inmueble.isConjunta() == true)>
2369 <#--//TAREAPROY-47 si es conjunta mostrar sumatorio metros q ya viene por tipologia-->
2370 <li class="features-list-metros">${inmueble.getSumatorioMetros() + languageUtil.get(locale, "servihabitat-venta-conjunta-metros-cuadrados")}</li>
2371 <#else>
2372 <li class="features-list-metros">${inmueble.getSuperficie() + languageUtil.get(locale, "servihabitat-venta-conjunta-metros-cuadrados")}</li>
2373 </#if>
2374 </ul>
2375
2376 <#--anejos-->
2377 <#if (inmueble.isConjunta() == true) >
2378 <p class="incluye-otros">${languageUtil.get(locale, "servihabitat-venta-conjunta-incluye-otros")}</p>
2379 </#if>
2380 </div>
2381
2382 </div>
2383 <div class="conjunta-campanya">
2384 <#if lotesWowSareb == "1">
2385 <img class="lazy campanaLogoURL" src="${logoLotesWowSareb}" />
2386 <#elseif lotesWow == "1">
2387 <img class="lazy campanaLogoURL" src="${logoLotesWow}" />
2388 <#else>
2389 <#if inmueble.getLogoURL()?? && inmueble.getLogoURL()!=''>
2390 <img data-src="${inmueble.getLogoURL()}" class="lazy campanaLogoURL"/>
2391 </#if>
2392 </#if>
2393 </div>
2394 <div class="conjunta-link">
2395 <a href="${inmueble.getEnlaceURL()}" class='sh_icon-arrow-r noEnImpresion'></a>
2396 </div>
2397
2398 <#elseif (inmueble_tipologia_normalized == FriendlyURLNormalizerUtil.normalize(ServihabitatRetailUtils.CATEGORY_NAME_VARIOS)?replace("-", "")?lower_case)
2399 || (inmueble_tipologia_conjunta_normalized == FriendlyURLNormalizerUtil.normalize(ServihabitatRetailUtils.CATEGORY_NAME_VARIOS)?replace("-", "")?lower_case) >
2400 <div class="conjunta-datos">
2401
2402 <div class="features-list-fav">
2403
2404 <ul class="features-list">
2405 <#if (inmueble.isConjunta() == true)>
2406 <#--//TAREAPROY-47 si es conjunta mostrar sumatorio metros q ya viene por tipologia-->
2407 <li class="features-list-metros">${inmueble.getSumatorioMetros() + languageUtil.get(locale, "servihabitat-venta-conjunta-metros-cuadrados")}</li>
2408 <#else>
2409 <li class="features-list-metros">${inmueble.getSuperficie() + languageUtil.get(locale, "servihabitat-venta-conjunta-metros-cuadrados")}</li>
2410 </#if>
2411 </ul>
2412
2413 <#--anejos-->
2414 <#if (inmueble.isConjunta() == true) >
2415 <p class="incluye-otros">${languageUtil.get(locale, "servihabitat-venta-conjunta-incluye-otros")}</p>
2416 </#if>
2417 </div>
2418
2419 </div>
2420 <div class="conjunta-campanya">
2421 <#if lotesWowSareb == "1">
2422 <img class="lazy campanaLogoURL" src="${logoLotesWowSareb}" />
2423 <#elseif lotesWow == "1">
2424 <img class="lazy campanaLogoURL" src="${logoLotesWow}" />
2425 <#else>
2426 <#if inmueble.getLogoURL()?? && inmueble.getLogoURL()!=''>
2427 <img data-src="${inmueble.getLogoURL()}" class="lazy campanaLogoURL"/>
2428 </#if>
2429 </#if>
2430 </div>
2431 <div class="conjunta-link">
2432 <a href="${inmueble.getEnlaceURL()}" class='sh_icon-arrow-r noEnImpresion'></a>
2433 </div>
2434
2435
2436 <#elseif (inmueble_tipologia_normalized == FriendlyURLNormalizerUtil.normalize(ServihabitatRetailUtils.CATEGORY_NAME_OBRA_PARADA)?replace("-", "")?lower_case)
2437 || (inmueble_tipologia_conjunta_normalized == FriendlyURLNormalizerUtil.normalize(ServihabitatRetailUtils.CATEGORY_NAME_OBRA_PARADA)?replace("-", "")?lower_case) >
2438 <div class="conjunta-datos">
2439
2440 <div class="features-list-fav">
2441
2442 <ul class="features-list">
2443 <#if (inmueble.isConjunta() == true)>
2444 <#--//TAREAPROY-47 si es conjunta mostrar sumatorio metros q ya viene por tipologia-->
2445 <li class="features-list-metros">${inmueble.getSumatorioMetros() + languageUtil.get(locale, "servihabitat-venta-conjunta-metros-cuadrados")}</li>
2446 <#else>
2447 <li class="features-list-metros">${inmueble.getSuperficie() + languageUtil.get(locale, "servihabitat-venta-conjunta-metros-cuadrados")}</li>
2448 </#if>
2449 </ul>
2450
2451 <#--anejos-->
2452 <#if (inmueble.isConjunta() == true) >
2453 <p class="incluye-otros">${languageUtil.get(locale, "servihabitat-venta-conjunta-incluye-otros")}</p>
2454 </#if>
2455 </div>
2456
2457 </div>
2458 <div class="conjunta-campanya">
2459 <#if lotesWowSareb == "1">
2460 <img class="lazy campanaLogoURL" src="${logoLotesWowSareb}" />
2461 <#elseif lotesWow == "1">
2462 <img class="lazy campanaLogoURL" src="${logoLotesWow}" />
2463 <#else>
2464 <#if inmueble.getLogoURL()?? && inmueble.getLogoURL()!=''>
2465 <img data-src="${inmueble.getLogoURL()}" class="lazy campanaLogoURL"/>
2466 </#if>
2467 </#if>
2468 </div>
2469 <div class="conjunta-link">
2470 <a href="${inmueble.getEnlaceURL()}" class='sh_icon-arrow-r noEnImpresion'></a>
2471 </div>
2472
2473
2474 </#if>
2475
2476
2477 </div>
2478 </#if>
2479 <#-- CIERRO el div con class 'linea' -->
2480 </#list>
2481 </div>
2482 </div>
2483
2484
2485 </div>
2486
2487 <div class="clearfix"></div>
2488 <a href="" title="cerrar" data-dismiss="modal" class="sh_icon-close"></a>
2489 </div>
2490 </div>
2491 </div>
2492 <#--// FIN TAREAPROY-1674-->
2493
2494 </#if>
2495 <#-- ActividadInmuebles -->
2496 <section id="detail-activity-related" style="display: none">
2497 <p class="promo-related-msg promo-comercial-related-msg"><@liferay.language key="texto-inmueble-notas" /></p>
2498 <div class="activity-note">
2499 <span class="fa fa-comment"></span>
2500 <p id="notaContent1" class="notaText notaDisabled"><@liferay.language key="favoritos-publicar-nota-placeholder" /></p>
2501 <textarea id="notaContentTextArea" rows="4" cols="100" placeholder="<@liferay.language key="favoritos-publicar-nota-placeholder" />" disabled style="display: none;"></textarea>
2502 <p class="notaContent2" style="display: none"><@liferay.language key="texto-inmueble-notas-fecha" /><span></span></p>
2503 <span class="fa fa-pencil" onclick="enableNotas();"></span>
2504 <a class="button-publicar" onclick="disableNotas();" style="display: none;"><@liferay.language key="favoritos-publicar-nota" /></a>
2505 </div>
2506 </section>
2507 <#-- Descripción -->
2508 <div id="product-description" class="props_features">
2509 <h2><@liferay.language key="descripcion" /></h2>
2510
2511 <#assign descriptionCompra = ServihabitatRetailUtils.getLabel(descripcionPromocion.getData(), languageUtil.get(locale, "detalle-edificio-unknown")) />
2512 <#assign descriptionAlquiler = ServihabitatRetailUtils.getLabel(descripcionPromocionA.getData(), languageUtil.get(locale, "detalle-edificio-unknown")) />
2513 <p class="description">
2514 <#if tipoOperacion==languageUtil.get(locale, "home-filtro-compra")?lower_case >
2515 ${descriptionCompra}
2516 <#else>
2517 ${descriptionAlquiler}
2518 </#if>
2519 </p>
2520 </div>
2521
2522 <script>
2523 $( document ).ready(function() {
2524 if (isSmaller(480)){
2525 var showChar = 300;
2526 }
2527 else {
2528 var showChar = 600;
2529 };
2530 var content = $('#product-description p.description').text();
2531
2532 if(content.length > showChar){
2533 $('#product-description p.description').addClass('cortar');
2534 $('#product-description').append('<p class="leerMas"><@liferay.language key="leer-mas" /></p><p class="leerMenos"><@liferay.language key="Cerrar" /></p>');
2535
2536 $('#product-description p.leerMenos').hide();
2537 $('#product-description p.leerMas').click(function(){
2538 if($('#product-description p.description').hasClass('cortar')) {
2539 $('#product-description p.description').removeClass('cortar');
2540 }
2541 $('#product-description p.leerMas').hide();
2542 $('#product-description p.leerMenos').show();
2543 });
2544 $('#product-description p.leerMenos').click(function(){
2545 $('#product-description p.description').addClass('cortar');
2546 $('#product-description p.leerMas').show();
2547 $('#product-description p.leerMenos').hide();
2548 });
2549 }
2550 });
2551 </script>
2552
2553 <!-- INICIO TAREAPROY-943 Nuevos enlaces a recursos -->
2554 <#if calidades??>
2555 <#assign campoCalidades = ServihabitatRetailUtils.getLabel(calidades.getData(), languageUtil.get(locale, "detalle-edificio-unknown")) />
2556 </#if>
2557 <#if catalogo??>
2558 <#assign campoCatalogo = ServihabitatRetailUtils.getLabel(catalogo.getData(), languageUtil.get(locale, "detalle-edificio-unknown")) />
2559 </#if>
2560 <#if planos??>
2561 <#assign campoPlanos = ServihabitatRetailUtils.getLabel(planos.getData(), languageUtil.get(locale, "detalle-edificio-unknown")) />
2562 </#if>
2563 <#if nombreExtras??>
2564 <#assign campoNombreExtras = ServihabitatRetailUtils.getLabel(nombreExtras.getData(), languageUtil.get(locale, "detalle-edificio-unknown")) />
2565 </#if>
2566
2567 <#if nombreExtras?? && nombreExtras.getSiblings()?has_content>
2568 <#assign extrasList = nombreExtras.getSiblings() />
2569 <#list extrasList as curr_ext>
2570 <#assign refCert = curr_ext.getData() />
2571 <#assign campoEnlaceExtras = ServihabitatRetailUtils.getLabel(curr_ext.enlaceExtras.getData(), languageUtil.get(locale, "detalle-edificio-unknown")) />
2572 </#list>
2573 </#if>
2574
2575 <section id="descargas" class="props_features">
2576 <h2><@liferay.language key="ficha-inmueble-nuevos-links-descargas" /></h2>
2577 <ul class="product_nolist">
2578 <li>
2579 <span id="linkPDF_normal" onclick="javascript:descargarPDF(${referencia.getData()});"><@liferay.language key="ficha-inmueble-nuevos-links-ficha-inmueble" /></span>
2580 <span id="linkPDF_responsive" style="display:none;"><@liferay.language key="ficha-inmueble-nuevos-links-ficha-inmueble" /></span>
2581 </li>
2582 <#if (campoCalidades?? && campoCalidades != "" && campoCalidades != "-")>
2583 <li>
2584 <a target="_blank" href="${campoCalidades}" class="newLink">
2585 <@liferay.language key="ficha-inmueble-nuevos-links-calidades" />
2586 </a>
2587 </li>
2588 </#if>
2589 <#if (campoCatalogo?? && campoCatalogo != "" && campoCatalogo != "-")>
2590 <li>
2591 <a target="_blank" href="${campoCatalogo}" class="newLink">
2592 <@liferay.language key="ficha-inmueble-nuevos-links-catalogo" />
2593 </a>
2594 </li>
2595 </#if>
2596 <#if (campoPlanos?? && campoPlanos != "" && campoPlanos != "-")>
2597 <li>
2598 <a target="_blank" href="${campoPlanos}" class="newLink">
2599 <@liferay.language key="ficha-inmueble-nuevos-links-planos" />
2600 </a>
2601 </li>
2602 </#if>
2603 <#if (campoNombreExtras?? && campoNombreExtras != "" && campoNombreExtras != "-" && campoEnlaceExtras?? && campoEnlaceExtras != "" && campoEnlaceExtras != "-")>
2604 <li>
2605 <a target="_blank" href="${campoEnlaceExtras}" class="newLink">
2606 ${campoNombreExtras}
2607 </a>
2608 </li>
2609 </#if>
2610 </ul>
2611 </section>
2612 <!-- FIN TAREAPROY-943 Nuevos enlaces a recursos -->
2613
2614 <#-- TAREAPROY-3072 -->
2615 <#if (visitasCaso != "0") >
2616 <section id="num_visitas" class="props_features">
2617 <h2><@liferay.language key="ficha-inmueble-quenoteloquiten" /></h2>
2618
2619 <#if (visitasCaso == "1") >
2620 <p class="visitas"><@liferay.language key="ficha-inmueble-vistopor" /> <span>${visitasWeb}</span> <@liferay.language key="ficha-inmueble-personasmes" /></p>
2621 <p class="info"><span>${visitasCallme}</span> <@liferay.language key="ficha-inmueble-contactadopor" /></p>
2622 </#if>
2623 <#if (visitasCaso == "2") >
2624 <p class="visitas"><@liferay.language key="ficha-inmueble-vistopor" /> <span>${visitasWeb}</span> <@liferay.language key="ficha-inmueble-personasmes" /></p>
2625 <p class="info"><@liferay.language key="ficha-inmueble-seprimero" /></p>
2626 </#if>
2627 <#if (visitasCaso == "3") >
2628 <p class="visitas"><@liferay.language key="ficha-inmueble-eresprimero" /></p>
2629 </#if>
2630 <#if (visitasCaso == "4") >
2631 <p class="visitas"><@liferay.language key="ficha-inmueble-vistoporMas" /> <span>${visitasWeb}</span> <@liferay.language key="ficha-inmueble-personasmes" /></p>
2632 <p class="info"><@liferay.language key="ficha-inmueble-masde" /> <span>${visitasCallme}</span> <@liferay.language key="ficha-inmueble-contactadopor" /></p>
2633 </#if>
2634 <#if (visitasCaso == "5") >
2635 <p class="visitas"><@liferay.language key="ficha-inmueble-vistoporMas" /> <span>${visitasWeb}</span> <@liferay.language key="ficha-inmueble-personasmes" /></p>
2636 <p class="info"><span>${visitasCallme}</span> <@liferay.language key="ficha-inmueble-contactadopor" /></p>
2637 </#if>
2638 <#if (visitasCaso == "6") >
2639 <p class="visitas"><@liferay.language key="ficha-inmueble-vistopor" /> <span>${visitasWeb}</span> <@liferay.language key="ficha-inmueble-personasmes" /></p>
2640 <p class="info"><@liferay.language key="ficha-inmueble-masde" /> <span>${visitasCallme}</span> <@liferay.language key="ficha-inmueble-contactadopor" /></p>
2641 </#if>
2642 <#if (visitasFavorito != "0") && (visitasFavorito != "1")&& (visitasFavorito != "2")>
2643 <p class="infoFav"><@liferay.language key="ficha-inmueble-favorito" /> <span class="visitasFavorito">${visitasFavorito}</span> <@liferay.language key="ficha-inmueble-personas" /></p>
2644 </#if>
2645
2646 </section>
2647 </#if>
2648 <#-- Certificado energético -->
2649 <#if CertEnergetico.getSiblings()?has_content>
2650 <section id="product_e_cert" class="props_features">
2651 <h2><@liferay.language key="ficha-inmueble-certificado-energetico" /></h2>
2652 <#assign certsList = CertEnergetico.getSiblings() />
2653 <#list certsList as curr_cert>
2654 <#assign refCert = curr_cert.getData() />
2655 <#assign letraECert = curr_cert.letraE.getData() />
2656 <#assign letraCCert = curr_cert.letraC.getData() />
2657 <#assign valorECert = curr_cert.valorE.getData() />
2658 <#assign valorCCert = curr_cert.valorC.getData() />
2659 <#if valorECert!="" && valorCCert!="" && valorECert!="null" && valorCCert!="null">
2660
2661 <p><@liferay.language key="ficha-inmueble-certificado-energetico-clasificacion" />: <@liferay.language key="ficha-inmueble-certificado-energetico-clasificacion-disp" /></p>
2662 <div id="masInformacionCE_small">
2663 <img src="" class="MiniCertEner" />
2664 </div>
2665 <p>${valorECert} <@liferay.language key="ficha-inmueble-certificado-energetico-emisiones-valor" /></p>
2666 <a id="headingMasInformacionCE" href="#certyEnerModal" data-toggle="modal" title='<@liferay.language key="ficha-inmueble-certificado-energetico-mas-informacion" />' class="noEnImpresion">
2667 <@liferay.language key="ficha-inmueble-certificado-energetico-mas-informacion" /></a>
2668 <img id="imagenMasInformacionCE_impresion" src="" class="soloImpresion"/>
2669 <#else>
2670 <#assign textoMostrarCertY = curr_cert.descripcionE.getData() />
2671 <#if textoMostrarCertY?? && textoMostrarCertY!="" && textoMostrarCertY!="null">
2672 <#-- Caso especial Y, viene el texto a mostrar en el campo descripcion-->
2673 <p><@liferay.language key="ficha-inmueble-certificado-energetico-clasificacion" />: ${textoMostrarCertY}</p>
2674 <#else>
2675 <p><@liferay.language key="ficha-inmueble-certificado-energetico-clasificacion" />: <@liferay.language key="ficha-inmueble-certificado-energetico-ver-en-inmueble" /></p>
2676 </#if>
2677 </#if>
2678 </#list>
2679 </section>
2680 </#if>
2681
2682 <#-- ZonaInfo-->
2683
2684 <#assign zonaInfoList = zonaInfoLS.findByPoblacionTagKey(localidadUrl.data) />
2685 <#if validator.isNotNull(zonaInfoList) && zonaInfoList?? && zonaInfoList?first?? >
2686 <#assign zonaInfoObj = zonaInfoList?first />
2687 <section id="product_zonaInfo" class="props_features">
2688 <div class="zona-info-base">
2689 <h2><@liferay.language key="ficha-inmueble-zonaInfo-title" /></h2>
2690 <#if zonaInfoObj.barrio>
2691 <p><@liferay.language key="ficha-inmueble-zonaInfo-zona" />: <span class="dato">${zonaInfoObj.poblacionNormalizada?capitalize} (<@liferay.language key="ficha-inmueble-zonaInfo-municipio-minus" />: ${zonaInfoObj.poblacionName?capitalize})</span></p>
2692 <#else>
2693 <p><@liferay.language key="ficha-inmueble-zonaInfo-municipio" />: <span class="dato">${zonaInfoObj.poblacionName?capitalize}</span></p>
2694 </#if>
2695 <p><@liferay.language key="ficha-inmueble-zonaInfo-provincia" />: <span class="dato">${zonaInfoObj.provinciaNormalizada?capitalize}</span></p>
2696 <p><@liferay.language key="ficha-inmueble-zonaInfo-numHabitantes" />: <span class="dato">${zonaInfoObj.numHabitantes?string(",##0.##")}</span></p>
2697 <p><@liferay.language key="ficha-inmueble-zonaInfo-superficie" />: <span class="dato">${(zonaInfoObj.superficie / 1000000)?string(",##0.##")} km<sup>2</sup></span></p>
2698 </div>
2699
2700 <#if (zonaInfoObj.numFotos > 0) >
2701 <div class="zona-info-slider">
2702 <div id='owl-zonaInfo-container-${ServihabitatRetailUtils.getLabel(zonaInfoObj.zonaInfoId?string, languageUtil.get(locale, "detalle-edificio-unknown"))}' class="owl-container noImpresion">
2703 <div id='owl-zonaInfo-${ServihabitatRetailUtils.getLabel(zonaInfoObj.zonaInfoId?string, languageUtil.get(locale, "detalle-edificio-unknown"))}-pagination' class='owl-overlay-pagination opacity-on-hover view-property-photos' title='<@liferay.language key="ver-fotos" />'>
2704 <div class="contadorZonaInfo">
2705 <span class="current-slide-zonaInfo"></span>/<span class="total-slides-zonaInfo"></span>
2706 </div>
2707 </div>
2708
2709 <div id='flexslider-zonaInfo-${ServihabitatRetailUtils.getLabel(zonaInfoObj.zonaInfoId?string, languageUtil.get(locale, "detalle-edificio-unknown"))}' class=''>
2710
2711 <#assign imgURLPrincipal = "https://www.servihabitat.com/imgs/zona/mini/" + zonaInfoObj.zonaInfoId + "_1.jpg" >
2712 <div id="flexslider_zonaInfo" class="flexslider" style="width: 100%; height:100%;">
2713
2714 <ul class="slides" id="imageGalleryZonaInfo">
2715 <li>
2716 <img src="${imgURLPrincipal}" class="img-responsive image-slider-back" />
2717 <div class="image-slider-overlay"></div>
2718 <img src="${imgURLPrincipal}" class="img-responsive image-slider" />
2719
2720 </li>
2721 </ul>
2722 </div>
2723 </div>
2724
2725 <script>
2726
2727 $('#flexslider_zonaInfo').flexslider({
2728 animation: "fade",
2729 slideshow: false,
2730 controlNav: false,
2731 animationLoop: true,
2732 start: function(slider) {
2733
2734 if( ${zonaInfoObj.numFotos} > 1 ){
2735 try{
2736 var imgGalleryDivId = 'imageGalleryZonaInfo';
2737 var new_LiContent = '';
2738 for(var j=2 ; j <= ${zonaInfoObj.numFotos} ; j++){
2739 try{
2740 var imgURL = "https://www.servihabitat.com/imgs/zona/mini/" + ${zonaInfoObj.zonaInfoId?string} + "_" + j + ".jpg";
2741 new_LiContent = '<li style="display:block; opacity: 0;"><img data-src="'+imgURL+'" class="lazySlider image-slider-back" /><div class="image-slider-overlay"></div><img data-src="'+imgURL+'" class="lazySlider img-responsive image-slider" /></li>';
2742
2743 $('#flexslider_zonaInfo').data('flexslider').addSlide(new_LiContent);
2744
2745 } catch(error2){
2746 console.log(error2);
2747 }
2748 }
2749
2750 } catch(error){
2751 //console.log(error);
2752 }
2753 }
2754
2755 $('.total-slides-zonaInfo').text(slider.count);
2756 $('.current-slide-zonaInfo').text(slider.currentSlide+1);
2757
2758 $(slider)
2759 .find('img.lazySlider:eq(0)')
2760 .each(function() {
2761 var src = $(this).attr('data-src');
2762 $(this).attr('src', src).removeAttr('data-src');
2763 });
2764
2765 $(slider)
2766 .find('li.flex-active-slide img.img-responsive.image-slider')
2767 .each(function() {
2768 reescalarImagen($(this));
2769 });
2770
2771 },
2772 after: function(slider) {
2773 $('.total-slides-zonaInfo').text(slider.count);
2774 $('.current-slide-zonaInfo').text(slider.currentSlide+1);
2775 },
2776 before: function(slider) { // Fires asynchronously with each slider animation
2777 var slides = slider.slides,
2778 index = slider.animatingTo,
2779 $slide = $(slides[index]),
2780 $img = $slide.find('img[data-src]'),
2781 current = index,
2782 nxt_slide = current + 1,
2783 prev_slide = current - 1;
2784
2785 $slide
2786 .parent()
2787 .find('img.lazySlider.img-responsive.image-slider:eq(' + current + '), img.lazySlider.img-responsive.image-slider:eq(' + prev_slide + '), img.lazySlider.img-responsive.image-slider:eq(' + nxt_slide + '),img.lazySlider.image-slider-back:eq(' + current + '), img.lazySlider.image-slider-back:eq(' + prev_slide + '), img.lazySlider.image-slider-back:eq(' + nxt_slide + ')')
2788 .each(function() {
2789 var src = $(this).attr('data-src');
2790 $(this).attr('src', src).removeAttr('data-src');
2791
2792 });
2793
2794 //console.log('--------:' + current - 1);
2795 $slide
2796 .parent()
2797 .find('img.lazySlider.img-responsive.image-slider:eq(' + (current - 1) + ')')
2798 .each(function() {
2799 var src = $(this).attr('src');
2800 //console.log('*********:' + src);
2801
2802 //console.log('0:' + JSON.stringify($(this)));
2803 //console.log('0.1:' + $(this).html());
2804 //console.log('0.2:' + $(this).parent());
2805 //console.log('1:' + $(this).parent('li').hasClass('flex-active-slide'));
2806 //console.log('2:' + $(this).hasClass('image-slider'));
2807 //console.log('3:' + !($(this).hasClass("ajustarHeight") || $(this).hasClass("ajustarWidth")));
2808
2809 if ( $(this).hasClass('image-slider') && !($(this).hasClass("ajustarHeight") || $(this).hasClass("ajustarWidth"))) {
2810 //console.log('4: reescalarImagen: ' + $(this).attr('src') );
2811 reescalarImagen($(this));
2812 }
2813 });
2814 }
2815
2816 });
2817
2818 </script>
2819 </div>
2820 </div>
2821 </#if>
2822
2823 <#if zonaInfoObj?has_content >
2824 <#if ("ca_ES" == localeUtil.toLanguageId(locale) && zonaInfoObj.textoCat?has_content) >
2825 <div class="zona-info-description">
2826 <p>${zonaInfoObj.textoCat}</p>
2827 </div>
2828 <#elseif (zonaInfoObj.textoEsp?has_content) >
2829 <div class="zona-info-description">
2830 <p>${zonaInfoObj.textoEsp}</p>
2831 </div>
2832 </#if>
2833 </#if>
2834
2835 <div class="panel-group" id="accordion">
2836 <div class="panel panel-default">
2837 <div class="panel-heading">
2838 <h3 class="panel-title">
2839 <a data-toggle="collapse" data-parent="#accordion" href="#zonainfoDemografia" class="collapsed"><@liferay.language key="ficha-inmueble-zonaInfo-sociodemografia" /><span class="fa fa-plus"></span></a>
2840 </h3>
2841 </div>
2842 <div id="zonainfoDemografia" class="panel-collapse collapse">
2843 <div class="panel-body">
2844 <ul class="product_nolist">
2845 <li><@liferay.language key="ficha-inmueble-zonaInfo-sociodemografia-habitantes" />: ${zonaInfoObj.numHabitantes?string(",##0.##")}</li>
2846 <#if zonaInfoObj.numHogares?has_content && (zonaInfoObj.numHogares>0) >
2847 <li><@liferay.language key="ficha-inmueble-zonaInfo-sociodemografia-numHogares" />: ${zonaInfoObj.numHogares?string(",##0.##")}</li>
2848 </#if>
2849 <li><@liferay.language key="ficha-inmueble-zonaInfo-sociodemografia-edadMedia" />: ${zonaInfoObj.edadMedia?string(",##0.##")} <@liferay.language key="ficha-inmueble-zonaInfo-sociodemografia-edadMedia-anyos" /></li>
2850 <li><@liferay.language key="ficha-inmueble-zonaInfo-sociodemografia-extranjeros" />: ${zonaInfoObj.porcPobExtranjera?string(",##0.##")}%</li>
2851 <li><@liferay.language key="ficha-inmueble-zonaInfo-sociodemografia-nivelEstudios" />: ${languageUtil.get(locale, "ficha-inmueble-zonaInfo-sociodemografia-nivelEstudios-"+zonaInfoObj.nivelMedioEstudios)}</li>
2852 </ul>
2853 </div>
2854 </div>
2855 </div>
2856 <div class="panel panel-default">
2857 <div class="panel-heading">
2858 <h3 class="panel-title">
2859 <a data-toggle="collapse" data-parent="#accordion" href="#zonainfoViviendas" class="collapsed"><@liferay.language key="ficha-inmueble-zonaInfo-viviendas" /><span class="fa fa-plus"></span></a>
2860 </h3>
2861 </div>
2862 <div id="zonainfoViviendas" class="panel-collapse collapse">
2863 <div class="panel-body">
2864 <ul class="product_nolist">
2865 <li><@liferay.language key="ficha-inmueble-zonaInfo-viviendas-segundaResidencia" />: ${zonaInfoObj.porcSegundaResidencia?string(",##0.##")}%</li>
2866 <li><@liferay.language key="ficha-inmueble-zonaInfo-viviendas-hotelesPorHabitantes" />: ${zonaInfoObj.numHoteles?string(",##0.##")}</li>
2867 </ul>
2868 </div>
2869 </div>
2870 </div>
2871 <#if (zonaInfoObj.numParques?has_content && (zonaInfoObj.numParques>0))
2872 || (zonaInfoObj.numHospitales?has_content && (zonaInfoObj.numHospitales>0))
2873 || (zonaInfoObj.numCap?has_content && (zonaInfoObj.numCap>0))
2874 || (zonaInfoObj.numFarmacias?has_content && (zonaInfoObj.numFarmacias>0))
2875 || (zonaInfoObj.numEscuelaPrimaria?has_content && (zonaInfoObj.numEscuelaPrimaria>0))
2876 || (zonaInfoObj.numEscuelaSecundaria?has_content && (zonaInfoObj.numEscuelaSecundaria>0))
2877 || (zonaInfoObj.numParadaMetro?has_content && (zonaInfoObj.numParadaMetro>0))
2878 || (zonaInfoObj.numParadaFFCC?has_content && (zonaInfoObj.numParadaFFCC>0)) >
2879 <div class="panel panel-default">
2880 <div class="panel-heading">
2881 <h3 class="panel-title">
2882 <a data-toggle="collapse" data-parent="#accordion" href="#zonainfoServicios" class="collapsed"><@liferay.language key="ficha-inmueble-zonaInfo-servicios" /><span class="fa fa-plus"></span></a>
2883 </h3>
2884 </div>
2885
2886 <div id="zonainfoServicios" class="panel-collapse collapse">
2887 <div class="panel-body">
2888 <ul class="product_nolist">
2889 <#if zonaInfoObj.numParques?has_content && (zonaInfoObj.numParques>0) >
2890 <li><@liferay.language key="ficha-inmueble-zonaInfo-servicios-numParques" />: ${zonaInfoObj.numParques?string(",##0.##")}</li>
2891 </#if>
2892 <#if zonaInfoObj.numHospitales?has_content && (zonaInfoObj.numHospitales>0) >
2893 <li><@liferay.language key="ficha-inmueble-zonaInfo-servicios-numHospitales" />: ${zonaInfoObj.numHospitales?string(",##0.##")}</li>
2894 </#if>
2895 <#if zonaInfoObj.numCap?has_content && (zonaInfoObj.numCap>0) >
2896 <li><@liferay.language key="ficha-inmueble-zonaInfo-servicios-centrosAsistenciaPrimaria" />: ${zonaInfoObj.numCap?string(",##0.##")}</li>
2897 </#if>
2898 <#if zonaInfoObj.numFarmacias?has_content && (zonaInfoObj.numFarmacias>0) >
2899 <li><@liferay.language key="ficha-inmueble-zonaInfo-servicios-farmacias" />: ${zonaInfoObj.numFarmacias?string(",##0.##")}</li>
2900 </#if>
2901 <#if zonaInfoObj.numEscuelaPrimaria?has_content && (zonaInfoObj.numEscuelaPrimaria>0) >
2902 <li><@liferay.language key="ficha-inmueble-zonaInfo-servicios-escuelasPrimaria" />: ${zonaInfoObj.numEscuelaPrimaria?string(",##0.##")}</li>
2903 </#if>
2904 <#if zonaInfoObj.numEscuelaSecundaria?has_content && (zonaInfoObj.numEscuelaSecundaria>0) >
2905 <li><@liferay.language key="ficha-inmueble-zonaInfo-servicios-escuelasSecundaria" />: ${zonaInfoObj.numEscuelaSecundaria?string(",##0.##")}</li>
2906 </#if>
2907 <#if zonaInfoObj.numParadaMetro?has_content && (zonaInfoObj.numParadaMetro>0) >
2908 <li><@liferay.language key="ficha-inmueble-zonaInfo-servicios-numParadasMetroTranviaBus" />: ${zonaInfoObj.numParadaMetro?string(",##0.##")}</li>
2909 </#if>
2910 <#if zonaInfoObj.numParadaFFCC?has_content && (zonaInfoObj.numParadaFFCC>0) >
2911 <li><@liferay.language key="ficha-inmueble-zonaInfo-servicios-numEstacionesFerrocarril" />: ${zonaInfoObj.numParadaFFCC?string(",##0.##")}</li>
2912 </#if>
2913 </ul>
2914 </div>
2915 </div>
2916 </div>
2917 </#if>
2918
2919 <div class="panel panel-default">
2920 <div class="panel-heading">
2921 <h3 class="panel-title">
2922 <a data-toggle="collapse" data-parent="#accordion" href="#zonainfoLocalizacion" class="collapsed"><@liferay.language key="ficha-inmueble-zonaInfo-localizacion" /><span class="fa fa-plus"></span></a>
2923 </h3>
2924 </div>
2925 <div id="zonainfoLocalizacion" class="panel-collapse collapse">
2926 <div class="panel-body"><@liferay.language key="ficha-inmueble-zonaInfo-localizacion-distanciaCapital" />: ${zonaInfoObj.distanciaCapital?string(",##0.##")}km</div>
2927 </div>
2928 </div>
2929 </div>
2930
2931 </section>
2932 </#if>
2933
2934 <script>
2935 $( document ).ready(function() {
2936 $('#product_zonaInfo .panel-heading .panel-title a').on('click', function(){
2937 if($(this).hasClass('collapsed')){
2938 $('#product_zonaInfo .panel-heading .panel-title a span').removeClass('fa-minus');
2939 $('#product_zonaInfo .panel-heading .panel-title a span').addClass('fa-plus');
2940 $(this).find('.fa').removeClass('fa-plus');
2941 $(this).find('.fa').addClass('fa-minus');
2942 }
2943 else {
2944 $(this).find('.fa').removeClass('fa-minus');
2945 $(this).find('.fa').addClass('fa-plus');
2946 }
2947 });
2948 });
2949 </script>
2950
2951 </div>
2952
2953 <aside id="detail_aside">
2954 <div class="container-floatRight">
2955 <div class="feature-info">
2956
2957 <p class="amount">
2958
2959 <#assign precio = ServihabitatRetailUtils.getLabelNumber(precio_desde?string, "-1")?replace(".","")?number />
2960 <#if precio == 0 && precioCero?? && precioCero.data == "true">
2961
2962 <div class="precioConsultarDiv" tabindex="0" data-trigger="focus" data-toggle="popover" data-placement="left" data-html="true" data-content="<span href='javascript:void(0);' onclick='$('#popoverId').popover('hide');' class='sh_icon-close'></span><p>${languageUtil.get(locale, "detalle-inmueble-popover-precioConsultar")}</p>" data-original-title="" title="" class="precio-icon-popover">
2963 <img class="negociable-icon-popover" src="/servihabitat-retail-theme/images/info-popover-green.svg">
2964 <span class="price mostrarPrecioDesktop"><@liferay.language key="inmueble-precio-a-consultar-desktop" /></span>
2965
2966 </div>
2967
2968 <#else>
2969 <span class="desde-price"><@liferay.language key="desde" /></span>
2970 <span class="price">${ServihabitatRetailUtils.getLabelNumber(precio_desde?string, languageUtil.get(locale, "detalle-edificio-unknown"))}€</span>
2971 </#if>
2972
2973 <#if (proponTuPrecio=="true" && !isAlquiler && (!precioCero?? || precioCero.data == "false" || precioCero.data == "")) >
2974 <span class="precio-negociable promo">
2975 <span class="yellow_tagb"></span>
2976 <span class="precio"><@liferay.language key="precio-negociable" /></span>
2977 </span>
2978 </#if>
2979 </p>
2980
2981 <div class="ref-type">
2982 <span class="ref"><@liferay.language key="ficha-inmueble-referencia" /> ${ServihabitatRetailUtils.getLabel(referencia.getData(), languageUtil.get(locale, "detalle-edificio-unknown"))}</span>
2983 <#if nombreEstado!='' && nombreCategoria != ServihabitatRetailUtils.CATEGORY_NAME_TERRENO && nombreCategoria != ServihabitatRetailUtils.CATEGORY_NAME_SUELO>
2984 <span class="type">${ServihabitatRetailUtils.getLabel(nombreEstado, languageUtil.get(locale, "detalle-edificio-unknown"))}</span>
2985 </#if>
2986 </div>
2987
2988 </div>
2989
2990
2991 </div>
2992
2993 <div class="fix-aside affix-top">
2994 <div id="detail_aside_menu">
2995
2996 </div>
2997 </div>
2998 </aside>
2999 </div>
3000
3001 </div>
3002 </section>
3003
3004 <div class="propietario-textos-legales">
3005 <div class="container search-container-xs">
3006
3007 <div class="propietario">
3008 <#-- Propietario -->
3009
3010 <#if imagenPropietarioURL?exists >
3011 <#assign feature_imagenPropietarioURL = ServihabitatRetailUtils.getLabel(imagenPropietarioURL.getData(), "") />
3012 <#assign propietarioName = ServihabitatRetailUtils.getLabel(propietario.getData(), languageUtil.get(locale, "detalle-edificio-unknown")) />
3013 <#else>
3014 <#assign feature_imagenPropietarioURL = "" />
3015 <#assign propietarioName = ""/>
3016 </#if>
3017
3018 <#assign feature_imagenPropietarioEconomicoURL = "" />
3019 <#assign propietarioEconomicoName = "" />
3020
3021 <#if imagenPropietarioEconomicoURL?exists >
3022 <#assign feature_imagenPropietarioEconomicoURL = ServihabitatRetailUtils.getLabel(imagenPropietarioEconomicoURL.getData(), "") />
3023 <#assign propietarioEconomicoName = ServihabitatRetailUtils.getLabel(propietario.getData(), languageUtil.get(locale, "detalle-edificio-unknown")) />
3024 <#else>
3025 <#assign feature_imagenPropietarioEconomicoURL = "" />
3026 <#assign propietarioEconomicoName = "" />
3027
3028 </#if>
3029
3030 <#-- Solo mostrar Sareb y building Center de momento comentado || propietarioName =="5000"-->
3031 <#if (feature_imagenPropietarioEconomicoURL!="" )>
3032 <section id="product_owner" class="noImpresion">
3033 <h2><@liferay.language key="ficha-inmueble-propietario-economico-del-inmueble" /></h2>
3034 <#-- Fecha de actualización del inmueble -->
3035 <p class="fecha-actualizacion"> ${languageUtil.format(locale, "actualizado-el-x", [ja.getModifiedDate()?string('dd/MM/yyyy')])}</p>
3036 <img src="${feature_imagenPropietarioEconomicoURL}" alt="${ServihabitatRetailUtils.getLabel(propietarioEconomico.getData(), languageUtil.get(locale, " detalle-edificio-unknown "))}">
3037 </section>
3038 <#elseif (propietarioName=="0201s" || propietarioName=="0200" || propietarioName=="5000" || propietarioName=="5002" || propietarioName=="731" || propietarioName=="0731" || propietarioName=="5012" || propietarioName=="5015" ) && (feature_imagenPropietarioURL!="" )>
3039 <section id="product_owner" class="noImpresion">
3040 <h2><@liferay.language key="ficha-inmueble-propietario-del-inmueble" /></h2>
3041 <#-- Fecha de actualización del inmueble -->
3042 <p class="fecha-actualizacion"> ${languageUtil.format(locale, "actualizado-el-x", [ja.getModifiedDate()?string('dd/MM/yyyy')])}</p>
3043 <img src="${feature_imagenPropietarioURL}" alt="${ServihabitatRetailUtils.getLabel(propietario.getData(), languageUtil.get(locale, " detalle-edificio-unknown "))}">
3044 <section>
3045 </#if>
3046
3047
3048 </div>
3049
3050 <#-- Textos legales -->
3051 <#assign textoLegal_propietario_text = "" />
3052
3053 <#-- Obtención del texto legal del propietario -->
3054 <#attempt>
3055 <#assign siteGroup = groupLS.getGroup(themeDisplay.getScopeGroupId()) >
3056 <#if siteGroup?has_content && propietarioEconomico?exists && ServihabitatRetailUtils.getLabel(propietarioEconomico.getData(), "")!="" && propietario.getData()== "9995" >
3057 <#assign textoLegalId = propietarioEconomico.getData()?split("_")[0]/>
3058 <#if siteGroup.getExpandoBridge().getAttribute("svhPropietario"+getterUtil.getLong(propietario.getData())+"_"+propietarioEconomico.getData(), false)??>
3059 <#if propietarioEconomico.getData()?contains("_")>
3060 <#assign idTextoLegal_propietario_economico = siteGroup.getExpandoBridge().getAttribute("svhPropietario"+getterUtil.getLong(propietario.getData())+"_"+propietarioEconomico.getData(), false) >
3061 <#if journalArticleLS.getArticle(getterUtil.getLong(groupId), idTextoLegal_propietario_economico)??>
3062 <#assign textoLegal_propietario_ecnomocio_JournalArticle = journalArticleLS.getArticle(getterUtil.getLong(groupId), idTextoLegal_propietario_economico)/>
3063 <#assign textoLegal_propietario_economico_Entry = assetEntryLS.getEntry("com.liferay.portlet.journal.model.JournalArticle", textoLegal_propietario_ecnomocio_JournalArticle.resourcePrimKey) />
3064 <#assign textoLegal_propietario_economico_docXml = saxReaderUtil.read(textoLegal_propietario_economico_Entry.getAssetRenderer().getArticle().getContentByLocale(locale)) />
3065 <#assign textoLegal_propietario_text = textoLegal_propietario_economico_docXml.valueOf("//dynamic-element[@name='descripcion']/dynamic-content/text()") />
3066 <#else>
3067 <#assign textoLegal_propietario_text = "" />
3068 </#if>
3069 <#else>
3070 <#assign textoLegal_propietario_text = "" />
3071 </#if>
3072 <#else>
3073 <#assign textoLegal_propietario_text = "" />
3074 </#if>
3075 <#else>
3076 <#if siteGroup.getExpandoBridge().getAttribute("svhPropietario"+getterUtil.getLong(propietario.getData()), false)??>
3077 <#assign idTextoLegal_propietario = siteGroup.getExpandoBridge().getAttribute("svhPropietario"+getterUtil.getLong(propietario.getData()), false) >
3078
3079 <#if journalArticleLS.getArticle(getterUtil.getLong(groupId), idTextoLegal_propietario)??>
3080 <#assign textoLegal_propietario_JournalArticle = journalArticleLS.getArticle(getterUtil.getLong(groupId), idTextoLegal_propietario)/>
3081 <#assign textoLegal_propietario_Entry = assetEntryLS.getEntry("com.liferay.portlet.journal.model.JournalArticle", textoLegal_propietario_JournalArticle.resourcePrimKey) />
3082 <#assign textoLegal_propietario_docXml = saxReaderUtil.read(textoLegal_propietario_Entry.getAssetRenderer().getArticle().getContentByLocale(locale)) />
3083 <#assign textoLegal_propietario_text = textoLegal_propietario_docXml.valueOf("//dynamic-element[@name='descripcion']/dynamic-content/text()") />
3084 <#else>
3085 <#assign textoLegal_propietario_text = "" />
3086 </#if>
3087 <#else>
3088 <#assign textoLegal_propietario_text = "" />
3089 </#if>
3090 </#if>
3091 <#recover>
3092 <#assign textoLegal_propietario_text = "" />
3093 </#attempt>
3094
3095 <section id="detail_legal">
3096 <ul class="nolist">
3097 <li><a id="headingOne" data-toggle="modal" href="#legalOne" data-target="#legalOne" title="<@liferay.language key='ficha-inmueble-texto-legal-terminos-y-condiciones' />"><@liferay.language key="ficha-inmueble-texto-legal-terminos-y-condiciones" /></a></li>
3098 <#if textoLegal_propietario_text!="" >
3099 <#if propietario.getData()== "9995" && propietarioEconomico?exists && propietarioEconomico.getData() != "">
3100 <li><a id="headingTwo" data-toggle="modal" href="#legalTwo" data-target="#legalTwo" title="<@liferay.language key='ficha-inmueble-texto-legal-propietario-economico' />"><@liferay.language key="ficha-inmueble-texto-legal-propietario-economico" /></a></li>
3101 <#else>
3102 <li><a id="headingTwo" data-toggle="modal" href="#legalTwo" data-target="#legalTwo" title="<@liferay.language key='ficha-inmueble-texto-legal-propietario' />"><@liferay.language key="ficha-inmueble-texto-legal-propietario" /></a></li>
3103 </#if>
3104 </#if>
3105 <#if textoLegal_campanas_text!="" >
3106 <li><a id="headingThree" data-toggle="modal" href="#legalThree" data-target="#legalThree" title="<@liferay.language key='ficha-inmueble-texto-legal-condiciones-promocionales' />"><@liferay.language key="ficha-inmueble-texto-legal-condiciones-promocionales" /></a></li>
3107 </#if>
3108 </ul>
3109 </section>
3110
3111 <#attempt>
3112 <#assign idTextoLegal_terminos = ''/>
3113 <#if tipoOperacion==languageUtil.get(locale, "home-filtro-compra")?lower_case >
3114 <#assign idTextoLegal_terminos = propsUtil.get('servihabitat.detalle.idTextoLegalCompra')/>
3115 <#else>
3116 <#assign idTextoLegal_terminos = propsUtil.get('servihabitat.detalle.idTextoLegalAlquiler')/>
3117 </#if>
3118 <#if journalArticleLS.getArticle(getterUtil.getLong(groupId), idTextoLegal_terminos)??>
3119 <#assign textoLegal_terminos_JournalArticle = journalArticleLS.getArticle(getterUtil.getLong(groupId), idTextoLegal_terminos)/>
3120 <#assign textoLegal_terminos_Entry = assetEntryLS.getEntry("com.liferay.portlet.journal.model.JournalArticle", textoLegal_terminos_JournalArticle.resourcePrimKey) />
3121 <#assign textoLegal_terminos_docXml = saxReaderUtil.read(textoLegal_terminos_Entry.getAssetRenderer().getArticle().getContentByLocale(locale))/>
3122 <#assign textoLegal_terminos_text = textoLegal_terminos_docXml.valueOf("//static-content[@language-id='"+ locale + "']/text()") />
3123 </#if>
3124
3125 <#recover>
3126 </#attempt>
3127 </div>
3128
3129 </div>
3130
3131 </div>
3132 </div>
3133 </div>
3134
3135 <#-- Texto legal impresion-->
3136 <div id="legalOne_impresion" class="soloImpresion margenSup100 container">
3137 <p class='ficha-h4'><@liferay.language key="ficha-inmueble-texto-legal-terminos-y-condiciones" /></p>
3138 <div class="panel-body"><p>${textoLegal_terminos_text}</p></div>
3139 </div>
3140 <#if textoLegal_propietario_text!="" >
3141 <div id="legalTwo_impresion" class="soloImpresion container">
3142 <p class='ficha-h4'><@liferay.language key="ficha-inmueble-texto-legal-propietario" /></p>
3143 <div class="panel-body"><p>${textoLegal_propietario_text}</p></div>
3144 </div>
3145 </#if>
3146 <#if textoLegal_campanas_text!="" >
3147 <div id="legalThree_impresion" class="soloImpresion container">
3148 <p class='ficha-h4'><@liferay.language key="ficha-inmueble-texto-legal-condiciones-promocionales" /></p>
3149 <div class="panel-body"><p>${textoLegal_campanas_text}</p></div>
3150 </div>
3151 </#if>
3152
3153 <div id="footer_impresion" class="soloImpresion margenSup10 container"></div>
3154
3155 <div class="detail_action block-xs detail_action_promos">
3156 <a href="#_callback_WAR_servihabitatretailcallbackportlet_callForm" title='<@liferay.language key="te-llamamos-pregunta" />' data-toggle="modal" class="on orangebutton call-me" onClick="dataLayer.push({'event' : 'jsFormOpen', 'formName' : 'callForm', 'trigger' : 'click' });"><@liferay.language key="te-llamamos-pregunta" /></a>
3157
3158 <input type="hidden" id="accessWhatsapp" name="accessWhatsapp" value=""/>
3159 <#assign referencia9digt = referencia.getData()?left_pad(9, "0")/>
3160 <#assign referenciaCompuesta = "P"+propietarioName +"-"+referencia9digt/>
3161 <#assign referenciaFire = referencia.getData()/>
3162 <#assign mensajeCompuesto = ""/>
3163 <#if (!isAlquiler) >
3164 <input type="hidden" id="msjWhatsapp" name="msjWhatsapp" value="${languageUtil.format(locale, "callme-contactar-whatsapp-mensaje-venta", referenciaCompuesta)}"/>
3165 <#assign mensajeCompuesto = languageUtil.get(locale, "callme-contactar-whatsapp-mensaje-venta", referenciaCompuesta)/>
3166 <#else>
3167 <input type="hidden" id="msjWhatsapp" name="msjWhatsapp" value="${languageUtil.format(locale, "callme-contactar-whatsapp-mensaje-alquiler", referenciaCompuesta)}"/>
3168 <#assign mensajeCompuesto = languageUtil.get(locale, "callme-contactar-whatsapp-mensaje-alquiler", referenciaCompuesta)/>
3169 </#if>
3170 <input type="hidden" id="telefWhatsapp" name="telefWhatsapp" value="${propsUtil.get("telefono.contacta.whatsapp")}"/>
3171 <input type="hidden" id="urlWhatsapp" name="urlWhatsapp" value=""/>
3172
3173 <a target="_blank" name="enviarWhatsapp" id="enviarWhatsapp" title='<@liferay.language key="callme-contactar-whatsapp" />' class="on call-me-whatsapp item-whatsapp-contact" ><img src="/servihabitat-retail-theme/images/whatsapp.svg"> <p><@liferay.language key="callme-contactar-whatsapp" /> <span>Whatsapp</span></p></a>
3174
3175 <script>
3176
3177 $( document ).ready(function() {
3178 if(isMobile()){
3179 $('#accessWhatsapp').val('api');
3180 }else{
3181 $('#accessWhatsapp').val('web');
3182 }
3183 $('#urlWhatsapp').val("https://"+$('#accessWhatsapp').val()+".whatsapp.com/send?text="+$('#msjWhatsapp').val()+"&phone="+$('#telefWhatsapp').val());
3184 $('#enviarWhatsapp').attr("href", $('#urlWhatsapp').val());
3185
3186 $('#enviarWhatsapp').on('click', function(){
3187 addDataLayerDetailWhatsapp();
3188 window.open($('#urlWhatsapp').val(), '_blank', '');
3189 });
3190 });
3191 </script>
3192
3193 </div>
3194
3195 <#-- Modal mensaje callme -->
3196 <div id="showmeCallModal" class="envioOK modal modal_custom fade propound regular_form transparent" style="display: none">
3197 <div class="modal-dialog" >
3198 <div class="modal-content" >
3199 <section class="box propoundbox sinBorde">
3200 <div class="sh_icon-check"></div>
3201 <section class="sendit">
3202 <p class='ficha-h2' class="tituloCall">
3203 <@liferay.language key="callme-solEnviada" />
3204 </p>
3205 <p id="info-franja-hora-modal" class="info-franja-hora"></p>
3206 <p id="info-message-modal" class="info-message"></p>
3207 <div id="bloqueInsistirModalDetalle" style="display:none;">
3208 <p>
3209 <@liferay.language key="modal-contactar-insistir-rgpd-texto" />
3210 </p>
3211 <button type="button" name="botonInsistirModal2" id="botonInsistirModal2" onclick="aceptarModalInsis();" cssClass="enviar_button call-me" data-dismiss="modal"><@liferay.language key="modal-contactar-insistir-rgpd-boton" /></button>
3212
3213 </div>
3214 </section>
3215 </section>
3216 </div>
3217 <a class="sh_icon-close" id="_callback_WAR_servihabitatretailcallbackportlet_reset-modal" data-dismiss="modal" title="cerrar" href="javascript:void(0);"></a>
3218 </div>
3219 </div>
3220
3221 <#-- Modales textos legales -->
3222 <div id="legalOne" class="modal modal_custom fade propound regular_form transparent" role="dialog" style="display:none;">
3223 <div class="modal-dialog">
3224 <div class="modal-content">
3225 <p class='ficha-h4'><@liferay.language key="ficha-inmueble-texto-legal-terminos-y-condiciones" /></p>
3226 <a href="javascript:void(0);" title="<@liferay.language key='Cerrar' />" data-dismiss="modal" data-target="#legalOne" class="sh_icon-close"></a>
3227 <#attempt>
3228 <#assign idTextoLegal_terminos = ''/>
3229 <#if tipoOperacion==languageUtil.get(locale, "home-filtro-compra")?lower_case >
3230 <#assign idTextoLegal_terminos = propsUtil.get('servihabitat.detalle.idTextoLegalCompra')/>
3231 <#else>
3232 <#assign idTextoLegal_terminos = propsUtil.get('servihabitat.detalle.idTextoLegalAlquiler')/>
3233 </#if>
3234 <#if journalArticleLS.getArticle(getterUtil.getLong(groupId), idTextoLegal_terminos)??>
3235 <#assign textoLegal_terminos_JournalArticle = journalArticleLS.getArticle(getterUtil.getLong(groupId), idTextoLegal_terminos)/>
3236 <#assign textoLegal_terminos_Entry = assetEntryLS.getEntry("com.liferay.portlet.journal.model.JournalArticle", textoLegal_terminos_JournalArticle.resourcePrimKey) />
3237 <#assign textoLegal_terminos_docXml = saxReaderUtil.read(textoLegal_terminos_Entry.getAssetRenderer().getArticle().getContentByLocale(locale))/>
3238 <#assign textoLegal_terminos_text = textoLegal_terminos_docXml.valueOf("//static-content[@language-id='"+ locale + "']/text()") />
3239 <p>${textoLegal_terminos_text}</p>
3240 <#else>
3241 <@liferay.language key="com.servihabitat.noContentFound" />
3242 </#if>
3243
3244 <#recover>
3245 <@liferay.language key="com.servihabitat.noContentFound" />
3246 </#attempt>
3247 </div>
3248 </div>
3249 </div>
3250
3251
3252
3253 <#if textoLegal_propietario_text!="" >
3254 <div id="legalTwo" class="modal modal_custom fade propound regular_form transparent" role="dialog" style="display:none;">
3255 <div class="modal-dialog">
3256 <div class="modal-content">
3257 <p class='ficha-h4'><@liferay.language key="ficha-inmueble-texto-legal-propietario" /></p>
3258 <a href="javascript:void(0);" title="<@liferay.language key='Cerrar' />" data-dismiss="modal" data-target="#legalTwo" class="sh_icon-close"></a>
3259 <p>${textoLegal_propietario_text}</p>
3260 </div>
3261 </div>
3262 </div>
3263
3264 </#if>
3265 <#if textoLegal_campanas_text!="" >
3266 <div id="legalThree" class="modal modal_custom fade propound regular_form transparent" role="dialog" style="display:none;">
3267 <div class="modal-dialog">
3268 <div class="modal-content">
3269 <p class='ficha-h4'><@liferay.language key="ficha-inmueble-texto-legal-condiciones-promocionales" /></p>
3270 <a href="javascript:void(0);" title="<@liferay.language key='Cerrar' />" data-dismiss="modal" data-target="#legalThree" class="sh_icon-close"></a>
3271 <p>${textoLegal_campanas_text}</p>
3272 </div>
3273 </div>
3274 </div>
3275 </#if>
3276
3277 <#-- Inicio Modal confirmacion Ficha -->
3278 <div class="modal modal_custom modal_confirm fade propound regular_form transparent" id="confirmationModal-favoritosFicha" role="dialog" style="display:block;">
3279 <div class="modal-dialog">
3280
3281 <#-- Modal content-->
3282 <div class="modal-content modalConfirmacion">
3283 <div class="modal-body" id="modal-body-favoritosFicha">
3284 <input type="hidden" name="idAborrarFicha" id="idAborrarFicha" value=""/>
3285 <p class='ficha-h2'>
3286 <@liferay.language key="favoritos-switch-off-inmueble-favorito-title" />
3287 </p>
3288 <p>
3289 <@liferay.language key="favoritos-switch-off-inmueble-favorito-content" />
3290 </p>
3291 </div>
3292 <div class="modal-footer">
3293 <button type="button" class="delete_accept" onclick="continuarBajaFicha();" data-dismiss="modal"><@liferay.language key="favoritos-switch-off-inmueble-favorito-button-ok" /></button>
3294 <button type="button" class="delete_cancel" onclick="cancelarBajaFicha();" data-dismiss="modal"><@liferay.language key="favoritos-switch-off-inmueble-favorito-button-ko" /></button>
3295 </div>
3296 </div>
3297 <a class="sh_icon-close" onclick="cancelarBaja();" id="resetPropFicha" data-dismiss="modal" title="<@liferay.language key="Cerrar" />" href=""></a>
3298 </div>
3299 </div>
3300
3301
3302 <script>
3303 <#assign usuario = themeDisplay.getUserId() />
3304 <#assign estaLogueado = themeDisplay.isSignedIn()/>
3305 <#if estaLogueado ==true >
3306 var estaLogueado='true';
3307 <#else>
3308 var estaLogueado='false';
3309 </#if>
3310
3311 AUI().ready('array-extras', function(A){
3312 <#-- Ocultar elementos tablet -->
3313 if(isTabletOrMobile())
3314 {
3315 $('a.print-property').css('display','none');
3316 }
3317
3318 <#-- carga si es favorito -->
3319 if(estaLogueado=='true')
3320 {
3321 Liferay.Service('/servihabitat-retail-favoritos-usuario-portlet.favorito/obtener-favoritos',
3322 {
3323 jsonString: '{"userid":${usuario}, "signed":true, "fromMenu":false, "localeStr":"'+themeDisplay.getLanguageId()+'"}'
3324 },
3325 function(obj) {
3326 // alert('obtener-favoritos'+obj);
3327
3328 var objparseado = jQuery.parseJSON(obj);
3329 var data = objparseado.resultado;
3330 for(var i in data) {
3331 var ref = data[i].referencia;
3332 if (${referencia.getData()} == ref) {
3333 $('#botonesHeaderInmuebleMobile li.guardarFavorito').addClass("solid");
3334 }
3335 }
3336
3337 $("a.sh_icon-heart").each(function() {
3338 var refThis =$(this);
3339 var referencia =$(this).attr('id');
3340 //recorrer array
3341 //alert('referencia'+referencia);
3342 for(var i in data)
3343 {
3344 var id = data[i].referencia;
3345 //si es la misma le cambio el icono
3346 if(referencia == id)
3347 {
3348 //alert('entro' + refThis);
3349 refThis.removeClass('sh_icon-heart');
3350 refThis.addClass('sh_icon-heart_solid');
3351 refThis.parent().addClass('solid');
3352
3353 //notas
3354 var nota = data[i].nota;
3355 if(nota != null && nota.length>0)
3356 {
3357 $("#notaContent1").text(nota);
3358 $("#notaContent1").show();
3359 $("#notaContentTextArea").val(nota);
3360 $(".notaContent2 span").html(' ' +data[i].fecha);
3361 $(".notaContent2").show();
3362
3363 }
3364 $("#detail-activity-related").show();
3365 }
3366
3367 }
3368 });
3369
3370 $("a.sh_icon-heart_solid").each(function() {
3371 var refThis =$(this);
3372 var referencia =$(this).attr('id');
3373 //recorrer array
3374 //alert('referencia'+referencia);
3375 for(var i in data)
3376 {
3377 var id = data[i].referencia;
3378 //si es la misma le cambio el icono
3379 if(referencia == id)
3380 {
3381
3382 //notas
3383 var nota = data[i].nota;
3384 if(nota != null && nota.length>0)
3385 {
3386 $("#notaContent1").text(nota);
3387 $("#notaContent1").show();
3388 $("#notaContentTextArea").val(nota);
3389 $(".notaContent2 span").html(' ' +data[i].fecha);
3390 $(".notaContent2").show();
3391
3392 }
3393 $("#detail-activity-related").show();
3394 }
3395
3396 }
3397 });
3398 }
3399 );
3400
3401 }
3402
3403
3404 <#-- Compartir redesSociales -->
3405 var sharingContainerId = "compartirRedesDiv";
3406 var sharingContainerClass = "compartirRedesClass";
3407 if (isSmaller(767)){
3408 sharingContainerId = "compartirRedesDivMobile";
3409 sharingContainerClass = "compartirRedesClass2";
3410 }
3411
3412 $('.'+sharingContainerClass).share({
3413 socialIcons : {
3414
3415 twitter : {
3416 show : true,
3417 title : "${languageUtil.get(locale, "servihabitat-compartir-redes-email-asunto")}",
3418 text : "${languageUtil.get(locale, "servihabitat-compartir-redes-email-asunto")}"
3419 },
3420 linkedin : {
3421 show : true,
3422 title : "${languageUtil.get(locale, "servihabitat-compartir-redes-email-asunto")}",
3423 summary :"${languageUtil.get(locale, "servihabitat-compartir-redes-email-cuerpo")}"
3424 },
3425 facebook : {
3426 show : true,
3427 title : "${languageUtil.get(locale, "servihabitat-compartir-redes-email-asunto")}",
3428 text : "${languageUtil.get(locale, "servihabitat-compartir-redes-email-asunto")}",
3429 summary : "${languageUtil.get(locale, "servihabitat-compartir-redes-email-asunto")}"
3430 },
3431 whatsapp : {
3432 show : true,
3433 title : "${languageUtil.get(locale, "servihabitat-compartir-redes-email-asunto")}",
3434 text : "${languageUtil.get(locale, "servihabitat-compartir-redes-email-asunto")}"
3435 },
3436 email : {
3437 show : true,
3438 asuntoMail : "${languageUtil.get(locale, "servihabitat-compartir-redes-email-asunto")}",
3439 cuerpoMail : "${languageUtil.get(locale, "servihabitat-compartir-redes-email-cuerpo")}"
3440 }
3441 },
3442 mandatory : {
3443 containerId: (''+sharingContainerId),
3444 APIkey : "3405d36b-1918-47de-aac4-0c8ad1e96633",
3445 URL : (''+document.location)
3446 }
3447 });
3448
3449 });
3450
3451 $(document).ready( function() {
3452 <#-- Scroll animado en caso de que venga por URL -->
3453 var location_hash_tmp = location.hash;
3454 var location_hash = location_hash_tmp.replace("_tmp", "");
3455 if(location_hash.length>0){
3456 setTimeout(function(){ scrollToElement(location_hash, 0); }, 3000);
3457 } else {
3458 refreshScroll(); <#-- Hay que mover el scroll para que se actualice el affix -->
3459 }
3460
3461 <#-- ver mas -->
3462
3463 var $deltaVerMas=4;
3464 var $totalItems = $('div.list-related.paginable.soloImpresion').length;
3465 //iniciar mostrando los primeros
3466 $('div.list-related.paginable.soloImpresion:lt('+$deltaVerMas+')').removeClass('soloImpresion');
3467
3468 // var $visibleItems = $('div.list-related.paginable:visible').length;
3469
3470 //ocultar si no hay mas al inicio
3471 if (($deltaVerMas) >= $totalItems) {
3472 $('.more-trigger').hide();
3473 }
3474
3475 $('.more-trigger').click(function(el) {
3476 el.preventDefault();
3477
3478 //mostrar modal
3479 $('#detallePromo_popup').modal('toggle');
3480
3481 //if (($visibleItems+$deltaVerMas) >= $totalItems) {
3482 // $('div.list-related.paginable.soloImpresion').removeClass('soloImpresion');
3483 // //ocultar si no hay mas
3484 // $('.more-trigger').hide();
3485 // }
3486 // else
3487 // {
3488 //
3489 // $('div.list-related.paginable.soloImpresion:lt('+$deltaVerMas+')').removeClass('soloImpresion');
3490 // }
3491 // //actualizar total
3492 // $visibleItems = $('div.list-related.paginable:visible').length;
3493
3494 });
3495 <#-- fin ver mas -->
3496
3497 <#-- Popups -->
3498 $('.popup-youtube, .popup-vimeo, .popup-gmaps').magnificPopup({
3499 disableOn: 700,
3500 type: 'iframe',
3501 mainClass: 'mfp-fade',
3502 removalDelay: 160,
3503 preloader: false,
3504
3505 fixedContentPos: false
3506 });
3507
3508 $(".precioConsultarDiv").on("click", function() {
3509 if(isMobile()) {
3510 $('.precioConsultarDiv').popover('hide');
3511 accionesBotonContactar();
3512 $('#_callback_WAR_servihabitatretailcallbackportlet_callForm').modal('toggle');
3513 }
3514 });
3515
3516 <#if (enlaceSiguiente?? && enlaceSiguiente!="")>
3517 $('#botonesHeaderInmuebleMobile li.siguiente a').attr("onclick", "enlaceInmueble('${enlaceSiguiente}')");
3518 <#else>
3519 $('#botonesHeaderInmuebleMobile li.siguiente').addClass("disabled", true);
3520 </#if>
3521
3522 <#if (enlaceAnterior?? && enlaceAnterior!="")>
3523 $('#botonesHeaderInmuebleMobile li.anterior a').attr("onclick", "enlaceInmueble('${enlaceAnterior}')");
3524 <#else>
3525 $('#botonesHeaderInmuebleMobile li.anterior').addClass("disabled", true);
3526 </#if>
3527
3528 $('#botonesHeaderInmuebleMobile li.guardarFavorito a').attr("onclick", "gestionarFavoritoFicha('${referencia.getData()}','${favCategory}','${tipoOperacion?lower_case}', this, true)");
3529
3530 $('.popup-video-gallery').each(function() {
3531 $(this).magnificPopup({
3532 delegate: 'a', // the selector for gallery item
3533 disableOn: mobileResolution,
3534 type: 'iframe',
3535 mainClass: 'mfp-fade',
3536 removalDelay: 160,
3537 preloader: true,
3538 gallery: {
3539 enabled:true
3540 }
3541 });
3542 });
3543
3544 <#-- Tabla de inmuebles relacionados o que se venden conjuntamente con este -->
3545 //Ordenacion de los relacionados segun busqueda
3546
3547 //console.log('${searched_category_name}');
3548 //$("#contenidoNoImpresion .list-related-${searched_category_name}").prependTo('#contenidoNoImpresion #detail-promo-related .container.promSelector');
3549 //Se muestra el titulo descriptivo de los relacionados en la promo en caso de que existan
3550 <#if showPromoRelatedDesc == true >
3551 $('.product-promo-description').removeClass('hidden-element');
3552 </#if>
3553
3554 <#-- Incorporación del portlet de migas en la plantilla -->
3555 if (isMobile()){
3556 $("#back_link").appendTo('#plantilla-inmueble-migas-div');
3557 $("#back_link").show();
3558
3559 $("#promo_back_link").appendTo('#promoBackLink');
3560 $("#promo_back_link").show();
3561 } else {
3562 $("#p_p_id_migas_WAR_servihabitatretailmigasportlet_").appendTo('#plantilla-inmueble-migas-div');
3563
3564 $("#promo_back_link").appendTo('#promoBackLink');
3565 $("#promo_back_link").show();
3566 }
3567
3568 <#-- Seleccion de valor en caso de pulsar back -->
3569 $("select").each(function () {
3570 $(this).val($(this).find('option[selected]').val());
3571 });
3572
3573
3574 AUI().ready('liferay-portlet-url', function(A) {
3575
3576 var resourceDetalleURL = '';
3577 resourceDetalleURL = Liferay.PortletURL.createResourceURL();
3578 resourceDetalleURL.setPortletId("detalle_WAR_servihabitatretaildetalleportlet");
3579 resourceDetalleURL.setParameter("referencia", '${referencia.getData()}');
3580
3581 $.ajax({
3582 url: resourceDetalleURL,
3583 success: function(msg){
3584 var resultado= JSON.parse(msg);
3585 if (resultado.primeraVezDetalle == 'NO') {
3586 $('#flexslider').flexslider('next');
3587 }
3588 },
3589 error: function(XMLHttpRequest, textStatus, errorThrown) {
3590 console.log("error"+errorThrown);
3591 }
3592 });
3593
3594 });
3595
3596 });
3597
3598 <#-- gestion favorito ficha -->
3599 var categoriaGlobalFicha;
3600 var operacionGlobalFicha;
3601 var aCallerGlobalFicha;
3602
3603
3604 <#-- TAREAPROY-3072 -->
3605 function actualizaContadorFav(isSuma)
3606 {
3607 if(isSuma)
3608 {
3609 $('.visitasFavorito').each(function( index ) {
3610 var valor = $( this ).text(); var ivalor=(parseInt(valor, 10) +1);$( this ).text(ivalor);
3611 });
3612 }
3613 else
3614 {
3615 $('.visitasFavorito').each(function( index ) {
3616 var valor = $( this ).text(); var ivalor=(parseInt(valor, 10) -1);$( this ).text(ivalor);
3617 });
3618 }
3619 }
3620
3621 function gestionarFavoritoFicha(referencia, categoria, operacion, aCaller, checkbaja) {
3622 if(estaLogueado=='true')
3623 {
3624
3625 //modal confirmar solo para bajas
3626 if (checkbaja && $(aCaller).hasClass('sh_icon-heart_solid')) {
3627 categoriaGlobal=categoria;
3628 operacionGlobal=operacion;
3629 aCallerGlobal=aCaller;
3630 confirmarBajaFavoritoFicha(referencia);
3631 }
3632 else
3633 {
3634 Liferay.Service('/servihabitat-retail-favoritos-usuario-portlet.favorito/gestionar-favorito', {
3635 jsonString: '{"userid":${usuario}, "signed":' + estaLogueado + ' ,"referencia":"' + referencia + '" , categoria:"' + categoria + '","operacion":"' + operacion + '"}'
3636 },
3637 function(obj) {
3638 var obj = jQuery.parseJSON(obj);
3639 //alert('gestionarFavoritoFicha '+obj);
3640 if (obj.resultado === 'BAJAOK' || obj.resultado === 'ALTAOK') {
3641
3642 if (obj.resultado === 'ALTAOK') {
3643 $('#botonesHeaderInmuebleMobile li.guardarFavorito').addClass("solid");
3644 } else {
3645 $('#botonesHeaderInmuebleMobile li.guardarFavorito').removeClass("solid");
3646 }
3647
3648 if ($(aCaller).hasClass('sh_icon-heart') && obj.resultado === 'ALTAOK') {
3649 //$(aCaller).removeClass('sh_icon-heart');
3650 //$(aCaller).addClass('sh_icon-heart_solid');
3651 $('#product_detail').find('a.sh_icon-heart').each(function() {
3652 $(this).removeClass('sh_icon-heart');
3653 $(this).addClass('sh_icon-heart_solid');
3654 $(this).parent().addClass('solid');
3655 });
3656 $("#detail-activity-related").show();
3657 //TAREAPROY-3072
3658 actualizaContadorFav(true);
3659 // nuevo evento datalayer GA4
3660 addEventToDatalayerDetail('add_to_wishlist');
3661
3662 } else {
3663 //$(aCaller).removeClass('sh_icon-heart_solid');
3664 //$(aCaller).addClass('sh_icon-heart');
3665 $('#product_detail').find("a.sh_icon-heart_solid").each(function() {
3666 $(this).removeClass('sh_icon-heart_solid');
3667 $(this).addClass('sh_icon-heart');
3668 $(this).parent().removeClass('solid');
3669 });
3670
3671 //borrar y ocultar notas
3672 $("#notaContentTextArea").val('');
3673 $("#notaContent1").text('<@liferay.language key="favoritos-publicar-nota-placeholder" />');
3674 $("#notaContent1").show();
3675 $("#notaContentTextArea").hide();
3676 $(".notaContent2").hide();
3677 $("#detail-activity-related").hide();
3678 //TAREAPROY-3072
3679 actualizaContadorFav(false);
3680 }
3681
3682 }
3683 }
3684 );
3685 }
3686 }
3687 else
3688 {
3689 var path = $(location).attr('pathname');
3690 var params = $(location).attr('search');
3691 params = params.replace(/&/g, '$');
3692 path = path+params;
3693 //location.href='${urlLogin}?referencia='+referencia+'&categoria='+categoria+'&operacion='+operacion+'&pathBack='+path;
3694 //kek
3695 $("div#login_content_general").remove();
3696 $("div#login_content_savsearch").remove();
3697 var oldActionString = $("form#_58_fm").attr('action');
3698 if (!(oldActionString.indexOf("categoria=") > -1)) {
3699 var newActionString = oldActionString + '&referencia=' + referencia + '&categoria=' + categoria + '&operacion=' + operacion + '&pathBack=' + window.location.href;
3700 $("form#_58_fm").attr('action', newActionString);
3701 }
3702 $('div.socialauth ul li a').each(function( index ) {
3703 var oldActionStringSocial = $( this ).attr("href");
3704 if (!(oldActionStringSocial.indexOf("categoria=") > -1)) {
3705 var newActionStringSocial = oldActionStringSocial + '&referencia=' + referencia + '&categoria=' + categoria + '&operacion=' + operacion + '&pathBack=' + window.location.href;
3706 $( this ).attr("href",newActionStringSocial);
3707 }
3708 });
3709 $("#loginOne").modal('toggle');
3710
3711 }
3712 }
3713
3714 function confirmarBajaFavoritoFicha(referencia) {
3715 $("#modal-body-favoritosFicha #idAborrarFicha").val(referencia);
3716 $("#confirmationModal-favoritosFicha").modal('toggle');
3717 //evento SEO
3718 dataLayer.push({
3719 'event': 'virtualPage',
3720 'virtualPageAction': 'show',
3721 'virtualPageName': 'popupAlertFilterSelection'
3722 });
3723 }
3724
3725 function continuarBajaFicha() {
3726 var idparaBorrar = $('#modal-body-favoritosFicha #idAborrarFicha').val();
3727 gestionarFavoritoFicha(idparaBorrar,categoriaGlobal, operacionGlobal,aCallerGlobal,false);
3728 }
3729
3730 function cancelarBajaFicha() {
3731 var idparaBorrar = $('#modal-body-favoritosFicha #idAborrarFicha').val();
3732 $("#boton_favorito_"+idparaBorrar).addClass("active");
3733 }
3734
3735
3736 <#-- Imprimir -->
3737 var contenidoAnterior='';
3738 function imprimirFicha(referencia)
3739 {
3740
3741
3742 contenidoAnterior=$("#contenidoNoImpresion" ).html();
3743 $('#contenidoImpresion').append(contenidoAnterior);
3744 //Añadimos la clase no-print a los elementos que no queremos que se impriman
3745 $('#detail_header, .noImpresion, #contenidoImpresion #headingMasInformacionCE, #contenidoImpresion p.fecha-actualizacion, #politica_de_cookies_container,#cookies, #contenidoImpresion #accordion, #header,a.sh_icon-close, #contenidoImpresion .modal-dialog, #contenidoImpresion #gallery-inmueble, #contenidoImpresion #plantilla-inmueble-migas-div, #contenidoImpresion span.zone, #product_header span.type, .destacados-portlet, #footer, #detail_legal, #detail_legal_text, #detail_action, .taglib-icon,#contenidoImpresion #detail_aside_menu,#contenidoImpresion #detail_aside,#contenidoImpresion a.head-map,#contenidoImpresion #pois-selector, .leaflet-popup-close-button, .leaflet-popup-content-wrapper, .leaflet-control-zoom.leaflet-bar.leaflet-control, #contenidoImpresion span.map-hidden-xs, #contenidoImpresion span.sh_icon-map, .portlet-dockbar, div.leaflet-control-attribution, #contenidoImpresion a.popup-youtube, a.sh_icon-arrow-r, .list-inline.language, .owl-overlay-pagination, #contenidoImpresion #p_p_id_destacados_WAR_servihabitatretaildestacadosportlet_, .portlet-close-icon, .taglib-icon, .modal, #information').addClass('noEnImpresion');
3746
3747 //acciones previas impresión
3748 var srcLogoImpr=$('.custom-logo').children('img').attr('src');
3749 //console.log('srcLogo '+srcLogoImpr);
3750 $('#contenidoImpresion #retailLogo_impresion').attr("src", srcLogoImpr);
3751
3752 var urlImgImpr=$('#contenidoNoImpresion div.owl-item.active .item .detailbox-img-div').css('background-image');
3753 urlImgImpr = urlImgImpr.replace('url(','').replace(')','').replace(/\"/gi, "");
3754 //console.log('urlImgImpr '+urlImgImpr);
3755 $('#contenidoImpresion #imgPrincipal_impresion').attr("src", urlImgImpr);
3756
3757 //var urlImgPorponImpr=$('#contenidoNoImpresion span.yellow_tagb').css('background-image');
3758 //urlImgPorponImpr = urlImgPorponImpr.replace('url(','').replace(')','').replace(/\"/gi, "");
3759 //console.log('urlImgPorponImpr '+urlImgPorponImpr);
3760 //$('#contenidoImpresion #imgPropon_impresion').attr("src", urlImgPorponImpr);
3761
3762
3763 var urlImgCertImpr=$('#certyEnerModal').children('div').children('div').children('img').attr('src');;
3764 //console.log('urlImgCertImpr '+urlImgCertImpr);
3765 $('#contenidoImpresion #imagenMasInformacionCE_impresion').attr("src", urlImgCertImpr);
3766
3767 var fechaActualizaImpr=$('#contenidoNoImpresion .fecha-actualizacion').text();
3768 //console.log('fechaActualizaImpr '+fechaActualizaImpr);
3769 $('#contenidoImpresion #fecha-actualizacion_impresion').html(fechaActualizaImpr);
3770
3771 var textRef=$('#contenidoNoImpresion span.ref').text();
3772 //console.log('textRef '+textRef);
3773 $('#contenidoImpresion #mostrar_ref_impresion').html(textRef);
3774
3775 //var textlegal1=$('#contenidoNoImpresion #legalOne .panel-body').html();
3776 //console.log('textlegal1 '+textlegal1);
3777 //$('#contenidoImpresion #legalOne_impresion').children('div').html(textlegal1);
3778
3779 //var textlegal2=$('#contenidoNoImpresion #legalTwo .panel-body').html();
3780 //console.log('textlegal2 '+textlegal2);
3781 //$('#contenidoImpresion #legalTwo_impresion').children('div').html(textlegal2);
3782
3783 //var textlegal3=$('#contenidoNoImpresion #legalThree .panel-body').html();
3784 //console.log('textlegal3 '+textlegal3);
3785 //$('#contenidoImpresion #legalThree_impresion').children('div').html(textlegal3);
3786
3787 var footerContent=$('section.copyright .wrapper').html();
3788 //console.log('footerContent '+footerContent);
3789 $('#footer_impresion').html(footerContent);
3790
3791 //var textValuesFeatures = $('#contenidoNoImpresion #product_features').children('ul').children('li').map(function() {
3792 // return $(this).text(); }).get();
3793 //$('#contenidoImpresion #product_features_impresion').html(textValuesFeatures.join(', '));
3794 //console.log('product_features_impresion '+$('#product_features_impresion').html());
3795
3796 $('#contenidoImpresion sectionMapImpresion').addClass( "container" );
3797
3798 //obtener contenido promos
3799 //getFullRelatedData();
3800 procederImpresion= true;
3801 checkFlagImpresion();
3802
3803 }
3804
3805 function checkFlagImpresion() {
3806 if(procederImpresion == false) {
3807 window.setTimeout(checkFlagImpresion, 100); /* this checks the flag every 100 milliseconds*/
3808 } else {
3809 /***** Saltos de página ****/
3810 var staticHeight = 0;
3811 var pageHeight = 1400;
3812 if (navigator.userAgent.search("MSIE") >= 0) {
3813 //console.log('browser MSIE');
3814 pageHeight = 1300;
3815 }
3816 else if (navigator.userAgent.search("Chrome") >= 0) {
3817 //console.log('browser Chrome');
3818 pageHeight = 1400;
3819 }
3820 else if (navigator.userAgent.search("Firefox") >= 0) {
3821 //console.log('browser Firefox');
3822 pageHeight = 1300;
3823 }
3824 else if (navigator.userAgent.search("Safari") >= 0 && navigator.userAgent.search("Chrome") < 0) {
3825 //console.log('browser Safari');
3826 pageHeight = 1400;
3827 }
3828 else if (navigator.userAgent.search("Opera") >= 0) {
3829 //console.log('browser Opera');
3830 pageHeight = 1400;
3831 }
3832
3833 var page = 1;
3834
3835 $('#contenidoImpresion .soloImpresion').attr("style", "display: block !important");
3836 $('#contenidoImpresion .noEnImpresion').attr("style", "display: none !important");
3837 $('#contenidoNoImpresion').attr("style", "display: none !important");
3838 $('#contenidoImpresion').attr("style", "display: block !important");
3839
3840 //console.log(staticHeight);
3841 //$('#contenidoImpresion #cabecera_impresion, #contenidoImpresion #product_detail section.box.detail,#contenidoImpresion section.notice, #contenidoImpresion #detail-promo-related .container #list-related, #contenidoImpresion #detail-promo-related .container.conjunta, #contenidoImpresion #detail-promo-related .promo-conjunta-list-related-precio, #contenidoImpresion #campanaBodyIcons, #contenidoImpresion #product_detail .article_aside > *:visible, #contenidoImpresion #incluyeMasPropietarioImpresion, #contenidoImpresion #detail_map, #contenidoImpresion #legalOne_impresion, #contenidoImpresion #legalTwo_impresion, #contenidoImpresion #legalThree_impresion, #contenidoImpresion #mostrar_ref_impresion, #contenidoImpresion #footer_impresion').each(function() {$(this).css('border', 'solid 1px red');});
3842 //Primero cabecera de impresion, el header y el encabezado con foto. Luego el resto de secciones
3843 //$('#contenidoImpresion #cabecera_impresion, #contenidoImpresion #product_detail section.box.detail,#contenidoImpresion section.notice,#contenidoImpresion div.related-title, #contenidoImpresion div.related-body tr, #contenidoImpresion #campanaBodyIcons, #contenidoImpresion #product_detail .article_aside > *:visible,#contenidoImpresion #incluyeMasPropietarioImpresion, #contenidoImpresion #detail_map, #contenidoImpresion #legalOne_impresion, #contenidoImpresion #legalTwo_impresion, #contenidoImpresion #legalThree_impresion, #contenidoImpresion #mostrar_ref_impresion, #contenidoImpresion #footer_impresion').each(function() {
3844 <#-- acadaval 06/11/2017: SVH-99327 Añadir Información de Zona en la ficha de inmueble -->
3845 <#-- $('#contenidoImpresion #cabecera_impresion, #contenidoImpresion #product_detail section.box.detail,#contenidoImpresion section.notice, #contenidoImpresion #detail-promo-related .container #list-related, #contenidoImpresion #detail-promo-related .container.conjunta, #contenidoImpresion #detail-promo-related .promo-conjunta-list-related-precio, #contenidoImpresion #campanaBodyIcons, #contenidoImpresion #product_detail .article_aside > *:visible, #contenidoImpresion #incluyeMasPropietarioImpresion, #contenidoImpresion #detail_map, #contenidoImpresion #legalOne_impresion, #contenidoImpresion #legalTwo_impresion, #contenidoImpresion #legalThree_impresion, #contenidoImpresion #mostrar_ref_impresion, #contenidoImpresion #footer_impresion').each(function() { -->
3846 $('#contenidoImpresion #cabecera_impresion, #contenidoImpresion #product_detail section.box.detail,#contenidoImpresion section.notice, #contenidoImpresion #detail-promo-related .container #list-related, #contenidoImpresion #detail-promo-related .container.conjunta, #contenidoImpresion #detail-promo-related .promo-conjunta-list-related-precio, #contenidoImpresion #campanaBodyIcons, #contenidoImpresion #product_detail .article_aside > *:visible, #contenidoImpresion #incluyeMasPropietarioImpresion, #contenidoImpresion #detail_map, #contenidoImpresion #legalOne_impresion, #contenidoImpresion #legalTwo_impresion, #contenidoImpresion #legalThree_impresion, #contenidoImpresion #mostrar_ref_impresion, #contenidoImpresion #footer_impresion, #contenidoImpresion #product_zonaInfo').each(function() {
3847 <#-- acadaval 06/11/2017: SVH-99327 Añadir Información de Zona en la ficha de inmueble -->
3848 //console.log($(this));
3849 //console.log($(this).offset().top+" + "+$(this).outerHeight(true)+" - "+staticHeight+" = "+($(this).offset().top + $(this).outerHeight(true) - staticHeight));
3850
3851 if (($(this).offset().top + $(this).outerHeight(true) - staticHeight) > (pageHeight-$(this).outerHeight(true))) {
3852 $(this).before( '<div class="saltoDePagina borrable" id="saltoDePagina_' + page + '"></div>' +
3853 '<div id="cabecera_impresion_'+(page+1)+'" class="cabecera_impresion soloImpresion borrable" style="display: block !important;">' +
3854 $('#cabecera_impresion').html() +
3855 '</div>');
3856 //console.log("BREAK");
3857 staticHeight = $('#cabecera_impresion_'+(page+1)).offset().top;
3858 //console.log('TRAS SALTO: '+$(this).offset().top+" + "+$(this).outerHeight(true)+" - "+staticHeight+" = "+($(this).offset().top + $(this).outerHeight(true) - staticHeight));
3859 //console.log(staticHeight);
3860 page = page+1;
3861 }
3862 });
3863 //Esta función imprime al finalizar de cargar con ajax
3864 //getFullRelatedData();
3865 $('#contenidoNoImpresion').attr("style", "display: none !important");
3866 $('#contenidoImpresion').attr("style", "display: block !important");
3867 window.location.href = window.location.href;
3868 window.print();
3869 //hideFullRelatedData();
3870 //Vaciar contenido
3871 $('#contenidoImpresion').html('');
3872 $('#contenidoNoImpresion').attr("style", "display: block !important");
3873 //quitar por que el del footer queda fuera
3874 $('.borrable').remove();
3875 $('#contenidoImpresion').attr("style", "display: none !important");
3876 $('#contenidoNoImpresion').attr("style", "display: block !important");
3877 }
3878 }
3879
3880
3881 <#-- Mostrar href campañas en modal: Se muestra el modal y, en caso que falle, abriremos un popup -->
3882 function setCampanaModalContent(divId, href_url)
3883 {
3884 //$( '#'+divId+' .modal-content' ).html( '<div class="detailbox-img-div loading"></div>' );
3885 var jqxhr = $.get( href_url, function(data, status) {
3886 $( '#'+divId ).modal();
3887 $( '#'+divId+' .modal-content' ).html( data );
3888 })
3889 .fail(function(xhr, status, error) {
3890 console.log( "error" );
3891 console.log( "xhr "+xhr );
3892 console.log( "status "+status );
3893 console.log( "error "+error );
3894 window.open(href_url, '<@liferay.language key="servihabitat-venta-conjunta-campanya" />',
3895 'toolbar=no, location=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=500, height=600');
3896 return false;
3897 });
3898 }
3899 </script>
3900
3901 <#recover>
3902 <#assign ja = journalArticleLS.getArticle(getterUtil.getLong(groupId),propsUtil.get("servihabitat.common.idErrorPageArticle"))/>
3903 <#assign docXml = saxReaderUtil.read(ja.getContentByLocale(locale)) />
3904 <#assign text = docXml.valueOf("//static-content[@language-id='" + locale + "']/text()") />
3905
3906 ${text}
3907
3908 <script>
3909 $(document).ready(
3910 function() {
3911 //Seteamos el titulo de la pagina
3912 $('#detail_header .container').append('<header id="product_header_affix"> <div class="col3"> <p class="error"><@liferay.language key="error" /></p> </div> </header>');
3913 });
3914 </script>
3915 </#attempt>
3916 </article>
3917 <div class="megawidget-popup">
3918 <div class="megawidget-popup-close"></div>
3919 <#if urlImg3D?? && urlImg3D!="" >
3920 <iframe scrolling="no" src="${urlImg3D}"></iframe>
3921 </#if>
3922 </div>
3923 <div id='gallery-inmueble' style="display:none"></div>
3924</section>
3925
3926<script>
3927
3928 var resourceURL = '';
3929 var resourceURLPDF = '';
3930 var resourceURLAbrirPDF = '';
3931 AUI().ready('liferay-portlet-url', function(A) {
3932 resourceURLAbrirPDF = Liferay.PortletURL.createResourceURL();
3933 resourceURLAbrirPDF.setPortletId("abrirpdfficha_WAR_servihabitatfichapdfportlet");
3934 resourceURLPDF = Liferay.PortletURL.createResourceURL();
3935 resourceURLPDF.setPortletId("comprobarpdfficha_WAR_servihabitatfichapdfportlet");
3936
3937 var campanasInmuebles = '${refCampana}';
3938 var campanaWOW = '${idCampaWOW}';
3939 var arrayCampanas = campanasInmuebles.split(",");
3940 var esCampanaValida = false;
3941 $.each(arrayCampanas,function(i){
3942 if (arrayCampanas[i] == campanaWOW) {
3943 esCampanaValida = true;
3944 }
3945 });
3946 if (esCampanaValida) {
3947 var referencia = '${referencia.getData()}';
3948 resourceURLPDF.setParameter("referencia",referencia);
3949
3950 $.ajax({
3951 url: resourceURLPDF,
3952 success: function(msg){
3953 var resultado= JSON.parse(msg)
3954
3955 if(resultado.existe == 'true'){
3956 $("#linkPDF_normal").css("display", "none");
3957 $("#linkPDF_responsive").css("display", "block");
3958
3959 var urlPDF = $("#linkDescargaPDF").attr('href');
3960 $("#linkPDF_responsive").attr("href",urlPDF);
3961 }
3962 else{
3963 $("#linkPDF_normal").css("display", "block");
3964 $("#linkPDF_responsive").css("display", "none");
3965 }
3966 },
3967 error: function(XMLHttpRequest, textStatus, errorThrown) {
3968 console.log("error"+errorThrown);
3969 }
3970 })
3971 }
3972 });
3973
3974 $(document).ready(function() {
3975
3976 if (!isMobile()){
3977 //Añadimos el portlet de callback a la plantilla del detalle inmueble
3978 $('.call-back-portlet').appendTo('#detail_aside_menu');
3979 }
3980
3981 document.documentElement.setAttribute("data-agent", navigator.userAgent);
3982
3983 if($("#campanaBodyIcons").children().length == 0) {
3984 $("#campanaBodyIcons").css('display', 'none');
3985 }
3986
3987 Liferay.fire(
3988 'shareInmuebleParameters', {
3989 tipoOperacion: '${tipoOperacion?lower_case}',
3990 idImnueble: '${referenciaFire}',
3991 mensajeCompuesto: "${mensajeCompuesto}",
3992 referenciaCompuesta: '${referenciaCompuesta}',
3993 jsonDetail: '${datosSEODetailProducto}'
3994 }
3995 );
3996
3997 $( "#politica_de_cookies_container" ).click(function() {
3998 //console.log( "click" );
3999 if($('#detail_aside_menu').length != 0){
4000 updateDetailAsideAffix();
4001 }
4002 });
4003
4004 if($('#detail_aside_menu').length != 0){
4005 setTimeout(function(){
4006 updateDetailAsideAffix();
4007 }, 500);
4008 }
4009
4010 $(window).on('orientationchange', function(event) {
4011 location.reload();
4012 });
4013
4014
4015 $("#notaContentTextArea").focusout(function() {
4016 disableNotas();
4017 });
4018 $("p.notaText").click(function (event) {
4019 enableNotas();
4020 });
4021
4022
4023 $( ".megawidget" ).click(function(e) {
4024 e.preventDefault();
4025 $('body').addClass('megawidget-opened');
4026 });
4027
4028 $( ".megawidget-popup-close, .megawidget-popup" ).click(function(e) {
4029 e.preventDefault();
4030 $('body').removeClass('megawidget-opened');
4031 });
4032
4033 <#--//inicio TAREAPROY-1674-->
4034 //filtro tipologia
4035 $('.tipoEnPromo').each(function() {
4036 var elemento = $(this).val();
4037 //console.log(elemento);
4038
4039 // Recorrer el select para no meter elementos repetidos.
4040 var elementoEncontrado = false;
4041 $("#selectTipo > option").each(function() {
4042 if (this.value == elemento) {
4043 elementoEncontrado = true;
4044 }
4045 });
4046 // Si el elemento no esta presente, se mete en el select.
4047 if (!elementoEncontrado && elemento!=null && elemento!="") {
4048 var nuevaOpt = "<option value='"+elemento+"'>"+elemento+"</option>";
4049 $('#selectTipo').append(nuevaOpt);
4050 }
4051 });
4052 //ordenar valores
4053 var select = $('#selectTipo');
4054 select.html(select.find('option').sort(function(x, y) {
4055 return $(x).text() > $(y).text() ? 1 : -1;
4056 }));
4057 //forzar opcion todas primera carga
4058 $('#selectTipo option')
4059 .removeAttr('selected')
4060 .filter('[value=Todas]')
4061 .attr('selected', true);
4062
4063 <#--//fin TAREAPROY-1674-->
4064
4065
4066 // nuevo evento datalayer GA4
4067 addEventToDatalayerDetail('view_item');
4068
4069 });
4070
4071 function addEventToDatalayerDetail(eventName) {
4072
4073 var jsonRef = ${datosSEODetailProducto};
4074 var jsonOne = jsonRef['${referencia.getData()}'];
4075
4076 if (jsonOne != undefined && jsonOne != null) {
4077
4078 // datalayer push null inicial
4079 dataLayer.push({
4080 'ecommerce': null
4081 });
4082
4083 Object.assign(jsonOne, {'item_id': jsonOne["id"]});
4084 delete jsonOne.id;
4085 Object.assign(jsonOne, {'item_name': jsonOne["name"]});
4086 delete jsonOne.name;
4087 Object.assign(jsonOne, {'item_brand': jsonOne["brand"]});
4088 delete jsonOne.brand;
4089 var comercializacion = "sale";
4090 if (window.location.href.indexOf("/alquiler") != -1 || window.location.href.indexOf("/lloguer") != -1 || window.location.href.indexOf("/rent") != -1) {
4091 comercializacion = "rent";
4092 }
4093 Object.assign(jsonOne, {'item_category': comercializacion});
4094
4095 var tipoPropiedad = jsonOne.category.split("/");
4096 Object.assign(jsonOne, {'item_category2': tipoPropiedad[2]});
4097
4098 var provincia = tipoPropiedad[3];
4099 var zona = tipoPropiedad[4];
4100 var localidad = tipoPropiedad[5];
4101 Object.assign(jsonOne, {'item_category3': provincia});
4102 Object.assign(jsonOne, {'item_category4': zona});
4103 Object.assign(jsonOne, {'item_category5': localidad});
4104
4105 delete jsonOne.category;
4106
4107 Object.assign(jsonOne, {'coupon': jsonOne["productIsComercialPromotion"]});
4108 delete jsonOne.productIsComercialPromotion;
4109 Object.assign(jsonOne, {'item_property_type': tipoPropiedad[2]});
4110 delete jsonOne.serpType;
4111 if (jsonOne["serpSubType"] != "" && jsonOne["serpSubType"] != undefined) {
4112 Object.assign(jsonOne, {'item_property_subtype': jsonOne["serpSubType"]});
4113 } else {
4114 Object.assign(jsonOne, {'item_property_subtype': "sin filtros"});
4115 }
4116 delete jsonOne.serpSubType;
4117 Object.assign(jsonOne, {'index': 1});
4118 delete jsonOne.position;
4119 Object.assign(jsonOne, {'item_keys': jsonOne["productAreKeysAvailable"]});
4120 delete jsonOne.productAreKeysAvailable;
4121
4122 var numImages = parseInt(jsonOne["productNumberImages"]);
4123 if (numImages == 0) {
4124 Object.assign(jsonOne, {'item_images': "0"});
4125 } else if (numImages > 0 && numImages < 6) {
4126 Object.assign(jsonOne, {'item_images': "1-5"});
4127 } else if (numImages > 5 && numImages < 11) {
4128 Object.assign(jsonOne, {'item_images': "6-10"});
4129 } else if (numImages > 10 && numImages < 16) {
4130 Object.assign(jsonOne, {'item_images': "11-15"});
4131 } else if (numImages > 15) {
4132 Object.assign(jsonOne, {'item_images': ">15"});
4133 }
4134
4135 delete jsonOne.productNumberImages;
4136 delete jsonOne.list;
4137 delete jsonOne.productCategoryPath;
4138 delete jsonOne.productIsJointPromotion;
4139 delete jsonOne.productIsInvestors;
4140 delete jsonOne.productIsAvailable;
4141 delete jsonOne.pageAverageTownPrice;
4142 delete jsonOne.productIsOffer;
4143 delete jsonOne.productExtrasArray;
4144 delete jsonOne.variant;
4145 delete jsonOne.productEquipmentArray;
4146 delete jsonOne.productOfferAmount;
4147 delete jsonOne.productListSubtype;
4148 delete jsonOne.productRoomNumber;
4149 delete jsonOne.pageAverageAreaPrice;
4150 delete jsonOne.pageAverageAreaPriceM2;
4151 delete jsonOne.pageAverageTownPriceM2;
4152 delete jsonOne.productState;
4153 delete jsonOne.productOfferPercent;
4154 delete jsonOne.productIsNegotiable;
4155 delete jsonOne.productBathroomNumber;
4156 delete jsonOne.productM2;
4157 delete jsonOne.productCampaignArray;
4158
4159 dataLayer.push({
4160 'event': eventName,
4161 'ecommerce': {
4162 'items': [jsonOne]
4163 }
4164 });
4165
4166 }
4167 }
4168
4169 function enableNotas()
4170 {
4171 $("#notaContentTextArea").prop("disabled", false);
4172 $("#notaContentTextArea").show();
4173 $("#notaContentTextArea").focus();
4174 $("#notaContent1").hide();
4175 $('.activity-note span.fa-pencil').hide();
4176 $('.button-publicar').show();
4177 }
4178
4179 function disableNotas()
4180 {
4181 $("#notaContentTextArea").prop("disabled", true);
4182 $("#notaContentTextArea").hide();
4183 $("#notaContent1").show();
4184 $('.button-publicar').hide();
4185 $('.activity-note span.fa-pencil').show();
4186 guardarNota( '${referencia.getData()}');
4187 }
4188
4189 function guardarNota(referencia)
4190 {
4191 // console.log(referencia);
4192
4193
4194 //SEO jsFormIntent
4195 try {
4196 //console.log('jsFormIntent');
4197 dataLayer.push({
4198 'event' : 'jsFormIntent',
4199 'formName' : 'notaFavoritoForm',
4200 'trigger' : 'submit',
4201 'submitResult' : 'correct'
4202 });
4203 }
4204 catch(err) {
4205 console.log(err.message);
4206 }
4207
4208
4209 var notas= $("#notaContentTextArea").val();
4210 if(''==notas)
4211 {
4212 $("#notaContent1").addClass('notaDisabled');
4213 $("#notaContent1").text('<@liferay.language key="favoritos-publicar-nota-placeholder" />');
4214 $(".notaContent2").html('');
4215 }
4216 else
4217 {
4218 $("#notaContent1").removeClass('notaDisabled');
4219 $("#notaContent1").text(notas);
4220 }
4221 $("#notaContent1").show();
4222 $("#notaContentTextArea").hide();
4223 var idUsu='${usuario}';
4224 //console.log('notas'+notas)
4225 //console.log('idUsu'+idUsu)
4226 Liferay.Service('/servihabitat-retail-favoritos-usuario-portlet.favorito/anade-notas-favorito',
4227 {
4228 userid: idUsu,
4229 referencia: referencia,
4230 notas: notas,
4231 isSignedIn: 'true'
4232 },
4233 function(obj) {
4234 // console.log('jsonString'+obj);
4235 var obj = jQuery.parseJSON(obj);
4236 if( obj.resultado === 'ACTUALIZAOK' )
4237 {
4238 if(''!=notas)
4239 {
4240 $(".notaContent2").html('<@liferay.language key="favoritos-publicar-nota-ahora" />');
4241 }
4242 $(".notaContent2").show();
4243 }
4244 }
4245 );
4246 }
4247
4248 // Flecha atras para mobile.
4249 $('#breadcrumb-back-button-mobile').click(function() {
4250 var enlaceOriginal = window.location.pathname;
4251 var index = enlaceOriginal.lastIndexOf("/");
4252 var enlace = enlaceOriginal.substring(0, index); // enlace sin la referencia.
4253 var promociones = '<@liferay.language key="url-promociones" />';
4254 enlace = enlace.replace("/"+promociones+"/", "/");
4255 if (enlace != null) {
4256 var padre = $('#breadcrumb-back-button-mobile').parent();
4257 padre.attr('href', enlace);
4258 }
4259 });
4260
4261 function addDataLayerDetailWhatsapp() {
4262 var aux=${datosSEODetailProducto};
4263
4264 var jsonOne = aux["${referencia.getData()}"];
4265
4266 if (jsonOne!=undefined) {
4267 var dataToPush = new Array();
4268 Object.assign(dataToPush, {'event': 'button interactions'});
4269 Object.assign(dataToPush, {'eventTxt1': 'item whatsapp contact click'});
4270
4271 var dataFinalPush = $.extend({}, dataToPush, jsonOne);
4272
4273 // Renombrar variables para whatsapp
4274 dataFinalPush.productName = dataFinalPush.name;
4275 dataFinalPush.productPrice = dataFinalPush.price;
4276 dataFinalPush.productBrand = dataFinalPush.brand;
4277 dataFinalPush.productId = dataFinalPush.id;
4278 delete dataFinalPush.name;
4279 delete dataFinalPush.price;
4280 delete dataFinalPush.brand;
4281 delete dataFinalPush.id;
4282
4283 dataLayer.push(
4284 dataFinalPush
4285 );
4286 }
4287 }
4288
4289 function accionesBotonContactar() {
4290 $(".ZebraDialog").hide();
4291 dataLayer.push({'event' : 'jsFormOpen', 'formName' : 'callForm', 'trigger' : 'click' });
4292 }
4293
4294 function enlaceInmueble(enlace) {
4295 var urlNueva = addParameterToUrl(enlace, "token", '${token}');
4296 window.location = urlNueva;
4297 }
4298
4299 function addParameterToUrl(oldUrl, parameter, parameterValue) {
4300 if (parameterValue === '' || parameterValue == undefined || parameterValue == null) {
4301 return oldUrl;
4302 }
4303 var newUrl = oldUrl;
4304 if (!(oldUrl.indexOf("?")==-1)) {
4305 newUrl += "&";
4306 }else{
4307 newUrl += "?";
4308 }
4309
4310 newUrl += parameter + "=" + parameterValue;
4311 return newUrl;
4312 }
4313 function iraFotoPlano(index) {
4314 $('#flexslider').flexslider(index);
4315 }
4316
4317 <#--// inicio TAREAPROY-1674-->
4318 function filtrarTipo() {
4319 var tipoSeleccionada = $('select[name=selectTipo] option').filter(':selected').val();
4320
4321 if(tipoSeleccionada == 'Todas') {
4322 $('.tipoEnPromo').each(function(index) {
4323 var elemento = $(this).val();
4324
4325 $(this).parent().show();
4326 });
4327 } else {
4328
4329 var par = true;
4330 $('.tipoEnPromo').each(function(index) {
4331
4332 var elemento = $(this).val();
4333 if (elemento != tipoSeleccionada) {
4334 $(this).parent().hide();
4335 } else {
4336
4337 $(this).parent().show();
4338
4339 }
4340 });
4341 }
4342 }
4343
4344
4345
4346 function filtrarOrdenar() {
4347 var ordenSeleccionada = $('select[name=selectOrden] option').filter(':selected').val();
4348 var opcionVacia = "vacia";
4349
4350 if(ordenSeleccionada == 'precio') {
4351
4352
4353
4354 $('.detail-promo-conjuntaModal div.list-related').sort(function(a,b){
4355 return parseInt(a.dataset.precio) - parseInt(b.dataset.precio)
4356 }).appendTo('.detail-promo-conjuntaModal')
4357
4358
4359 }
4360 if(ordenSeleccionada == 'metros') {
4361
4362
4363
4364 $('.detail-promo-conjuntaModal div.list-related').sort(function(a,b){
4365 return parseInt(a.dataset.metros) - parseInt(b.dataset.metros)
4366 }).appendTo('.detail-promo-conjuntaModal')
4367
4368 }
4369 if(ordenSeleccionada == 'defaultOrden') {
4370
4371
4372
4373 $('.detail-promo-conjuntaModal div.list-related').sort(function(a,b){
4374 return parseInt(a.dataset.ordendef) - parseInt(b.dataset.ordendef)
4375 }).appendTo('.detail-promo-conjuntaModal')
4376
4377 }
4378 }
4379 <#--//fin TAREAPROY-1674-->
4380 //INC0125826
4381 $(window).scroll(function() {
4382 var wScreen = $(this).scrollTop();
4383 var elementoMenu=$('.wholeSalesMenu').outerHeight();
4384 elementoMenu=elementoMenu+elementoMenu;
4385 if (wScreen < elementoMenu){
4386 updateDetailAsideAffix();
4387 }
4388 });
4389 function aceptarModalInsis() {
4390 $( "#_callback_WAR_servihabitatretailcallbackportlet_botonInsistirModal" ).trigger( "click" );
4391 }
4392 $( window ).scroll(function() {
4393 $('.popover').hide();
4394 });
4395
4396
4397 function descargarPDF(referencia) {
4398
4399 var resourceDetalleURL = '';
4400 resourceDetalleURL = Liferay.PortletURL.createResourceURL();
4401 resourceDetalleURL.setPortletId("detalle_WAR_servihabitatretaildetalleportlet");
4402 resourceDetalleURL.setParameter("cmd", 'descargaPDF');
4403 resourceDetalleURL.setParameter("referencia", '${referencia.getData()}');
4404
4405 $.ajax({
4406 url: resourceDetalleURL,
4407 success: function(msg){
4408 var resultado= JSON.parse(msg);
4409 if (resultado.imagen64 != '') {
4410 $('#imagen64').val(resultado.imagen64);
4411 }
4412 },
4413 error: function(XMLHttpRequest, textStatus, errorThrown) {
4414 console.log("error"+errorThrown);
4415 }
4416 });
4417 setTimeout(function(){
4418 // descargar el pdf normalmente.
4419 downloadPDF(referencia);
4420 }, 1000);
4421
4422 }
4423</script>