2021-10-05 14:03:49 +00:00
|
|
|
<% OrbitHelper.render_css_in_head(["property_hire_fullcalendar.css","property_hire_calendar"]) %>
|
2021-07-05 10:05:49 +00:00
|
|
|
<script src="https://polyfill.io/v3/polyfill.min.js?features=Intl.DateTimeFormat,Intl.DateTimeFormat.~locale.en,Intl.NumberFormat.~locale.en"></script>
|
2017-01-20 09:02:50 +00:00
|
|
|
<script type="text/javascript" src="/assets/property_hire_fullcalendar.min.js"></script>
|
|
|
|
<script type="text/javascript" src="/assets/property_hire_calendar_frontend.js"></script>
|
|
|
|
<%
|
|
|
|
data = action_data
|
|
|
|
property = data["property"]
|
|
|
|
url = data["url"]
|
|
|
|
%>
|
2023-08-26 03:16:56 +00:00
|
|
|
<% if property.disable_view_calendar_page %>
|
2017-01-20 09:02:50 +00:00
|
|
|
<script type="text/javascript">
|
|
|
|
alert("This property is unavailable for hire.");
|
|
|
|
window.location.href = "<%= "/" + I18n.locale.to_s + url %>";
|
|
|
|
</script>
|
|
|
|
<% end %>
|
|
|
|
<h3>Booking schedule for property <b><%= property.title %></b></h3>
|
|
|
|
<div id="orbit_calendar">
|
|
|
|
<div id="sec1">
|
|
|
|
<div class="btn-toolbar" id="navigation">
|
|
|
|
<div id="calendar-nav">
|
|
|
|
<div class="btn-group">
|
|
|
|
<button class="btn btn-default btn-sm" id="prev_month_btn">
|
|
|
|
<i class="icon-chevron-left"></i>
|
|
|
|
</button>
|
|
|
|
<button class="btn btn-default btn-sm" id="next_month_btn">
|
|
|
|
<i class="icon-chevron-right"></i>
|
|
|
|
</button>
|
2024-10-23 07:33:50 +00:00
|
|
|
<button class="btn btn-default btn-sm" id="today_btn"><%= t("property_hire.today") %></button>
|
2017-01-20 09:02:50 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-inline" id="range_selection"></div>
|
|
|
|
</div>
|
|
|
|
<div id='sec3' class="btn-toolbar">
|
|
|
|
<div class="btn-group calendar_mode">
|
2024-10-23 07:33:50 +00:00
|
|
|
<button class="btn btn-default mode_switch btn-sm" data-mode="timeGridDay" ><%= t("property_hire.day") %></button>
|
|
|
|
<button class="btn btn-default mode_switch btn-sm" data-mode="timeGridWeek" ><%= t("property_hire.week") %></button>
|
|
|
|
<button class="btn btn-default active mode_switch btn-sm" data-mode="dayGridMonth" ><%= t("property_hire.month") %></button>
|
2017-01-20 09:02:50 +00:00
|
|
|
</div>
|
|
|
|
<button id="refresh_btn" class="btn btn-default btn-sm">
|
|
|
|
<i class="icons-cycle"></i>
|
|
|
|
</button>
|
|
|
|
</div>
|
|
|
|
<div id="view_holder">
|
|
|
|
<h3 id="current_title" class="current_day_title"></h3>
|
|
|
|
<div id="calendar"></div>
|
|
|
|
<div id="calendar_agenda"></div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="event_quick_view" class="modal" style="width: 300px; display:none; margin:0 0 0 0;"></div>
|
|
|
|
<div id="calendar-loading"></div>
|
|
|
|
<a href="<%= "/" + I18n.locale.to_s + url %>" class="btn btn-warning">Back</a>
|
|
|
|
<script type="text/javascript">
|
|
|
|
var property_id = "<%= property.id.to_s %>";
|
2021-10-05 14:15:23 +00:00
|
|
|
var calendar = new Calendar("#calendar",property_id,false);
|
2017-01-20 09:02:50 +00:00
|
|
|
</script>
|