property_hire/app/views/admin/property_hires/my_bookings.html.erb

42 lines
1.2 KiB
Plaintext
Raw Permalink Normal View History

<%= csrf_meta_tag %>
<table class="table main-list">
<thead>
<tr class="sort-header">
<% @table_fields.each do |f| %>
<%= thead(f) %>
<% end %>
</tr>
</thead>
<tbody>
<% @bookings.each do |p_hire| %>
<tr>
<td>
<%= p_hire.hirer_name %>
</td>
<td>
<%= p_hire.reason_for_hire %>
</td>
<td>
<%= p_hire.hiring_person_number %>
</td>
<td>
<%= p_hire.period %>
</td>
<td>
<% if p_hire.passed %>
<span class="badge badge-success">Yes</span>
<% else %>
<span class="badge badge-important">No</span>
<% end %>
</td>
<td>
<a href="<%= show_booking_details_admin_property_hire_path(p_hire, :page => params[:page]) %>" class="btn btn-info">View</a>
<a href="<%= delete_booking_details_admin_property_hire_path(p_hire, :page => params[:page]) %>" class="btn btn-danger" data-method="delete" data-confirm="Are you sure?">Delete</a>
</td>
</tr>
<% end %>
</tbody>
</table>
<div class="bottomnav clearfix">
<%= content_tag(:div, paginate(@bookings), class: "pagination pagination-centered") %>
</div>