Files
old-web/app/views/viewRealEstate.ejs

130 lines
2.9 KiB
Plaintext
Raw Normal View History

<br/>
<div class="row col s12 center-align">
<div class="col s6 center-align distinguished">
<div><%= showAdType %> </div>
</div>
<div class="col s6 center-align distinguished">
<%= showRealEstateType %>
</div>
</div>
2020-03-03 22:03:41 +01:00
<section class="slider">
<div class="flexslider" >
2020-02-24 15:41:28 +01:00
<ul class="slides">
<% for (const photoUrl of realEstatePhotosUrls) { %>
2020-03-03 22:03:41 +01:00
<li class="flex-li">
<img src=<%= photoUrl %> alt=""/>
</li>
<% } %>
2020-02-24 15:41:28 +01:00
</ul>
</div>
2020-03-03 22:03:41 +01:00
</section>
<br/>
2020-02-14 13:38:31 +01:00
<br>
2020-02-23 01:52:43 +01:00
<div class="row col s12">
2020-02-14 13:38:31 +01:00
<% for (const field of inputFields){ %>
<p>
2020-02-23 01:52:43 +01:00
<span class="col s4"><%= field.title %></span>
<span class="col s8 distinguished dont-break-out"><%= allInputValues[field.dbField] %></span>
2020-02-14 13:38:31 +01:00
</p>
2020-02-23 01:52:43 +01:00
<br>
2020-02-14 13:38:31 +01:00
<% } %>
</div>
<br>
<div class="row">
<% for (const field of segmentFields){ %>
<p>
2020-02-23 01:52:43 +01:00
<span class="col s4"><%= field.title.replace(/>/g,'') %></span>
2020-02-14 13:38:31 +01:00
<% for (const segmentObject of field.values) { %>
<% if (allSegmentSelectedValues[field.dbField] === segmentObject.id) { %>
2020-02-23 01:52:43 +01:00
<span class="col s8 distinguished"><%= segmentObject.title.replace(/>/g,'') %></span>
<% } %>
2020-02-14 13:38:31 +01:00
<% } %>
</p>
2020-02-23 01:52:43 +01:00
<br>
<% } %>
</div>
<br>
<div class="row col s12">
<% for (const field of booleanFields){ %>
<p class="col s4">
<span>&#10003;</span>
<span><%= field.title %></span>
</p>
2020-02-14 13:38:31 +01:00
<% } %>
2020-02-23 01:52:43 +01:00
</div>
<div class="row center-align ">
<div class="distinguished">
<span>Lokacija nekretnine</span>
</div>
<br>
<br>
<div class="col s12">
<div id="map"></div>
</div>
</div>
2020-02-24 15:41:28 +01:00
<script type="text/javascript">
$(window).load(function() {
2020-03-03 22:03:41 +01:00
$('.flexslider').flexslider({
2020-02-24 15:41:28 +01:00
animation: "slide",
smoothHeight: true
2020-03-03 17:02:20 +01:00
});
2020-03-03 22:03:41 +01:00
});
2020-02-23 23:05:28 +01:00
</script>
2020-02-23 01:52:43 +01:00
<script>
2020-02-23 23:05:28 +01:00
//Setting up image gallery - carousel
//Setting up location map
2020-02-23 01:52:43 +01:00
let map;
function initMap() {
const BOSNIA_BOUNDS = {
north: 45.7,
south: 41.69,
west: 15.55,
east: 20.77
};
const ESTATE_COORDINATES = {
lat: <%= locationLat %>,
lng: <%= locationLong %>
};
const mapElement = document.getElementById("map");
const restrictMapPanningToBosniaOnly = {
latLngBounds: BOSNIA_BOUNDS,
strictBounds: true
};
const initialMapParams = {
center: ESTATE_COORDINATES,
zoom: 13,
restriction: restrictMapPanningToBosniaOnly,
mapTypeControl: false,
panControl: false,
zoomControl: true,
streetViewControl: false
};
map = new google.maps.Map(mapElement, initialMapParams);
marker = new google.maps.Marker({
position: ESTATE_COORDINATES,
map: map,
});
}
</script>
<script
2020-02-24 15:41:28 +01:00
src="https://maps.googleapis.com/maps/api/js?key=<%= process.env.GOOGLE_MAP_KEY %>&language=bs&libraries=places&callback=initMap"
2020-02-23 01:52:43 +01:00
async
defer
2020-02-23 23:05:28 +01:00
></script>