This repository has been archived by the owner on Mar 31, 2023. It is now read-only.
/
show.jst.ejs
199 lines (195 loc) · 7.15 KB
/
show.jst.ejs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
<% var userName = user ? user.escape('email') : ''; %>
<% var iconUrl = user ? user.escape('avatar_url') : "https://s3-us-west-1.amazonaws.com/petbnb/images/listings/user_icon.png"; %>
<% var coverImg = images ? images.at(0).escape('url') : '' %>
<% var detailImgTop = (images && images.length > 1) ? images.at(1).escape('url') : '' %>
<% var detailImgBottom = (images && images.length > 2) ? images.at(2).escape('url') : '' %>
<div id="cover">
<% if (images) { %>
<img src="<%= coverImg %>" alt="" />
<% } %>
</div>
<div id="summary">
<div class="row container-responsive">
<div class="col-md-8 col-sm-12">
<div class="row-space-4 row-space-top-4">
<div class="row">
<div class="col-md-3 text-center">
<a href="#/users/<%= listing.escape('user_id') %>"
class="user-icon">
<img src="<%= iconUrl %>" alt="user_icon" />
</a>
<div class="user-name"><%= userName %></div>
</div>
<div class="col-md-9">
<h1><%= listing.escape('name') %></h1>
<input type="hidden" id="lat" value=<%= listing.escape('latitude') %>>
<input type="hidden" id="lng" value=<%= listing.escape('longitude') %>>
<span class="address"><%= listing.escape('address') %></span>
</div>
</div>
</div>
</div>
<div class="col-md-4 col-sm-12">
<form class="booking-form">
<div class="price-box">
<h5 class="price pull-left">$<%= listing.escape('price_daily') %></h5>
<span class="per-night pull-right">Per Night</span>
</div>
<div class="booking-box">
<div class="panel">
<div class="panel-body panel-light">
<div class="form-fields">
<div class="booking-errors">
<div class="message">
</div>
</div>
<div class="row row-condensed">
<div class="col-sm-6">
Check In
<input type="text" id="checkin" name="checkin"
placeholder="mm/dd/yyyy"
value="<%= PetBnB.checkin %>">
</div>
<div class="col-sm-6">
Check Out
<input type="text" id="checkout" name="checkout"
placeholder="mm/dd/yyyy"
value="<%= PetBnB.checkout %>">
</div>
</div>
</div>
<div class="booking-details">
<div class="panel-padding-fit">
<table class="table table-bordered table-breakdown">
<tbody>
<tr>
<td id="cost-breakdown-1">
$<%= listing.escape('price_daily') %> x
<span id="total-nights"></span> nights
</td>
<td id="cost-breakdown-2">
</td>
</tr>
<tr>
<td>Total</td>
<td id="cost-breakdown-total">
</td>
</tr>
</tbody>
</table>
</div>
<div class="booking-button enabled">
<button type="button" class="btn btn-primary btn-large btn-block"
id="booking-button">
<i class="fa fa-bolt"></i> Instant Book
</button>
</div>
</div>
<div id="book-urgency-commitment">
<div class="panel-body">
<div class="media">
<i class="icon icon-hourglass-color pull-left"></i>
<div class="media-body">
See yourself here? Book soon. <b>100</b> pet owners viewed
<%= userName %>'s place this week.
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<div id="details">
<div class="row container-responsive">
<div class="col-md-8 col-sm-12" id="details-column">
<div class="row-space-8 row-space-top-8">
<h4 class="row-space-4">About This Listing</h4>
<div class="panel panel-dark row-space-4">
<div class="panel-body">
With PetBnB, you can find unique accommodations for your pets—from houses and apartments, to tree houses and igloos. The listing details below explain what you'll find in this space. If you have any questions, you can contact the host directly.
</div>
</div>
<% if (detailImgTop !== "") { %>
<div class="row-space-4 row-space-top-4 inline-photo">
<a href="#" class="photo-trigger" data-index="1">
<img src="<%= detailImgTop %>" alt="" />
</a>
</div>
<% } %>
<hr>
<div class="row">
<div class="col-md-3 text-muted">
The Space
</div>
<div class="col-md-9">
<div class="row">
<div class="col-md-6">
<div>Pets Accepted: <strong>Dogs, Cats</strong></div>
<div>Property Type: <strong>Apartment</strong></div>
<div>Accomodates: <strong>2</strong></div>
</div>
<div class="col-md-6">
<div>Bed Type: <strong>Fluffy Pet Bed</strong></div>
<div>Beds: <strong>2</strong></div>
</div>
</div>
</div>
</div>
<hr>
<div class="row description">
<div class="col-md-3 text-muted">
Description
</div>
<div class="col-md-9">
<%= listing.escape('description') %>
</div>
</div>
<hr>
<div class="row">
<div class="col-md-3 text-muted">
Availability
</div>
<div class="col-md-9">
<div class="row">
<div class="col-md-6">
<strong>2 nights</strong> minimum stay
</div>
</div>
</div>
</div>
<% if (detailImgBottom !== "") { %>
<div class="row-space-4 row-space-top-4 inline-photo">
<a href="#" class="photo-trigger" data-index="1">
<img src="<%= detailImgBottom %>" alt="" />
</a>
</div>
<% } %>
</div>
</div>
</div>
</div>
<div class="modal fade" id="bookingSuccessModal" tabindex="-1"
role="dialog" aria-labelledby="reservationSuccessModal"
aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal"
aria-label="Close">
<span aria-hidden="true">×</span>
</button>
<h4 class="modal-title">Booking success</h4>
</div>
<div class="modal-body">
</div>
</div>
</div>
</div>
<script type="text/javascript">
(function () {
})();
</script>