83 lines
3.0 KiB
Plaintext
83 lines
3.0 KiB
Plaintext
<%= csrf_meta_tag %>
|
|
<% property = @booking.property %>
|
|
<h3><%= property.title %></h3>
|
|
<table class="table main-list">
|
|
<tbody>
|
|
<tr>
|
|
<td><%= t("property_hire.hiring_person_name") %></td>
|
|
<td><%= @booking.hirer_name %></td>
|
|
</tr>
|
|
<tr>
|
|
<td><%= t("property_hire.hiring_person_number") %></td>
|
|
<td><%= @booking.hiring_person_number %></td>
|
|
</tr>
|
|
<tr>
|
|
<td><%= t("property_hire.hiring_person_email") %></td>
|
|
<td><%= @booking.hiring_person_email %></td>
|
|
</tr>
|
|
<tr>
|
|
<td><%= t("property_hire.period") %></td>
|
|
<td><%= @booking.period %></td>
|
|
</tr>
|
|
<% if @booking.recurring %>
|
|
<tr>
|
|
<td><%= t("property_hire.recurring_interval") %></td>
|
|
<td><%= @booking.recurring_interval %></td>
|
|
</tr>
|
|
<tr>
|
|
<td><%= t("property_hire.recurring_end_date") %></td>
|
|
<td><%= @booking.recurring_end_date.strftime("%y-%m-%d %H:%M") %></td>
|
|
</tr>
|
|
<% end %>
|
|
<tr>
|
|
<td><%= t("property_hire.reason_for_hire") %></td>
|
|
<td><%= @booking.reason_for_hire %></td>
|
|
</tr>
|
|
<tr>
|
|
<td><%= t("property_hire.note_for_hire") %></td>
|
|
<td><%= @booking.note_for_hire.html_safe %></td>
|
|
</tr>
|
|
<% fields_name = ["organization" ,"person_in_charge" , "tel_of_person_in_charge" , "department" , "contact_person" , "tel_of_contact_person" , "mobile_phone_of_contact_person" , "contact_person_Email" , "contact_person_department"] %>
|
|
<% fields_name.each do |field_name| %>
|
|
<% if(property[field_name]["enable"] == "1" rescue false) %>
|
|
<tr>
|
|
<td><%= property.custom_text(field_name,"name") %></td>
|
|
<td><%= @booking[field_name].to_s %></td>
|
|
</tr>
|
|
<% end %>
|
|
<% end %>
|
|
<% @booking.p_hire_field_values.each do |v| %>
|
|
<% field_info = v.get_field_value rescue {} %>
|
|
<% if field_info["title"].present? && !field_info["value"].nil? && !field_info["hint"] %>
|
|
<tr>
|
|
<td><%=field_info["title"]%>: </td>
|
|
<td><%=field_info["value"]%></td>
|
|
</tr>
|
|
<% end%>
|
|
<% end%>
|
|
<tr>
|
|
<td><%= t("property_hire.passed") %></td>
|
|
<td>
|
|
<% if @booking.passed %>
|
|
<span class="badge badge-success">Yes</span>
|
|
<% else %>
|
|
<span class="badge badge-important">No</span>
|
|
<% end %>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<a href="" onclick="window.history.back();return false;" class="btn btn-warning">Back</a>
|
|
<% if can_edit_or_delete?(@booking.property) %>
|
|
<a href="<%= edit_hire_admin_property_hire_path(@booking) %>" class="btn btn-info"><%= t("property_hire.edit") %></a>
|
|
<% if @booking.passed %>
|
|
<a href="<%= pass_booking_admin_property_hire_path(@booking, :status => "reject") %>" class="btn btn-warning"><%= t("property_hire.reject") %></a>
|
|
<% else %>
|
|
<a href="<%= pass_booking_admin_property_hire_path(@booking, :status => "accept") %>" class="btn btn-success"><%= t("property_hire.accept") %></a>
|
|
<% end %>
|
|
<a href="<%= delete_booking_details_admin_property_hire_path(@booking, :page => params[:page]) %>" class="btn btn-danger" data-method="delete" data-confirm="Are you sure?"><%= t("property_hire.delete") %></a>
|
|
<% end %>
|
|
|
|
|
|
|