<% if @already_reserved %> <% booking = @already_booked.first %>

<%= t("bus_booking.already_reserved") %>

<%= @bus.bus_route %>

<%= t("bus_booking.registered_date") %> <%= booking.created_at.strftime("%Y/%m/%d") %>
<%= t("bus_booking.name") %> <%= booking.name %>
<%= t("bus_booking.email") %> <%= booking.email %>
<%= t("bus_booking.department") %> <%= booking.department %>
<%= t("bus_booking.dorm_number") %> <%= booking.dorm_number %>
<% if ((@bus.departure_time - 1.hour) > Time.now rescue true) %> <%= t("bus_booking.cancel_reservation") %> <% end %>
<% else %> <%= form_for @bus_booking, url: "/admin/bus_bookings/bookbus", html: {class: "form-horizontal main-forms"} do |f|%>
<%= render :partial => 'bus_booking_form', locals: {f: f} %>
<% end %> <% end %>