38 lines
1.2 KiB
Plaintext
38 lines
1.2 KiB
Plaintext
|
<% if @already_reserved %>
|
||
|
<% booking = @already_booked.first %>
|
||
|
<div class="already-reserved">
|
||
|
<h4><%= t("bus_booking.already_reserved") %></h4>
|
||
|
<h3><%= @bus.bus_route %></h3>
|
||
|
<table class="table table-striped table-bordered">
|
||
|
<tbody>
|
||
|
<tr>
|
||
|
<td><%= t("bus_booking.registered_date") %></td>
|
||
|
<td><%= booking.created_at.strftime("%Y/%m/%d") %></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td><%= t("bus_booking.name") %></td>
|
||
|
<td><%= booking.name %></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td><%= t("bus_booking.email") %></td>
|
||
|
<td><%= booking.email %></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td><%= t("bus_booking.department") %></td>
|
||
|
<td><%= booking.department %></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td><%= t("bus_booking.dorm_number") %></td>
|
||
|
<td><%= booking.dorm_number %></td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table>
|
||
|
<a href="<%= admin_bus_booking_cancel_path(booking) %>" class="btn btn-danger" data-method="delete" data-confirm="Are you sure?"><%= t("bus_booking.cancel_reservation") %></a>
|
||
|
</div>
|
||
|
<% else %>
|
||
|
<%= form_for @bus_booking, url: "/admin/bus_bookings/bookbus", html: {class: "form-horizontal main-forms"} do |f|%>
|
||
|
<fieldset>
|
||
|
<%= render :partial => 'bus_booking_form', locals: {f: f} %>
|
||
|
</fieldset>
|
||
|
<% end %>
|
||
|
<% end %>
|