-
Notifications
You must be signed in to change notification settings - Fork 0
/
bookings-search.htm
224 lines (213 loc) · 11.3 KB
/
bookings-search.htm
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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
{% extends master.master %}
{% block title %}{% T Meeting Rooms and Resources %}{% endblock %}
{% block main %}
<div class="container">
<div class="container">
<!-- BREADCRUMBS -->
<ol class="breadcrumb">
<li><a href="{{ business.HomeUrl }}">{% T Home %}</a></li>
<li><a href="{% Url Bookings, Calendar %}">{% T Calendar %}</a></li>
<li class="active">{% T Meeting Rooms and Resources %}</li>
</ol>
<!-- END BREADCRUMBS -->
</div>
<!-- PAGE HEADER -->
<div class="page-header">
<h1>{% T Meeting Rooms and Resources %}</h1>
</div>
<!-- END PAGE HEADER -->
<!-- FILTERS -->
<div class="filters">
<ul class="nav filters__nav">
{% include bookings_resources_menu.htm %}
<li class="active pull-right">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
{% T Location %}: {{ data.Business.Name }} <span class="caret"></span>
</a>
{% include core_locations_list.htm %}
</li>
</ul>
</div>
<!-- END FILTERS -->
<div class="row">
<div class="col-sm-4">
<div class="form-group">
<label for="">{% T Date: %}</label>
<div class="input-group date">
<input type="date" class="form-control" readonly="readonly" data-bind="pickadate:{ value: startDate, options: $root.datePickerOptions }">
<span class="input-group-addon">
<i class="glyphicon-th fa fa-calendar"></i>
</span>
</div>
</div>
</div>
<div class="{% if data.Setting_Bookings_ShowEndDate %}col-sm-2{% else %}col-sm-4{% endif %}">
<div class="form-group">
<label for="">{% T Start Time %}</label>
<div class="input-group date">
<input type="text" class="form-control" readonly="readonly" data-bind="pickatime:{ value: startTime, options: $root.timePickerOptions }">
<span class="input-group-addon">
<i class="glyphicon-th fa fa-clock-o"></i>
</span>
</div>
</div>
</div>
{% if data.Setting_Bookings_ShowEndDate %}
<div class="col-sm-4">
<div class="form-group">
<label for="">{% T End Date: %}</label>
<div class="input-group date">
<input type="date" class="form-control" readonly="readonly" data-bind="pickadate:{ value: endDate, options: $root.datePickerOptions }">
<span class="input-group-addon">
<i class="glyphicon-th fa fa-calendar"></i>
</span>
</div>
</div>
</div>
{% endif %}
<div class="{% if data.Setting_Bookings_ShowEndDate %}col-sm-2{% else %}col-sm-4{% endif %}">
<div class="form-group">
<label for="">{% T End Time %} <span class="text-hint" data-bind="text: '(' + duration().asMinutes() + ' {% T minutes %})'"></span></label>
<div class="input-group date">
<input type="text" class="form-control" readonly="readonly" data-bind="pickatime:{ value: endTime, options: $root.timePickerOptions }">
<span class="input-group-addon">
<i class="glyphicon-th fa fa-clock-o"></i>
</span>
</div>
</div>
</div>
</div>
<div class="btn-toolbar btn-toolbar--block--in-xs-down form-actions">
<div class="row">
<div class="col-sm-12 text-right">
<button data-bind="click: searchResources" class="btn btn--default btn--sm btn-block--in-xs-down" type="button">
<i class="fa fa-search"></i>
{% T Find available rooms %}
</button>
</div>
</div>
</div>
<hr />
<!-- RESOURCES LIST -->
<ul class="row resources-list">
{% for resource in data.Local.Resources %}
<li class="col-sm-6 resources-list__item">
<h2 class="h3 resources-list__title"><a href="#" onclick="bookingManager.createBooking({ resourceId: {{ resource.Id }}, date: moment('{{ data.Local.StartDate | FormatDate: 'yyyy-MM-ddTHH:mm' }}'), endDate: moment('{{ data.Local.EndDate | FormatDate: 'yyyy-MM-ddTHH:mm' }}').toDate() }); return false;">{{ resource.Name }}</a></h2>
{% if resource.IsAvailable %}
<span class="label label--success">{% T Available %}</span>
{% else %}
<span title="{{ resource.Message }}" class="label label--danger">{% T Not Available %}</span>
<small class="unavailable-message" data-toggle="tooltip" title="" data-original-title="{{ resource.Message }}">{% T Why? %}</small>
{% endif %}
<a href="#" onclick="bookingManager.createBooking({ resourceId: {{ resource.Id }}, date: moment('{{ data.Local.StartDate | FormatDate: 'yyyy-MM-ddTHH:mm' }}'), endDate: moment('{{ data.Local.EndDate | FormatDate: 'yyyy-MM-ddTHH:mm' }}').toDate() }); return false;" class="resources-list__cover">
{% if resource.HasImage %}
<img src="{% Url PublicResources, GetImage, id: resource.Id, h: 411, w: 555 %}" alt="{{ resource.Name }}" class="entry-image" />
{% else %}
<img src="http://placehold.it/1110x822?text={{ resource.Name }}" alt="{{ resource.Name }}">
{% endif %}
</a>
<p class="resources-description">
{{ resource.Description }}
<ul class="list-inline resources-services-list">
{% if resource.AirConditioning %}
<li><span data-toggle="tooltip" title="{% T Air conditioner %}"><i class="i-nexudus-ac"></i></span></li>
{% endif %}
{% if resource.ConferencePhone or resource.StandardPhone %}
<li><span data-toggle="tooltip" title="{% T Conference phone %}"><i class="i-nexudus-conference"></i></span></li>
{% endif %}
{% if resource.Projector %}
<li><span data-toggle="tooltip" title="{% T Projector %}"><i class="i-nexudus-projector"></i></span></li>
{% endif %}
{% if resource.Internet %}
<li><span data-toggle="tooltip" title="{% T Wifi %}"><i class="i-nexudus-wifi"></i></span></li>
{% endif %}
{% if resource.WhiteBoard %}
<li><span data-toggle="tooltip" title="{% T Whiteboard %}"><i class="i-nexudus-whiteboard"></i></span></li>
{% endif %}
{% if resource.LargeDisplay %}
<li><span data-toggle="tooltip" title="{% T TV set %}"><i class="i-nexudus-tvset"></i></span></li>
{% endif %}
{% if resource.TeaAndCoffee %}
<li><span data-toggle="tooltip" title="{% T Coffee and tea available %}"><i class="i-nexudus-hotdrinks"></i></span></li>
{% endif %}
{% if resource.Drinks %}
<li><span data-toggle="tooltip" title="{% T Drinks Available %}"><i class="i-nexudus-softdrinks"></i></span></li>
{% endif %}
</ul>
<ul class="clearfix resources-details-list">
{% if resource.Allocation != null %}
<li class="resources-details-list__item">
<span class="resources-details-list__title">{% T Seating %}</span>
<b class="resources-details-list__value">{{ resource.Allocation }} p.</b>
</li>
{% endif %}
{% if resource.PriceFormatted != null and resource.Price >= 0 %}
<li class="resources-details-list__item">
<span class="resources-details-list__title">{% T Price %}</span>
<b class="resources-details-list__value">{{ resource.PriceFormatted }}</b>
</li>
{% endif %}
</ul>
<div class="btn-toolbar">
<a href="#" onclick="bookingManager.createBooking({ resourceId: {{ resource.Id }}, date: moment('{{ data.Local.StartDate | FormatDate: 'yyyy-MM-ddTHH:mm' }}'), endDate: moment('{{ data.Local.EndDate | FormatDate: 'yyyy-MM-ddTHH:mm' }}').toDate() }); return false;" class="btn btn--primary btn--sm">{% T Make a booking %}</a>
</div>
</li>
{% endfor %}
</ul>
<!-- END RESOURCES LIST -->
<!-- MODAL DIALOGS -->
{% include bookings_registration_form.htm %}
{% include bookings_booking_form.htm %}
<!-- END MODAL DIALOGS -->
</div>
{% endblock %}
{% block scripts %}
<script>
var resources = [
{% for resource in data.Resources %}
{% assign resourceGroupKey = resource.GroupName | Clean %}
{% assign resourceGroupName = resource.GroupName %}
{% if resourceGroupKey == '' %}
{% assign resourceGroupKey = 'resources' %}
{% assign resourceGroupName = 'Resources' %}
{% endif %}
{
id:{{ resource.Id }},
UniqueId: '{{ resource.UniqueId }}',
imageUrl: '{% if resource.HasImage %}{% Url PublicResources, GetImage, id: resource.Id, h: 200, w: 312 %}{% else %}http://placehold.it/312x200?text=?{% endif %}',
thumbUrl: '{% if resource.HasImage %}{% Url PublicResources, GetImage, id: resource.Id, h: 32, w: 32 %}{% else %}http://placehold.it/32x32?text=?{% endif %}',
groupName: '{% T resourceGroupName %}',
title:'{{ resource.Name | Replace: "'", "\'" }}',
resourceTypeName:'{{ resource.ResourceTypeName | Replace: "'", "\'" }}'
},
{% endfor %}
];
var bookingManager = new BookingManager({
dateTimeFormat: 'D, dd MM yyyy - HH:ii P',
resources: resources,
roundMinutesTo: 30,
coworker: {
Id: {% if data.Coworker != null %}{{data.Coworker.Id}}{% else %}null{% endif %}
},
guestBookings: {% if data.Setting_Bookings_EnableGuestBookings %}true{% else %}false{% endif %},
loginUrl: '{% Url Login, Index, lang: data.Language %}&returnUrl={{ data.URL }}',
availableUrl: '{% Url Bookings, GetBookingPrice %}',
dayAvailableUrl: '{% Url Bookings, GetAvailabilityAt %}',
productsUrl: '{% Url Bookings, GetResourceProducts %}',
newBookingUrl: '{% Url Bookings, NewBookingJson %}',
updateBookingUrl: '{% Url Bookings, BookingJson %}',
visitorsUrl: '{% Url Bookings, GetBookingVisitors %}',
bookingUrl: '{% Url Bookings, BookingJson %}',
deleteBookingUrl: '{% Url Bookings, DeleteJson %}',
searchUrl: '{% Url Bookings, Search %}',
paymentUrl: '{% Url Bookings, Pay %}'
});
$(function(){
var start = moment("{{ data.Local.StartDate | FormatDate: 'yyyy-MM-ddTHH:mm' }}").toDate();
var end = moment("{{ data.Local.EndDate | FormatDate: 'yyyy-MM-ddTHH:mm' }}").toDate();
bookingManager.setDates(start, end);
bookingManager.getBalance();
bookingManager.applyBindings();
})
</script>
{% endblock %}